[][src]Struct rustsec::lockfile::Lockfile

pub struct Lockfile {
    pub packages: Vec<Package>,
    pub metadata: BTreeMap<Key, Value>,
}

Parsed Cargo.lock file containing dependencies

Fields

packages: Vec<Package>

Dependencies enumerated in the lockfile

metadata: BTreeMap<Key, Value>

Package metadata

Methods

impl Lockfile[src]

pub fn load(path: impl AsRef<Path>) -> Result<Lockfile, 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 FromStr for Lockfile[src]

type Err = Error

The associated error which can be returned from parsing.

impl Clone for Lockfile[src]

impl Eq for Lockfile[src]

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

impl Serialize for Lockfile[src]

impl Debug for Lockfile[src]

impl ToString for Lockfile[src]

impl PartialEq<Lockfile> for Lockfile[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]