pub struct DurableState<S> {
pub replica_id: ReplicaId,
pub state: S,
pub counter: SeqNo,
}Expand description
Durable state that survives crashes
This must be persisted to stable storage before acknowledging any mutation or received delta.
Fields§
§replica_id: ReplicaIdThe replica’s unique identifier
state: SThe current CRDT state
counter: SeqNoThe durable counter (last generated sequence number)
Implementations§
Trait Implementations§
Source§impl<S: Clone> Clone for DurableState<S>
impl<S: Clone> Clone for DurableState<S>
Source§fn clone(&self) -> DurableState<S>
fn clone(&self) -> DurableState<S>
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<S: Debug> Debug for DurableState<S>
impl<S: Debug> Debug for DurableState<S>
Source§impl<'de, S> Deserialize<'de> for DurableState<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for DurableState<S>where
S: Deserialize<'de>,
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<S> Freeze for DurableState<S>where
S: Freeze,
impl<S> RefUnwindSafe for DurableState<S>where
S: RefUnwindSafe,
impl<S> Send for DurableState<S>where
S: Send,
impl<S> Sync for DurableState<S>where
S: Sync,
impl<S> Unpin for DurableState<S>where
S: Unpin,
impl<S> UnwindSafe for DurableState<S>where
S: UnwindSafe,
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