pub struct Summary {
pub metadata: Map<String, Value>,
pub target_packages: BTreeMap<SummaryId, PackageInfo>,
pub host_packages: BTreeMap<SummaryId, PackageInfo>,
}
summaries
only.Expand description
An in-memory representation of a build summary.
The metadata parameter is customizable.
For more, see the crate-level documentation.
Fields
metadata: Map<String, Value>
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: BTreeMap<SummaryId, PackageInfo>
The packages and features built on the target platform.
host_packages: BTreeMap<SummaryId, PackageInfo>
The packages and features built on the host platform.
Implementations
sourceimpl Summary
impl Summary
sourcepub fn with_metadata(metadata: &impl Serialize) -> Result<Summary, Error>
pub fn with_metadata(metadata: &impl Serialize) -> Result<Summary, Error>
Constructs a new summary with the provided metadata, and an empty target_packages
and
host_packages
.
sourcepub fn parse(s: &str) -> Result<Summary, Error>
pub fn parse(s: &str) -> Result<Summary, Error>
Deserializes a summary from the given string, with optional custom metadata.
sourcepub fn diff(&'a self, other: &'a Summary) -> SummaryDiff<'a>
pub fn diff(&'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
sourceimpl<'de> Deserialize<'de> for Summary
impl<'de> Deserialize<'de> for Summary
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Summary, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Summary, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Summary
impl Serialize for Summary
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Summary
Auto Trait Implementations
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnwindSafe for Summary
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more