[][src]Enum guppy::graph::EnabledStatus

pub enum EnabledStatus {
    Always,
    Optional,
    Never,
    Unknown(UnknownStatus),
}

Whether a dependency or feature is enabled on a specific platform.

Returned by the methods on DependencyMetadata.

Examples

[dependencies]
once_cell = "1"

The dependency and default features are always enabled 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 }

On Windows, the dependency and default features are both optional. On non-Windows platforms, the dependency and default features are never enabled.

[dependencies]
once_cell = { version = "1", optional = true }

[target.'cfg(windows)'.dependencies]
once_cell = { version = "1", optional = false, default-features = false }

On Windows, the dependency is always enabled 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.

Variants

Always

This dependency or feature is always enabled on this platform.

Optional

This dependency or feature is optionally enabled on this platform.

Never

This dependency or feature is never enabled on this platform, even if the optional dependency is turned on.

Unknown(UnknownStatus)

The status of this dependency is unknown because the evaluation involved target features whose status is unknown.

This can only be returned if the set of target features is unknown. In particular, it is guaranteed never to be returned for queries being evaluated against the current platform, since the exact set of target features is already known.

Methods

impl EnabledStatus[src]

pub fn is_known(self) -> bool[src]

Returns true if the enabled status is not Unknown.

Trait Implementations

impl Clone for EnabledStatus[src]

impl Copy for EnabledStatus[src]

impl Debug for EnabledStatus[src]

impl Eq for EnabledStatus[src]

impl Hash for EnabledStatus[src]

impl Ord for EnabledStatus[src]

impl PartialEq<EnabledStatus> for EnabledStatus[src]

impl PartialOrd<EnabledStatus> for EnabledStatus[src]

impl StructuralEq for EnabledStatus[src]

impl StructuralPartialEq for EnabledStatus[src]

Auto Trait Implementations

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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>,