pub struct Vote<NID: NodeId> {
pub leader_id: LeaderId<NID>,
pub committed: bool,
}
Expand description
Vote
represent the privilege of a node.
Fields§
§leader_id: LeaderId<NID>
The id of the node that tries to become the leader.
committed: bool
Implementations§
Trait Implementations§
source§impl<'de, NID: NodeId> Deserialize<'de> for Vote<NID>
impl<'de, NID: NodeId> Deserialize<'de> for Vote<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: PartialEq + NodeId> PartialEq for Vote<NID>
impl<NID: PartialEq + NodeId> PartialEq for Vote<NID>
source§impl<NID: NodeId> PartialOrd for Vote<NID>
impl<NID: NodeId> PartialOrd for Vote<NID>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<NID: Copy + NodeId> Copy for Vote<NID>
impl<NID: Eq + NodeId> Eq for Vote<NID>
impl<NID: NodeId> StructuralPartialEq for Vote<NID>
Auto Trait Implementations§
impl<NID> Freeze for Vote<NID>where
NID: Freeze,
impl<NID> RefUnwindSafe for Vote<NID>where
NID: RefUnwindSafe,
impl<NID> Send for Vote<NID>
impl<NID> Sync for Vote<NID>
impl<NID> Unpin for Vote<NID>where
NID: Unpin,
impl<NID> UnwindSafe for Vote<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