Struct openraft::storage::SnapshotMeta
source · pub struct SnapshotMeta<NID, N>{
pub last_log_id: Option<LogId<NID>>,
pub last_membership: StoredMembership<NID, N>,
pub snapshot_id: SnapshotId,
}
Expand description
The metadata of a snapshot.
Including the last log id that included in this snapshot, the last membership included, and a snapshot id.
Fields§
§last_log_id: Option<LogId<NID>>
Log entries upto which this snapshot includes, inclusive.
last_membership: StoredMembership<NID, N>
The last applied membership config.
snapshot_id: SnapshotId
To identify a snapshot when transferring.
Caveat: even when two snapshot is built with the same last_log_id
, they still could be
different in bytes.
Implementations§
source§impl<NID, N> SnapshotMeta<NID, N>
impl<NID, N> SnapshotMeta<NID, N>
pub fn signature(&self) -> SnapshotSignature<NID>
sourcepub fn last_log_id(&self) -> Option<&LogId<NID>>
pub fn last_log_id(&self) -> Option<&LogId<NID>>
Returns a ref to the id of the last log that is included in this snasphot.
Trait Implementations§
source§impl<NID, N> Clone for SnapshotMeta<NID, N>
impl<NID, N> Clone for SnapshotMeta<NID, N>
source§fn clone(&self) -> SnapshotMeta<NID, N>
fn clone(&self) -> SnapshotMeta<NID, N>
Returns a copy 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<NID, N> Debug for SnapshotMeta<NID, N>
impl<NID, N> Debug for SnapshotMeta<NID, N>
source§impl<NID, N> Default for SnapshotMeta<NID, N>
impl<NID, N> Default for SnapshotMeta<NID, N>
source§fn default() -> SnapshotMeta<NID, N>
fn default() -> SnapshotMeta<NID, N>
Returns the “default value” for a type. Read more
source§impl<'de, NID, N> Deserialize<'de> for SnapshotMeta<NID, N>
impl<'de, NID, N> Deserialize<'de> for SnapshotMeta<NID, N>
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<NID, N> Display for SnapshotMeta<NID, N>
impl<NID, N> Display for SnapshotMeta<NID, N>
source§impl<NID, N> MessageSummary<SnapshotMeta<NID, N>> for SnapshotMeta<NID, N>
impl<NID, N> MessageSummary<SnapshotMeta<NID, N>> for SnapshotMeta<NID, N>
source§impl<NID, N> PartialEq for SnapshotMeta<NID, N>
impl<NID, N> PartialEq for SnapshotMeta<NID, N>
source§impl<NID, N> Serialize for SnapshotMeta<NID, N>
impl<NID, N> Serialize for SnapshotMeta<NID, N>
impl<NID, N> Eq for SnapshotMeta<NID, N>
impl<NID, N> StructuralPartialEq for SnapshotMeta<NID, N>
Auto Trait Implementations§
impl<NID, N> Freeze for SnapshotMeta<NID, N>where
NID: Freeze,
impl<NID, N> RefUnwindSafe for SnapshotMeta<NID, N>where
NID: RefUnwindSafe,
N: RefUnwindSafe,
impl<NID, N> Send for SnapshotMeta<NID, N>
impl<NID, N> Sync for SnapshotMeta<NID, N>
impl<NID, N> Unpin for SnapshotMeta<NID, N>where
NID: Unpin,
impl<NID, N> UnwindSafe for SnapshotMeta<NID, N>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)