Struct guppy::graph::EnabledStatus[][src]

pub struct EnabledStatus<'g> { /* fields omitted */ }

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]

impl<'g> Copy for EnabledStatus<'g>[src]

impl<'g> Debug for EnabledStatus<'g>[src]

Auto Trait Implementations

impl<'g> RefUnwindSafe for EnabledStatus<'g>[src]

impl<'g> Send for EnabledStatus<'g>[src]

impl<'g> Sync for EnabledStatus<'g>[src]

impl<'g> Unpin for EnabledStatus<'g>[src]

impl<'g> UnwindSafe for EnabledStatus<'g>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SafeBorrow<T> for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,