Struct jopemachine_raft::raw_node::LightReady
source · pub struct LightReady { /* private fields */ }
Expand description
LightReady encapsulates the commit index, committed entries and messages that are ready to be applied or be sent to other peers.
Implementations§
source§impl LightReady
impl LightReady
sourcepub fn commit_index(&self) -> Option<u64>
pub fn commit_index(&self) -> Option<u64>
The current commit index. It will be None state if there is no update. It is not required to save it to stable storage.
sourcepub fn committed_entries(&self) -> &Vec<Entry>
pub fn committed_entries(&self) -> &Vec<Entry>
CommittedEntries specifies entries to be committed to a store/state-machine. These have previously been committed to stable store.
sourcepub fn take_committed_entries(&mut self) -> Vec<Entry>
pub fn take_committed_entries(&mut self) -> Vec<Entry>
Take the CommittedEntries.
sourcepub fn take_messages(&mut self) -> Vec<Message>
pub fn take_messages(&mut self) -> Vec<Message>
Take the Messages.
Trait Implementations§
source§impl Debug for LightReady
impl Debug for LightReady
source§impl Default for LightReady
impl Default for LightReady
source§fn default() -> LightReady
fn default() -> LightReady
Returns the “default value” for a type. Read more
source§impl PartialEq for LightReady
impl PartialEq for LightReady
impl StructuralPartialEq for LightReady
Auto Trait Implementations§
impl Freeze for LightReady
impl RefUnwindSafe for LightReady
impl Send for LightReady
impl Sync for LightReady
impl Unpin for LightReady
impl UnwindSafe for LightReady
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