pub struct Entry<C>where
C: RaftTypeConfig,{
pub log_id: LogId<<C as RaftTypeConfig>::NodeId>,
pub payload: EntryPayload<C>,
}Expand description
A Raft log entry.
Fields§
§log_id: LogId<<C as RaftTypeConfig>::NodeId>§payload: EntryPayload<C>This entry’s payload.
Trait Implementations§
Source§impl<C> Debug for Entry<C>where
C: RaftTypeConfig,
impl<C> Debug for Entry<C>where
C: RaftTypeConfig,
Source§impl<C> Default for Entry<C>where
C: RaftTypeConfig,
impl<C> Default for Entry<C>where
C: RaftTypeConfig,
Source§impl<'de, C> Deserialize<'de> for Entry<C>where
C: RaftTypeConfig,
impl<'de, C> Deserialize<'de> for Entry<C>where
C: RaftTypeConfig,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Entry<C>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Entry<C>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C> Display for Entry<C>where
C: RaftTypeConfig,
impl<C> Display for Entry<C>where
C: RaftTypeConfig,
Source§impl<C> FromAppData<<C as RaftTypeConfig>::D> for Entry<C>where
C: RaftTypeConfig,
impl<C> FromAppData<<C as RaftTypeConfig>::D> for Entry<C>where
C: RaftTypeConfig,
Source§fn from_app_data(d: <C as RaftTypeConfig>::D) -> Entry<C>
fn from_app_data(d: <C as RaftTypeConfig>::D) -> Entry<C>
Build a raft log entry from app data.
Source§impl<C> MessageSummary<Entry<C>> for Entry<C>where
C: RaftTypeConfig,
impl<C> MessageSummary<Entry<C>> for Entry<C>where
C: RaftTypeConfig,
Source§impl<C> RaftEntry<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node> for Entry<C>where
C: RaftTypeConfig,
impl<C> RaftEntry<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node> for Entry<C>where
C: RaftTypeConfig,
Source§fn new_blank(log_id: LogId<<C as RaftTypeConfig>::NodeId>) -> Entry<C>
fn new_blank(log_id: LogId<<C as RaftTypeConfig>::NodeId>) -> Entry<C>
Create a new blank log entry. Read more
Source§fn new_membership(
log_id: LogId<<C as RaftTypeConfig>::NodeId>,
m: Membership<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node>,
) -> Entry<C>
fn new_membership( log_id: LogId<<C as RaftTypeConfig>::NodeId>, m: Membership<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node>, ) -> Entry<C>
Create a new membership log entry. Read more
Source§impl<C> RaftLogId<<C as RaftTypeConfig>::NodeId> for Entry<C>where
C: RaftTypeConfig,
impl<C> RaftLogId<<C as RaftTypeConfig>::NodeId> for Entry<C>where
C: RaftTypeConfig,
Source§fn get_log_id(&self) -> &LogId<<C as RaftTypeConfig>::NodeId>
fn get_log_id(&self) -> &LogId<<C as RaftTypeConfig>::NodeId>
Return a reference to the log-id it stores.
Source§fn set_log_id(&mut self, log_id: &LogId<<C as RaftTypeConfig>::NodeId>)
fn set_log_id(&mut self, log_id: &LogId<<C as RaftTypeConfig>::NodeId>)
Update the log id it contains.
Source§impl<C> RaftPayload<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node> for Entry<C>where
C: RaftTypeConfig,
impl<C> RaftPayload<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node> for Entry<C>where
C: RaftTypeConfig,
Source§fn get_membership(
&self,
) -> Option<&Membership<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node>>
fn get_membership( &self, ) -> Option<&Membership<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node>>
Return
Some(&Membership) if the entry payload is a membership payload.Source§impl<C> Serialize for Entry<C>where
C: RaftTypeConfig,
impl<C> Serialize for Entry<C>where
C: RaftTypeConfig,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<C> Freeze for Entry<C>
impl<C> RefUnwindSafe for Entry<C>where
<C as RaftTypeConfig>::D: RefUnwindSafe,
<C as RaftTypeConfig>::NodeId: RefUnwindSafe,
<C as RaftTypeConfig>::Node: RefUnwindSafe,
impl<C> Send for Entry<C>
impl<C> Sync for Entry<C>
impl<C> Unpin for Entry<C>
impl<C> UnsafeUnpin for Entry<C>
impl<C> UnwindSafe for Entry<C>where
<C as RaftTypeConfig>::D: UnwindSafe,
<C as RaftTypeConfig>::NodeId: UnwindSafe + RefUnwindSafe,
<C as RaftTypeConfig>::Node: RefUnwindSafe,
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more