pub struct Summary {
pub metadata: Table,
pub target_packages: PackageMap,
pub host_packages: PackageMap,
}
Expand description
An in-memory representation of a build summary.
The metadata parameter is customizable.
For more, see the crate-level documentation.
Fields§
§metadata: Table
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§
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 parse(s: &str) -> Result<Self, Error>
pub fn parse(s: &str) -> Result<Self, Error>
Deserializes a summary from the given string, with optional custom metadata.
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.
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>,
Deserialize this value from the given Serde deserializer. Read more
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 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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