pub struct StateMachine { /* private fields */ }Expand description
The replicated state machine.
Implementations§
Source§impl StateMachine
impl StateMachine
Sourcepub fn apply(&self, command: &Command, index: u64) -> CommandResult
pub fn apply(&self, command: &Command, index: u64) -> CommandResult
Apply a command to the state machine.
Sourcepub fn last_applied(&self) -> u64
pub fn last_applied(&self) -> u64
Get the last applied index.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StateMachine
impl RefUnwindSafe for StateMachine
impl Send for StateMachine
impl Sync for StateMachine
impl Unpin for StateMachine
impl UnwindSafe for StateMachine
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