Struct raft::raw_node::Ready [−][src]
Ready encapsulates the entries and messages that are ready to read, be saved to stable storage, committed or sent to other peers.
Implementations
impl Ready
[src]
pub fn number(&self) -> u64
[src]
The number of current Ready. It is used for identifying the different Ready and ReadyRecord.
pub fn ss(&self) -> Option<&SoftState>
[src]
The current volatile state of a Node. SoftState will be None 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. HardState will be None state if there is no update.
pub fn read_states(&self) -> &Vec<ReadState>
[src]
ReadStates specifies the state for read only query.
pub fn take_read_states(&mut self) -> Vec<ReadState>
[src]
Take the ReadStates.
pub fn entries(&self) -> &Vec<Entry>
[src]
Entries specifies entries to be saved to stable storage.
pub fn take_entries(&mut self) -> Vec<Entry>
[src]
Take the Entries.
pub fn snapshot(&self) -> &Snapshot
[src]
Snapshot specifies the snapshot to be saved to stable storage.
pub fn committed_entries(&self) -> &Vec<Entry>
[src]
CommittedEntries specifies entries to be committed to a store/state-machine. These have previously been committed to stable store.
pub fn take_committed_entries(&mut self) -> Vec<Entry>
[src]
Take the CommitEntries.
pub fn messages(&self) -> &[Message]
[src]
Messages specifies outbound messages to be sent. 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.
pub fn take_messages(&mut self) -> Vec<Message>
[src]
Take the Messages.
pub fn persisted_messages(&self) -> &[Message]
[src]
Persisted Messages specifies outbound messages to be sent AFTER the HardState, Entries and Snapshot are persisted to stable storage.
pub fn take_persisted_messages(&mut self) -> Vec<Message>
[src]
Take the Persisted Messages.
pub fn must_sync(&self) -> bool
[src]
MustSync is false if and only if
- no HardState or only its commit is different from before
- no Entries and Snapshot
If it’s false, an asynchronous write of HardState is permissible before calling
on_persist_ready
oradvance
or its families.
Trait Implementations
impl Debug for Ready
[src]
impl Default for Ready
[src]
impl PartialEq<Ready> for Ready
[src]
impl StructuralPartialEq for Ready
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ready
impl Send for Ready
impl Sync for Ready
impl Unpin for Ready
impl UnwindSafe for Ready
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,