pub struct Promise<T>where
T: Entry,{
pub n: Ballot,
pub n_accepted: Ballot,
pub decided_snapshot: Option<SnapshotType<T>>,
pub suffix: Vec<T>,
pub decided_idx: u64,
pub accepted_idx: u64,
pub stopsign: Option<StopSign>,
}
Expand description
Promise message sent by a follower in response to a Prepare
sent by the leader.
Fields§
§n: Ballot
The current round.
n_accepted: Ballot
The latest round in which an entry was accepted.
decided_snapshot: Option<SnapshotType<T>>
The decided snapshot.
suffix: Vec<T>
The log suffix.
decided_idx: u64
The decided index of this follower.
accepted_idx: u64
The log length of this follower.
stopsign: Option<StopSign>
The StopSign accepted by this follower
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Promise<T>where
T: Entry + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Promise<T>where
T: Entry + Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for Promise<T>
impl<T> RefUnwindSafe for Promise<T>
impl<T> Send for Promise<T>
impl<T> Sync for Promise<T>
impl<T> Unpin for Promise<T>
impl<T> UnwindSafe for Promise<T>
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