Struct guppy_summaries::SummaryWithMetadata[][src]

pub struct SummaryWithMetadata<M = Value> {
    pub metadata: Option<M>,
    pub target_packages: PackageMap,
    pub host_packages: PackageMap,
}

An in-memory representation of a build summary.

The metadata parameter is customizable.

For more, see the crate-level documentation.

Fields

metadata: Option<M>

Extra metadata associated with the summary.

This may be used for storing extra information about the summary.

The type defaults to toml::Value but is customizable.

target_packages: PackageMap

The packages and features built on the target platform.

host_packages: PackageMap

The packages and features built on the host platform.

Implementations

impl<M> SummaryWithMetadata<M>[src]

pub fn parse<'de>(s: &'de str) -> Result<Self, Error> where
    M: Deserialize<'de>, 
[src]

Deserializes a summary from the given string, with optional custom metadata.

pub fn diff<'a, M2>(
    &'a self,
    other: &'a SummaryWithMetadata<M2>
) -> SummaryDiff<'a>
[src]

Perform a diff of this summary against another.

This doesn't diff the metadata, just the initials and packages.

pub fn to_string(&self) -> Result<String, Error> where
    M: Serialize
[src]

Serializes this summary to a TOML string.

pub fn write_to_string(&self, dst: &mut String) -> Result<(), Error> where
    M: Serialize
[src]

Serializes this summary into the given TOML string, using pretty TOML syntax.

Trait Implementations

impl<M: Clone> Clone for SummaryWithMetadata<M>[src]

impl<M: Debug> Debug for SummaryWithMetadata<M>[src]

impl<M> Default for SummaryWithMetadata<M>[src]

impl<'de, M> Deserialize<'de> for SummaryWithMetadata<M> where
    M: Deserialize<'de>, 
[src]

impl<M: Eq> Eq for SummaryWithMetadata<M>[src]

impl<M: Hash> Hash for SummaryWithMetadata<M>[src]

impl<M: PartialEq> PartialEq<SummaryWithMetadata<M>> for SummaryWithMetadata<M>[src]

impl<M> Serialize for SummaryWithMetadata<M> where
    M: Serialize
[src]

impl<M> StructuralEq for SummaryWithMetadata<M>[src]

impl<M> StructuralPartialEq for SummaryWithMetadata<M>[src]

Auto Trait Implementations

impl<M> RefUnwindSafe for SummaryWithMetadata<M> where
    M: RefUnwindSafe
[src]

impl<M> Send for SummaryWithMetadata<M> where
    M: Send
[src]

impl<M> Sync for SummaryWithMetadata<M> where
    M: Sync
[src]

impl<M> Unpin for SummaryWithMetadata<M> where
    M: Unpin
[src]

impl<M> UnwindSafe for SummaryWithMetadata<M> where
    M: UnwindSafe
[src]

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.