pub struct State {
pub term: Term,
pub voted_for: Option<NodeId>,
pub commit_index: LogIndex,
pub snapshot_index: LogIndex,
pub snapshot_term: Term,
}Fields§
§term: Term§voted_for: Option<NodeId>§commit_index: LogIndex§snapshot_index: LogIndex§snapshot_term: TermImplementations§
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
impl<T> Allocation for T
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