pub enum LinkSelfContainedDefault {
True,
False,
InferredForMusl,
InferredForMingw,
WithComponents(LinkSelfContainedComponents),
}
Expand description
The different -Clink-self-contained
options that can be specified in a target spec:
- enabling or disabling in bulk
- some target-specific pieces of inference to determine whether to use self-contained linking
if
-Clink-self-contained
is not specified explicitly (e.g. on musl/mingw) - explicitly enabling some of the self-contained linking components, e.g. the linker component
to use
rust-lld
Variants§
True
The target spec explicitly enables self-contained linking.
False
The target spec explicitly disables self-contained linking.
InferredForMusl
The target spec requests that the self-contained mode is inferred, in the context of musl.
InferredForMingw
The target spec requests that the self-contained mode is inferred, in the context of mingw.
WithComponents(LinkSelfContainedComponents)
The target spec explicitly enables a list of self-contained linking components: e.g. for
targets opting into a subset of components like the CLI’s -C link-self-contained=+linker
.
Implementations§
source§impl LinkSelfContainedDefault
impl LinkSelfContainedDefault
sourcepub fn is_disabled(self) -> bool
pub fn is_disabled(self) -> bool
Returns whether the target spec has self-contained linking explicitly disabled. Used to emit errors if the user then enables it on the CLI.
sourcepub fn is_linker_enabled(self) -> bool
pub fn is_linker_enabled(self) -> bool
Returns whether the target spec explicitly requests self-contained linking, i.e. not via inference.
Trait Implementations§
source§impl Clone for LinkSelfContainedDefault
impl Clone for LinkSelfContainedDefault
source§fn clone(&self) -> LinkSelfContainedDefault
fn clone(&self) -> LinkSelfContainedDefault
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LinkSelfContainedDefault
impl Debug for LinkSelfContainedDefault
source§impl FromStr for LinkSelfContainedDefault
impl FromStr for LinkSelfContainedDefault
Parses a backwards-compatible -Clink-self-contained
option string, without components.
source§impl PartialEq for LinkSelfContainedDefault
impl PartialEq for LinkSelfContainedDefault
source§fn eq(&self, other: &LinkSelfContainedDefault) -> bool
fn eq(&self, other: &LinkSelfContainedDefault) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for LinkSelfContainedDefault
impl StructuralPartialEq for LinkSelfContainedDefault
Auto Trait Implementations§
impl DynSend for LinkSelfContainedDefault
impl DynSync for LinkSelfContainedDefault
impl Freeze for LinkSelfContainedDefault
impl RefUnwindSafe for LinkSelfContainedDefault
impl Send for LinkSelfContainedDefault
impl Sync for LinkSelfContainedDefault
impl Unpin for LinkSelfContainedDefault
impl UnwindSafe for LinkSelfContainedDefault
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
True
: 0 bytesFalse
: 0 bytesInferredForMusl
: 0 bytesInferredForMingw
: 0 bytesWithComponents
: 1 byte