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: NodeId> PartialOrd for Vote<NID>
impl<NID: NodeId> PartialOrd for Vote<NID>
impl<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