pub struct SummaryDiff<'a> {
pub target_packages: PackageDiff<'a>,
pub host_packages: PackageDiff<'a>,
}
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§
source§impl<'a> SummaryDiff<'a>
impl<'a> SummaryDiff<'a>
sourcepub fn is_changed(&self) -> bool
pub fn is_changed(&self) -> bool
Returns true if there are any changes in this diff.
sourcepub fn is_unchanged(&self) -> bool
pub fn is_unchanged(&self) -> bool
Returns true if there are no changes in this diff.
sourcepub fn report<'b>(&'b self) -> SummaryReport<'a, 'b>
pub fn report<'b>(&'b self) -> SummaryReport<'a, 'b>
Returns a report for this diff.
This report can be used with fmt::Display
.
Trait Implementations§
source§impl<'a> Clone for SummaryDiff<'a>
impl<'a> Clone for SummaryDiff<'a>
source§fn clone(&self) -> SummaryDiff<'a>
fn clone(&self) -> SummaryDiff<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for SummaryDiff<'a>
impl<'a> Debug for SummaryDiff<'a>
source§impl<'a> PartialEq for SummaryDiff<'a>
impl<'a> PartialEq for SummaryDiff<'a>
source§impl<'a> Serialize for SummaryDiff<'a>
impl<'a> Serialize for SummaryDiff<'a>
impl<'a> Eq for SummaryDiff<'a>
impl<'a> StructuralPartialEq for SummaryDiff<'a>
Auto Trait Implementations§
impl<'a> Freeze for SummaryDiff<'a>
impl<'a> RefUnwindSafe for SummaryDiff<'a>
impl<'a> Send for SummaryDiff<'a>
impl<'a> Sync for SummaryDiff<'a>
impl<'a> Unpin for SummaryDiff<'a>
impl<'a> UnwindSafe for SummaryDiff<'a>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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