pub struct Entry {
pub term: u64,
pub index: u64,
pub app_data: Option<SetRequest>,
pub membership: Option<Membership>,
}Fields§
§term: u64§index: u64§app_data: Option<SetRequest>Optional Application data.
membership: Option<Membership>Optional Membership config.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
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 Message for Entry
impl Message for Entry
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl RaftEntry<TypeConfig> for Entry
impl RaftEntry<TypeConfig> for Entry
Source§fn new(log_id: LogIdOf<TypeConfig>, payload: EntryPayload<TypeConfig>) -> Self
fn new(log_id: LogIdOf<TypeConfig>, payload: EntryPayload<TypeConfig>) -> Self
Create a new log entry with log id and payload of application data or membership config. Read more
Source§fn log_id_parts(&self) -> (&u64, u64)
fn log_id_parts(&self) -> (&u64, u64)
Returns references to the components of this entry’s log ID: the committed leader ID and
index. Read more
Source§fn set_log_id(&mut self, new: LogIdOf<TypeConfig>)
fn set_log_id(&mut self, new: LogIdOf<TypeConfig>)
Set the log ID of this entry. Read more
Source§fn new_blank(log_id: LogId<C>) -> Selfwhere
Self: Sized + Final,
fn new_blank(log_id: LogId<C>) -> Selfwhere
Self: Sized + Final,
Create a new blank log entry. Read more
Source§fn new_normal(log_id: LogId<C>, data: <C as RaftTypeConfig>::D) -> Selfwhere
Self: Sized + Final,
fn new_normal(log_id: LogId<C>, data: <C as RaftTypeConfig>::D) -> Selfwhere
Self: Sized + Final,
Create a new normal log entry that contains application data. Read more
Source§fn new_membership(log_id: LogId<C>, m: Membership<C>) -> Selfwhere
Self: Sized + Final,
fn new_membership(log_id: LogId<C>, m: Membership<C>) -> Selfwhere
Self: Sized + Final,
Create a new membership log entry. Read more
Source§impl RaftPayload<TypeConfig> for Entry
impl RaftPayload<TypeConfig> for Entry
Source§fn get_membership(&self) -> Option<Membership<TypeConfig>>
fn get_membership(&self) -> Option<Membership<TypeConfig>>
Return
Some(Membership) if the entry payload contains a membership payload.impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request