pub struct StateDiff {
pub added_globals: BTreeMap<String, Value>,
pub removed_globals: BTreeMap<String, Value>,
pub changed_globals: BTreeMap<String, (Value, Value)>,
pub list_deltas: BTreeMap<String, ListDelta>,
pub turn_index: Option<(u32, u32)>,
pub pushed_frames: Vec<SnapshotFrame>,
pub popped_frames: Vec<SnapshotFrame>,
}Expand description
A pure diff between two StateSnapshots (see diff).
Fields§
§added_globals: BTreeMap<String, Value>Globals present in b but not a.
removed_globals: BTreeMap<String, Value>Globals present in a but not b.
changed_globals: BTreeMap<String, (Value, Value)>Globals whose value changed, mapped to (before, after).
list_deltas: BTreeMap<String, ListDelta>Per-list membership deltas for lists that changed, keyed by var name.
turn_index: Option<(u32, u32)>turn_index delta (before, after) if it changed.
pushed_frames: Vec<SnapshotFrame>Callstack frames pushed in b relative to a (by innermost-first
comparison): frames appended beyond the common prefix.
popped_frames: Vec<SnapshotFrame>Callstack frames popped in b relative to a.
Implementations§
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
impl StructuralPartialEq for StateDiff
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