[−][src]Struct rustsec::lockfile::Lockfile
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: BTreeMap<Key, Value>
Package metadata
patch: Patch
Patches
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 Clone for Lockfile
[src]
impl Debug for Lockfile
[src]
impl<'de> Deserialize<'de> for Lockfile
[src]
fn deserialize<D>(
deserializer: D
) -> Result<Lockfile, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Lockfile, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Eq for Lockfile
[src]
impl FromStr for Lockfile
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(toml_string: &str) -> Result<Lockfile, Error>
[src]
impl PartialEq<Lockfile> for Lockfile
[src]
impl Serialize for Lockfile
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl StructuralEq for Lockfile
[src]
impl StructuralPartialEq for Lockfile
[src]
impl ToString for Lockfile
[src]
impl TryFrom<EncodableLockfile> for Lockfile
[src]
Auto Trait Implementations
impl RefUnwindSafe for Lockfile
impl Send for Lockfile
impl Sync for Lockfile
impl Unpin for Lockfile
impl UnwindSafe for Lockfile
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,