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 never enabled on any platform.

Evaluates whether this dependency is required on the given platform spec.

Returns Unknown if the result was unknown, which may happen if evaluating against an individual platform and its target features are unknown.

Evaluates whether this dependency is enabled (required or optional) on the given platform spec.

Returns Unknown if the result was unknown, which may happen if evaluating against an individual platform and its target features are unknown.

Returns the PlatformStatus corresponding to whether this dependency is required.

Returns the PlatformStatus corresponding to whether this dependency is optional.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.