pub struct Change {
pub path: String,
pub category: Category,
pub verdict: Verdict,
pub before: Option<String>,
pub after: Option<String>,
}Expand description
One difference between two snapshots, with an honest path into the IR and the rendered before/after values where they apply.
Fields§
§path: StringA slash-separated path, e.g. veh.cluster/VehicleStatus/doorOpened.
category: Category§verdict: Verdict§before: Option<String>The rendered old value, absent when the change is an addition.
after: Option<String>The rendered new value, absent when the change is a removal.
Implementations§
Source§impl Change
impl Change
Sourcepub fn package(&self) -> &str
pub fn package(&self) -> &str
The dotted name of the package the change belongs to: the first
segment of path. The walk builds the path as
<package>/<name>[/<member>...], and this accessor and
declaration are the one place that reads that
layout back.
Sourcepub fn declaration(&self) -> Option<&str>
pub fn declaration(&self) -> Option<&str>
The bare name of the package-level declaration, interface or service
the change belongs to: the second segment of path, or
None for a change to the package itself.
Trait Implementations§
impl Eq for Change
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl Forget for Change
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Change
impl UnwindSafe for Change
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