[][src]Struct guppy::CargoMetadata

pub struct CargoMetadata(_);

A deserialized Cargo metadata returned by a MetadataCommand.

This is an alternative entry point for constructing a PackageGraph, to be used if the JSON output of cargo metadata is already available.

This struct implements serde::Serialize and Deserialize.

Implementations

impl CargoMetadata[src]

pub fn parse_json(json: impl AsRef<str>) -> Result<Self, Error>[src]

Deserializes this JSON blob into a CargoMetadata.

pub fn serialize(&self, writer: &mut impl Write) -> Result<(), Error>[src]

Serializes this metadata into the given writer.

pub fn build_graph(self) -> Result<PackageGraph, Error>[src]

Parses this metadata and builds a PackageGraph from it.

Trait Implementations

impl Clone for CargoMetadata[src]

impl Debug for CargoMetadata[src]

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

impl Serialize for CargoMetadata[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<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync
[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<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,