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<NID: PartialEq + NodeId> PartialEq<Vote<NID>> for Vote<NID>
impl<NID: PartialEq + NodeId> PartialEq<Vote<NID>> for Vote<NID>
source§impl<NID: NodeId> PartialOrd<Vote<NID>> for Vote<NID>
impl<NID: NodeId> PartialOrd<Vote<NID>> 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> StructuralEq for Vote<NID>
impl<NID: NodeId> StructuralPartialEq for Vote<NID>
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.