Struct guppy::graph::EnabledStatus [−][src]
pub struct EnabledStatus<'g> { /* fields omitted */ }
Expand description
Whether a dependency or feature is required, optional, or disabled.
Returned by the methods on DependencyMetadata
.
Examples
[dependencies]
once_cell = "1"
The dependency and default features are required on all platforms.
[dependencies]
once_cell = { version = "1", optional = true }
The dependency and default features are optional on all platforms.
[target.'cfg(windows)'.dependencies]
once_cell = { version = "1", optional = true }
The result is platform-dependent. On Windows, the dependency and default features are both optional. On non-Windows platforms, the dependency and default features are disabled.
[dependencies]
once_cell = { version = "1", optional = true }
[target.'cfg(windows)'.dependencies]
once_cell = { version = "1", optional = false, default-features = false }
The result is platform-dependent. On Windows, the dependency is mandatory and default features
are optional (i.e. enabled if the once_cell
feature is turned on).
On Unix platforms, the dependency and default features are both optional.
Implementations
Returns true if this dependency is required on all platforms.
Returns true if this dependency is never enabled on any platform.
Evaluates whether this dependency is required on the given platform.
Returns Unknown
if the result was unknown, which may happen if the platform’s target
features are unknown.
Returns true if there are any platforms on which this dependency is required.
Evaluates whether this dependency is enabled (required or optional) on the given platform.
Returns Unknown
if the result was unknown, which may happen if the platform’s target
features are unknown.
Returns true if there are any platforms on which this dependency is enabled (required or optional).
Returns the PlatformStatus
corresponding to whether this dependency is required.
Returns the PlatformStatus
corresponding to whether this dependency is optional.
Trait Implementations
Auto Trait Implementations
impl<'g> RefUnwindSafe for EnabledStatus<'g>
impl<'g> Send for EnabledStatus<'g>
impl<'g> Sync for EnabledStatus<'g>
impl<'g> Unpin for EnabledStatus<'g>
impl<'g> UnwindSafe for EnabledStatus<'g>
Blanket Implementations
Mutably borrows from an owned value. Read more
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more