[−][src]Struct raft::raw_node::Ready
Ready encapsulates the entries and messages that are ready to read, be saved to stable storage, committed or sent to other peers. All fields in Ready are read-only.
Fields
committed_entries: Option<Vec<Entry>>
CommittedEntries specifies entries to be committed to a store/state-machine. These have previously been committed to stable store.
messages: Vec<Message>
Messages specifies outbound messages to be sent AFTER Entries are committed to stable storage. If it contains a MsgSnap message, the application MUST report back to raft when the snapshot has been received or has failed by calling ReportSnapshot.
Methods
impl Ready
[src]
pub fn ss(&self) -> Option<&SoftState>
[src]
The current volatile state of a Node. SoftState will be nil if there is no update. It is not required to consume or store SoftState.
pub fn hs(&self) -> Option<&HardState>
[src]
The current state of a Node to be saved to stable storage BEFORE Messages are sent. HardState will be equal to empty state if there is no update.
pub fn read_states(&self) -> &[ReadState]
[src]
States can be used for node to serve linearizable read requests locally when its applied index is greater than the index in ReadState. Note that the read_state will be returned when raft receives MsgReadIndex. The returned is only valid for the request that requested to read.
pub fn entries(&self) -> &[Entry]
[src]
Entries specifies entries to be saved to stable storage BEFORE Messages are sent.
pub fn snapshot(&self) -> &Snapshot
[src]
Snapshot specifies the snapshot to be saved to stable storage.
pub fn must_sync(&self) -> bool
[src]
MustSync indicates whether the HardState and Entries must be synchronously written to disk or if an asynchronous write is permissible.
Trait Implementations
Auto Trait Implementations
impl Unpin for Ready
impl Sync for Ready
impl Send for Ready
impl UnwindSafe for Ready
impl RefUnwindSafe for Ready
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,