pub struct VoteRequest {
pub term: RaftTerm,
pub candidate_id: NodeId,
pub last_log_index: u64,
pub last_log_term: RaftTerm,
}Expand description
A request to vote for a candidate in a Raft election.
Fields§
§term: RaftTermThe candidate’s current term.
candidate_id: NodeIdThe candidate’s node ID.
last_log_index: u64Index of the candidate’s last log entry.
last_log_term: RaftTermTerm of the candidate’s last log entry.
Trait Implementations§
Source§impl Clone for VoteRequest
impl Clone for VoteRequest
Source§fn clone(&self) -> VoteRequest
fn clone(&self) -> VoteRequest
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 VoteRequest
impl Debug for VoteRequest
Source§impl<'de> Deserialize<'de> for VoteRequest
impl<'de> Deserialize<'de> for VoteRequest
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
Auto Trait Implementations§
impl Freeze for VoteRequest
impl RefUnwindSafe for VoteRequest
impl Send for VoteRequest
impl Sync for VoteRequest
impl Unpin for VoteRequest
impl UnsafeUnpin for VoteRequest
impl UnwindSafe for VoteRequest
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,
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> 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