[][src]Struct cargo_lock::dependency::Dependency

pub struct Dependency {
    pub name: Name,
    pub version: Version,
    pub source: Option<SourceId>,
}

Package dependencies

Fields

name: Name

Name of the dependency

version: Version

Version of the dependency

source: Option<SourceId>

Source identifier for the dependency

Implementations

impl Dependency[src]

pub fn matches(&self, package: &Package) -> bool[src]

Does the given Package exactly match this Dependency?

Trait Implementations

impl Clone for Dependency[src]

impl Debug for Dependency[src]

impl<'de> Deserialize<'de> for Dependency[src]

impl Display for Dependency[src]

impl Eq for Dependency[src]

impl<'_> From<&'_ Package> for Dependency[src]

fn from(pkg: &Package) -> Dependency[src]

Get the Dependency requirement for this [[package]]

impl Hash for Dependency[src]

impl Ord for Dependency[src]

impl PartialEq<Dependency> for Dependency[src]

impl PartialOrd<Dependency> for Dependency[src]

impl Serialize for Dependency[src]

impl StructuralEq for Dependency[src]

impl StructuralPartialEq for Dependency[src]

impl<'_> TryFrom<&'_ Key> for Dependency[src]

type Error = Error

The type returned in the event of a conversion error.

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<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> ToString for T where
    T: Display + ?Sized
[src]

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.