pub struct Summary {
pub metadata: Table,
pub target_packages: PackageMap,
pub host_packages: PackageMap,
}Expand description
An in-memory representation of a build summary.
For more, see the crate-level documentation.
Fields§
§metadata: TableExtra metadata associated with the summary.
This may be used for storing extra information about the summary.
Populate it from any Serialize type through Self::with_metadata.
target_packages: PackageMapThe packages and features built on the target platform.
host_packages: PackageMapThe packages and features built on the host platform.
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn with_metadata(metadata: &impl Serialize) -> Result<Self, Error>
pub fn with_metadata(metadata: &impl Serialize) -> Result<Self, Error>
Constructs a new summary with the provided metadata, and an empty target_packages and
host_packages.
Sourcepub fn diff<'a>(&'a self, other: &'a Summary) -> SummaryDiff<'a>
pub fn diff<'a>(&'a self, other: &'a Summary) -> SummaryDiff<'a>
Perform a diff of this summary against another.
This doesn’t diff the metadata, just the initials and packages.
Sourcepub fn write_to_string(&self, dst: &mut String) -> Result<(), Error>
pub fn write_to_string(&self, dst: &mut String) -> Result<(), Error>
Serializes this summary into the given TOML string, using pretty TOML syntax.
This serializes the summary using the toml_compat module, for
byte-identical output against previous versions of guppy-summaries which
used toml 0.5.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Summary
impl<'de> Deserialize<'de> for Summary
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnsafeUnpin for Summary
impl UnwindSafe for Summary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more