pub struct StateMutation {
pub sequence: u64,
pub key: String,
pub old: Option<Value>,
pub new: Option<Value>,
pub origin: StateMutationOrigin,
pub timestamp: SystemTime,
pub delta: bool,
}Expand description
A single state mutation recorded in the bounded mutation journal.
Serializes to/from JSON for durable journaling (see JournalSink);
timestamp is encoded as integer milliseconds since the Unix epoch.
Fields§
§sequence: u64Monotonic sequence number assigned when the mutation was recorded.
key: StringState key that changed.
old: Option<Value>Value before the mutation, or None when the key did not exist.
new: Option<Value>Value after the mutation, or None when the key was removed.
origin: StateMutationOriginOperation that recorded the mutation.
timestamp: SystemTimeWall-clock time at which the mutation was recorded.
Serialized as milliseconds since the Unix epoch (timestamp_ms).
delta: boolWhether the mutation was written to a delta-tracked view.
Trait Implementations§
Source§impl Clone for StateMutation
impl Clone for StateMutation
Source§fn clone(&self) -> StateMutation
fn clone(&self) -> StateMutation
Returns a duplicate of the value. Read more
1.0.0 · 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 StateMutation
impl Debug for StateMutation
Source§impl<'de> Deserialize<'de> for StateMutation
impl<'de> Deserialize<'de> for StateMutation
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 StateMutation
impl PartialEq for StateMutation
Source§impl Serialize for StateMutation
impl Serialize for StateMutation
impl StructuralPartialEq for StateMutation
Auto Trait Implementations§
impl Freeze for StateMutation
impl RefUnwindSafe for StateMutation
impl Send for StateMutation
impl Sync for StateMutation
impl Unpin for StateMutation
impl UnwindSafe for StateMutation
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