[−][src]Struct guppy::graph::EnabledStatus
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
impl<'g> EnabledStatus<'g>
[src]
pub fn is_always_required(&self) -> bool
[src]
Returns true if this dependency is required on all platforms.
pub fn is_never(&self) -> bool
[src]
Returns true if this dependency is never enabled on any platform.
pub fn required_on(&self, platform: &Platform) -> EnabledTernary
[src]
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.
pub fn required_on_any(&self) -> bool
[src]
Returns true if there are any platforms on which this dependency is required.
pub fn enabled_on(&self, platform: &Platform) -> EnabledTernary
[src]
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.
pub fn enabled_on_any(&self) -> bool
[src]
Returns true if there are any platforms on which this dependency is enabled (required or optional).
pub fn required_status(&self) -> PlatformStatus<'g>
[src]
Returns the PlatformStatus
corresponding to whether this dependency is required.
pub fn optional_status(&self) -> PlatformStatus<'g>
[src]
Returns the PlatformStatus
corresponding to whether this dependency is optional.
Trait Implementations
impl<'g> Clone for EnabledStatus<'g>
[src]
fn clone(&self) -> EnabledStatus<'g>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'g> Copy for EnabledStatus<'g>
[src]
impl<'g> Debug for EnabledStatus<'g>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
[src]
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
[src]
fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
[src]
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
[src]
fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> SafeBorrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,