pub struct RequestVoteResponse {
pub term: Term,
pub vote_granted: bool,
}Expand description
RequestVote RPC response
Fields§
§term: TermCurrent term, for candidate to update itself
vote_granted: boolTrue means candidate received vote
Implementations§
Source§impl RequestVoteResponse
impl RequestVoteResponse
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
Deserialize from bytes
Trait Implementations§
Source§impl Clone for RequestVoteResponse
impl Clone for RequestVoteResponse
Source§fn clone(&self) -> RequestVoteResponse
fn clone(&self) -> RequestVoteResponse
Returns a duplicate 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 Debug for RequestVoteResponse
impl Debug for RequestVoteResponse
Source§impl<'de> Deserialize<'de> for RequestVoteResponse
impl<'de> Deserialize<'de> for RequestVoteResponse
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 RequestVoteResponse
impl RefUnwindSafe for RequestVoteResponse
impl Send for RequestVoteResponse
impl Sync for RequestVoteResponse
impl Unpin for RequestVoteResponse
impl UnwindSafe for RequestVoteResponse
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