pub struct SummaryDiff<'a> {
    pub target_packages: PackageDiff<'a>,
    pub host_packages: PackageDiff<'a>,
}
Available on crate feature summaries only.
Expand description

A diff of two package summaries.

This struct contains information on the packages that were changed, as well as those that were not.

Human-readable reports

The report method can be used with fmt::Display to generate a friendly, human-readable report.

Machine-readable serialization

A SummaryDiff can be serialized through serde. The output format is part of the API.

An example of TOML-serialized output:

[[target-packages.changed]]
name = "dep"
version = "0.4.3"
crates-io = true
change = "added"
status = "direct"
features = ["std"]

[[target-packages.changed]]
name = "foo"
version = "1.2.3"
workspace-path = "foo"
change = "modified"
new-status = "initial"
added-features = ["feature2"]
removed-features = []
unchanged-features = ["default", "feature1"]

[[target-packages.unchanged]]
name = "no-changes"
version = "1.5.3"
crates-io = true
status = "transitive"
features = ["default"]

[[host-packages.changed]]
name = "dep"
version = "0.4.2"
crates-io = true
change = "removed"
old-status = "direct"
old-features = ["std"]

Fields§

§target_packages: PackageDiff<'a>

Diff of target packages.

§host_packages: PackageDiff<'a>

Diff of host packages.

Implementations§

Computes a diff between two summaries.

Returns true if there are any changes in this diff.

Returns true if there are no changes in this diff.

Returns a report for this diff.

This report can be used with fmt::Display.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.