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.
sourcefn json_key(self) -> &'static str
fn json_key(self) -> &'static str
Returns the key to use when serializing the setting to json:
- individual components in a
link-self-contained
object value - the other variants as a backwards-compatible
crt-objects-fallback
string
sourcepub fn with_linker() -> LinkSelfContainedDefault
pub fn with_linker() -> LinkSelfContainedDefault
Creates a LinkSelfContainedDefault
enabling the self-contained linker for target specs
(the equivalent of -Clink-self-contained=+linker
on the CLI).
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 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> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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