pub struct SnapshotState {
pub last_included: LogId,
pub membership: Membership,
pub data: Vec<u8>,
}Expand description
A read-only view of this node’s most recent snapshot (Raft §7): its
boundary (term, index), the configuration in effect there, and the opaque
application bytes. Returned by RaftNode::stored_snapshot so a runtime can
persist the snapshot durably and purge the compacted log prefix (backlog
A6), and fed back to RaftNode::restore_with_snapshot on restart.
Fields§
§last_included: LogId(term, index) of the last log entry the snapshot includes.
membership: MembershipCluster configuration at the snapshot boundary (its config entry may have been compacted out of the log, so it travels with the snapshot).
data: Vec<u8>Opaque, application-encoded state-machine bytes.
Trait Implementations§
Source§impl Clone for SnapshotState
impl Clone for SnapshotState
Source§fn clone(&self) -> SnapshotState
fn clone(&self) -> SnapshotState
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 SnapshotState
impl Debug for SnapshotState
impl Eq for SnapshotState
Source§impl PartialEq for SnapshotState
impl PartialEq for SnapshotState
impl StructuralPartialEq for SnapshotState
Auto Trait Implementations§
impl Freeze for SnapshotState
impl RefUnwindSafe for SnapshotState
impl Send for SnapshotState
impl Sync for SnapshotState
impl Unpin for SnapshotState
impl UnsafeUnpin for SnapshotState
impl UnwindSafe for SnapshotState
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