[−][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 DependencyEdge
.
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 DependencyLink
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.
pub fn uses_default_features(&self) -> bool
[src]
Returns true if the default features of this dependency are enabled.
pub fn features(&self) -> &[String]
[src]
Returns a list of the features enabled by this dependency.
pub fn target(&self) -> Option<&str>
[src]
Returns the target string for this dependency, if specified. This is a string like
cfg(target_arch = "x86_64")
.
See Platform specific dependencies in the Cargo reference for more details.
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>,