pub struct StateDiff {
pub changes: Vec<FieldChange>,
}Expand description
Diff between two runtime states.
Fields§
§changes: Vec<FieldChange>Fields that changed.
Implementations§
Source§impl StateDiff
impl StateDiff
Sourcepub fn diff(old: &RuntimeState, new: &RuntimeState) -> Self
pub fn diff(old: &RuntimeState, new: &RuntimeState) -> Self
Calculate diff between two states.
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are any changes.
Sourcepub fn change_count(&self) -> usize
pub fn change_count(&self) -> usize
Get number of changes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StateDiff
impl<'de> Deserialize<'de> for StateDiff
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
Auto Trait Implementations§
impl Freeze for StateDiff
impl RefUnwindSafe for StateDiff
impl Send for StateDiff
impl Sync for StateDiff
impl Unpin for StateDiff
impl UnsafeUnpin for StateDiff
impl UnwindSafe for StateDiff
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