pub struct IncrementalSnapshotState {
pub base_state: Option<State>,
pub pending_deltas: Vec<StateDelta>,
pub compact_threshold: usize,
}Expand description
增量快照运行时状态。
Fields§
§base_state: Option<State>§pending_deltas: Vec<StateDelta>§compact_threshold: usizeImplementations§
Source§impl IncrementalSnapshotState
impl IncrementalSnapshotState
pub fn new(compact_threshold: usize) -> Self
pub fn record_delta(&mut self, delta: StateDelta)
pub fn record_deltas(&mut self, deltas: Vec<StateDelta>)
pub fn snapshot( &mut self, current_state: &State, ) -> (Option<State>, Vec<StateDelta>, State)
pub fn from_checkpoint(checkpoint: &Checkpoint) -> Self
pub fn clear_pending(&mut self)
Trait Implementations§
Source§impl Clone for IncrementalSnapshotState
impl Clone for IncrementalSnapshotState
Source§fn clone(&self) -> IncrementalSnapshotState
fn clone(&self) -> IncrementalSnapshotState
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 IncrementalSnapshotState
impl Debug for IncrementalSnapshotState
Source§impl Default for IncrementalSnapshotState
impl Default for IncrementalSnapshotState
Source§fn default() -> IncrementalSnapshotState
fn default() -> IncrementalSnapshotState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IncrementalSnapshotState
impl RefUnwindSafe for IncrementalSnapshotState
impl Send for IncrementalSnapshotState
impl Sync for IncrementalSnapshotState
impl Unpin for IncrementalSnapshotState
impl UnsafeUnpin for IncrementalSnapshotState
impl UnwindSafe for IncrementalSnapshotState
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