[][src]Struct cargo_lock::lockfile::Lockfile

pub struct Lockfile {
    pub version: ResolveVersion,
    pub packages: Vec<Package>,
    pub root: Option<Package>,
    pub metadata: Metadata,
    pub patch: Patch,
}

Parsed Cargo.lock file containing dependencies

Fields

version: ResolveVersion

Version of the Lockfile

packages: Vec<Package>

Dependencies enumerated in the lockfile

root: Option<Package>

Legacy "root" dependency for backwards compatibility

metadata: Metadata

Package metadata

patch: Patch

Patches

Implementations

impl Lockfile[src]

pub fn load(path: impl AsRef<Path>) -> Result<Self, Error>[src]

Load lock data from a Cargo.lock file

pub fn dependency_tree(&self) -> Result<Tree, Error>[src]

Get the dependency tree for this Lockfile. Returns an error if the contents of this lockfile aren't well structured.

The dependency-tree Cargo feature must be enabled to use this.

Trait Implementations

impl Clone for Lockfile[src]

impl Debug for Lockfile[src]

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

impl Eq for Lockfile[src]

impl FromStr for Lockfile[src]

type Err = Error

The associated error which can be returned from parsing.

impl PartialEq<Lockfile> for Lockfile[src]

impl Serialize for Lockfile[src]

impl StructuralEq for Lockfile[src]

impl StructuralPartialEq for Lockfile[src]

impl ToString for Lockfile[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<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, 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.