Struct openraft::raft::VoteResponse
source · pub struct VoteResponse<NID: NodeId> {
pub vote: Vote<NID>,
pub vote_granted: bool,
pub last_log_id: Option<LogId<NID>>,
}
Expand description
The response to a VoteRequest
.
Fields§
§vote: Vote<NID>
vote after a node handling vote-request.
Thus resp.vote >= req.vote
always holds.
vote_granted: bool
Will be true if the candidate received a vote from the responder.
last_log_id: Option<LogId<NID>>
The last log id stored on the remote voter.
Trait Implementations§
source§impl<NID: Clone + NodeId> Clone for VoteResponse<NID>
impl<NID: Clone + NodeId> Clone for VoteResponse<NID>
source§fn clone(&self) -> VoteResponse<NID>
fn clone(&self) -> VoteResponse<NID>
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<'de, NID: NodeId> Deserialize<'de> for VoteResponse<NID>
impl<'de, NID: NodeId> Deserialize<'de> for VoteResponse<NID>
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: NodeId> MessageSummary<VoteResponse<NID>> for VoteResponse<NID>
impl<NID: NodeId> MessageSummary<VoteResponse<NID>> for VoteResponse<NID>
source§impl<NID: PartialEq + NodeId> PartialEq for VoteResponse<NID>
impl<NID: PartialEq + NodeId> PartialEq for VoteResponse<NID>
source§fn eq(&self, other: &VoteResponse<NID>) -> bool
fn eq(&self, other: &VoteResponse<NID>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<NID: NodeId> Serialize for VoteResponse<NID>
impl<NID: NodeId> Serialize for VoteResponse<NID>
impl<NID: Eq + NodeId> Eq for VoteResponse<NID>
impl<NID: NodeId> StructuralPartialEq for VoteResponse<NID>
Auto Trait Implementations§
impl<NID> Freeze for VoteResponse<NID>where
NID: Freeze,
impl<NID> RefUnwindSafe for VoteResponse<NID>where
NID: RefUnwindSafe,
impl<NID> Send for VoteResponse<NID>
impl<NID> Sync for VoteResponse<NID>
impl<NID> Unpin for VoteResponse<NID>where
NID: Unpin,
impl<NID> UnwindSafe for VoteResponse<NID>where
NID: UnwindSafe,
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