pub struct SemanticDiff {
pub current_snapshot_id: Option<String>,
pub restored_snapshot_id: Option<String>,
pub changes: Vec<SemanticChange>,
}Expand description
Full semantic diff from current state to candidate restored state.
Fields§
§current_snapshot_id: Option<String>Snapshot id of the pre-restore (current) state.
restored_snapshot_id: Option<String>Snapshot id of the candidate restored state.
changes: Vec<SemanticChange>Ordered list of semantic changes detected.
Implementations§
Source§impl SemanticDiff
impl SemanticDiff
Sourcepub fn between(current: &SemanticSnapshot, restored: &SemanticSnapshot) -> Self
pub fn between(current: &SemanticSnapshot, restored: &SemanticSnapshot) -> Self
Compute the diff between current and restored snapshots.
Sourcepub fn severity(&self) -> SemanticSeverity
pub fn severity(&self) -> SemanticSeverity
Returns the highest severity across all changes, or Clean when there are none.
Sourcepub fn restore_decision(&self, recovery_acknowledged: bool) -> RestoreDecision
pub fn restore_decision(&self, recovery_acknowledged: bool) -> RestoreDecision
Derives a restore decision from this diff given the operator’s acknowledgement flag.
Trait Implementations§
Source§impl Clone for SemanticDiff
impl Clone for SemanticDiff
Source§fn clone(&self) -> SemanticDiff
fn clone(&self) -> SemanticDiff
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticDiff
impl Debug for SemanticDiff
Source§impl Default for SemanticDiff
impl Default for SemanticDiff
Source§fn default() -> SemanticDiff
fn default() -> SemanticDiff
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SemanticDiff
impl<'de> Deserialize<'de> for SemanticDiff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SemanticDiff
impl PartialEq for SemanticDiff
Source§fn eq(&self, other: &SemanticDiff) -> bool
fn eq(&self, other: &SemanticDiff) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SemanticDiff
impl Serialize for SemanticDiff
impl Eq for SemanticDiff
impl StructuralPartialEq for SemanticDiff
Auto Trait Implementations§
impl Freeze for SemanticDiff
impl RefUnwindSafe for SemanticDiff
impl Send for SemanticDiff
impl Sync for SemanticDiff
impl Unpin for SemanticDiff
impl UnsafeUnpin for SemanticDiff
impl UnwindSafe for SemanticDiff
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