[][src]Struct auditable_serde::Package

pub struct Package {
    pub name: String,
    pub version: Version,
    pub source: String,
    pub kind: DependencyKind,
    pub dependencies: Vec<usize>,
    pub features: Vec<String>,
}

A single package in the dependency tree

Fields

name: String

Crate name specified in the name field in Cargo.toml file. Examples: "libc", "rand"

version: Versionsource: String

Currently "git", "local" or "registry". Designed to be extensible with other revision control systems, etc.

May be extended in the future to record a specific revision, e.g. git-sha1+90ac1a1e8b072e0d595c63db39875b371397173d

kind: DependencyKind

"build" or "runtime". If it's both a build and a runtime dependency, "runtime" is recorded.

dependencies: Vec<usize>

Packages are stored in an ordered array both in the VersionInfo struct and in JSON. Here we refer to each package by its index in the array.

features: Vec<String>

List of features, identical to the way cargo metadata presents them.

The feature "default" will also be recorded unless --no-default-features is used.

Trait Implementations

impl Clone for Package[src]

impl Debug for Package[src]

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

impl Eq for Package[src]

impl Ord for Package[src]

impl PartialEq<Package> for Package[src]

impl PartialOrd<Package> for Package[src]

impl Serialize for Package[src]

impl StructuralEq for Package[src]

impl StructuralPartialEq for Package[src]

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

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Package

impl Send for Package

impl Sync for Package

impl Unpin for Package

impl UnwindSafe for Package

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<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.