[−][src]Struct guppy::graph::DependencyMetadata
Information about a specific kind of dependency (normal, build or dev) from a package to another package.
Usually found within the context of a PackageEdge
.
Methods
impl DependencyMetadata
[src]
pub fn version_req(&self) -> &VersionReq
[src]
Returns the semver requirements specified for this dependency.
To get the resolved version, see the to
field of the PackageLink
this was part of.
Notes
A dependency can be requested multiple times in the normal, build and dev fields, possibly with different version requirements, even if they all end up resolving to the same version.
See Specifying Dependencies in the Cargo reference for more details.
pub fn optional(&self) -> bool
[src]
Returns true if this is an optional dependency on the platform guppy
is running on.
This will also return true if this dependency will never be included on this platform at
all, or if the status is unknown. To get finer-grained information, use the enabled
method
instead.
pub fn optional_on(&self, platform: &Platform) -> bool
[src]
Returns true if this is an optional dependency on the given platform.
This will also return true if this dependency will never be included on this platform at
all, or if the status is unknown. To get finer-grained information, use the enabled_on
method instead.
pub fn enabled(&self) -> EnabledStatus
[src]
Returns the enabled status of this dependency on the platform guppy
is running on.
See the documentation for EnabledStatus
for more.
pub fn enabled_on(&self, platform: &Platform) -> EnabledStatus
[src]
Returns the enabled status of this dependency on the given platform.
See the documentation for EnabledStatus
for more.
pub fn uses_default_features(&self) -> bool
[src]
Returns true if the default features of this dependency are enabled on the platform guppy
is running on.
It is possible for default features to be turned off by default, but be optionally included.
This method returns true in those cases. To get finer-grained information, use
the default_features
method instead.
pub fn default_features(&self) -> EnabledStatus
[src]
Returns the status of default features on the platform guppy
is running on.
See the documentation for EnabledStatus
for more.
pub fn default_features_on(&self, platform: &Platform) -> EnabledStatus
[src]
Returns the status of default features of this dependency on the given platform.
See the documentation for EnabledStatus
for more.
pub fn features(&self) -> &[String]
[src]
Returns a list of all features possibly enabled by this dependency. This includes features that are only turned on if the dependency is optional, or features enabled by inactive platforms.
pub fn feature_enabled(&self, feature: &str) -> EnabledStatus
[src]
Returns the enabled status of the feature on the platform guppy
is running on.
Note that as of Rust 1.42, the default feature resolver behaves in potentially surprising ways. See the Cargo reference for more.
See the documentation for EnabledStatus
for more.
pub fn feature_enabled_on(
&self,
feature: &str,
platform: &Platform
) -> EnabledStatus
[src]
&self,
feature: &str,
platform: &Platform
) -> EnabledStatus
Returns the enabled status of the feature on the given platform.
See the documentation of EnabledStatus
for more.
Trait Implementations
impl Clone for DependencyMetadata
[src]
fn clone(&self) -> DependencyMetadata
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DependencyMetadata
[src]
Auto Trait Implementations
impl RefUnwindSafe for DependencyMetadata
impl Send for DependencyMetadata
impl Sync for DependencyMetadata
impl Unpin for DependencyMetadata
impl UnwindSafe for DependencyMetadata
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<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,