pub struct ViewDivergence { /* private fields */ }Expand description
The read-only comparison of live state to a saved plan (data-model §5).
differences is ordered by the field walk in [fields], so two runs over the
same inputs report the same list in the same order. in_sync is a convenience
summary: it is true exactly when there are no differences and no
diagnostics.
Implementations§
Source§impl ViewDivergence
impl ViewDivergence
Sourcepub fn between(saved: &ViewPlan, live: &ViewPlan) -> Self
pub fn between(saved: &ViewPlan, live: &ViewPlan) -> Self
Compare two plans directly, with no marker identity.
Sourcepub fn for_marker(
marker: &ActiveViewMarker,
saved: &ViewPlan,
live: &ViewPlan,
) -> Self
pub fn for_marker( marker: &ActiveViewMarker, saved: &ViewPlan, live: &ViewPlan, ) -> Self
Compare live state to a saved plan, keeping the marker’s identity.
Sourcepub fn missing_marker(live: &ViewPlan) -> Self
pub fn missing_marker(live: &ViewPlan) -> Self
No active view is selected: an explicit diagnostic, never a silent match.
Sourcepub fn deleted(view_id: &ViewId, live: &ViewPlan) -> Self
pub fn deleted(view_id: &ViewId, live: &ViewPlan) -> Self
The marker’s view is no longer in the registry (it was deleted).
Sourcepub fn unreadable(
view_id: &ViewId,
live: &ViewPlan,
diagnostics: Vec<ViewDiagnostic>,
) -> Self
pub fn unreadable( view_id: &ViewId, live: &ViewPlan, diagnostics: Vec<ViewDiagnostic>, ) -> Self
The saved definition’s plan could not be interpreted, so no comparison was possible. The refusal’s own diagnostics are carried through verbatim.
Sourcepub fn view_id(&self) -> Option<&ViewId>
pub fn view_id(&self) -> Option<&ViewId>
The saved view the comparison is about, when a marker identified one.
Sourcepub fn saved_plan(&self) -> Option<&ViewPlan>
pub fn saved_plan(&self) -> Option<&ViewPlan>
The saved definition’s normalized plan, when it could be read.
Sourcepub fn differences(&self) -> &[ViewDifference]
pub fn differences(&self) -> &[ViewDifference]
The divergent fields, in a fixed field order.
Sourcepub fn diagnostics(&self) -> &[ViewDiagnostic]
pub fn diagnostics(&self) -> &[ViewDiagnostic]
Problems that prevented or qualified the comparison.
Trait Implementations§
Source§impl Clone for ViewDivergence
impl Clone for ViewDivergence
Source§impl Debug for ViewDivergence
impl Debug for ViewDivergence
Source§impl PartialEq for ViewDivergence
impl PartialEq for ViewDivergence
impl StructuralPartialEq for ViewDivergence
Auto Trait Implementations§
impl Freeze for ViewDivergence
impl RefUnwindSafe for ViewDivergence
impl Send for ViewDivergence
impl Sync for ViewDivergence
impl Unpin for ViewDivergence
impl UnsafeUnpin for ViewDivergence
impl UnwindSafe for ViewDivergence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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