Struct openraft::storage::SnapshotMeta
source · pub struct SnapshotMeta<NID, N>where
NID: NodeId,
N: Node,{
pub last_log_id: Option<LogId<NID>>,
pub last_membership: StoredMembership<NID, N>,
pub snapshot_id: SnapshotId,
}
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>where
NID: NodeId,
N: Node,
impl<NID, N> SnapshotMeta<NID, N>where NID: NodeId, N: Node,
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>where
NID: NodeId + Clone,
N: Node + Clone,
impl<NID, N> Clone for SnapshotMeta<NID, N>where NID: NodeId + Clone, N: Node + Clone,
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> Default for SnapshotMeta<NID, N>where
NID: NodeId + Default,
N: Node + Default,
impl<NID, N> Default for SnapshotMeta<NID, N>where NID: NodeId + Default, N: Node + Default,
source§fn default() -> SnapshotMeta<NID, N>
fn default() -> SnapshotMeta<NID, N>
Returns the “default value” for a type. Read more
source§impl<NID, N> MessageSummary<SnapshotMeta<NID, N>> for SnapshotMeta<NID, N>where
NID: NodeId,
N: Node,
impl<NID, N> MessageSummary<SnapshotMeta<NID, N>> for SnapshotMeta<NID, N>where NID: NodeId, N: Node,
source§impl<NID, N> PartialEq<SnapshotMeta<NID, N>> for SnapshotMeta<NID, N>where
NID: NodeId + PartialEq,
N: Node + PartialEq,
impl<NID, N> PartialEq<SnapshotMeta<NID, N>> for SnapshotMeta<NID, N>where NID: NodeId + PartialEq, N: Node + PartialEq,
source§fn eq(&self, other: &SnapshotMeta<NID, N>) -> bool
fn eq(&self, other: &SnapshotMeta<NID, N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<NID, N> Eq for SnapshotMeta<NID, N>where NID: NodeId + Eq, N: Node + Eq,
impl<NID, N> StructuralEq for SnapshotMeta<NID, N>where NID: NodeId, N: Node,
impl<NID, N> StructuralPartialEq for SnapshotMeta<NID, N>where NID: NodeId, N: Node,
Auto Trait Implementations§
impl<NID, N> RefUnwindSafe for SnapshotMeta<NID, N>where N: RefUnwindSafe, NID: 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>where N: RefUnwindSafe, NID: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.