pub struct TimeoutNow {
pub term: Term,
pub leader: NodeId,
}Expand description
A leader’s signal telling target to start an election immediately.
Sent during a leadership transfer: once the target is fully caught up, the leader sends this so the target campaigns at once instead of waiting out its election timeout, taking over with minimal disruption.
§Examples
use raft_io::TimeoutNow;
let rpc = TimeoutNow { term: 5, leader: 1 };
assert_eq!(rpc.leader, 1);Fields§
§term: TermThe leader’s term.
leader: NodeIdThe leader handing off leadership.
Trait Implementations§
Source§impl Clone for TimeoutNow
impl Clone for TimeoutNow
Source§fn clone(&self) -> TimeoutNow
fn clone(&self) -> TimeoutNow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TimeoutNow
impl Debug for TimeoutNow
Source§impl Deserialize for TimeoutNow
impl Deserialize for TimeoutNow
impl Eq for TimeoutNow
Source§impl PartialEq for TimeoutNow
impl PartialEq for TimeoutNow
Source§fn eq(&self, other: &TimeoutNow) -> bool
fn eq(&self, other: &TimeoutNow) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TimeoutNow
impl Serialize for TimeoutNow
impl StructuralPartialEq for TimeoutNow
Auto Trait Implementations§
impl Freeze for TimeoutNow
impl RefUnwindSafe for TimeoutNow
impl Send for TimeoutNow
impl Sync for TimeoutNow
impl Unpin for TimeoutNow
impl UnsafeUnpin for TimeoutNow
impl UnwindSafe for TimeoutNow
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