Struct raft_consensus::state_machine::channel::ChannelStateMachine [−][src]
pub struct ChannelStateMachine { /* fields omitted */ }
A state machine that simply redirects all commands to a channel.
This state machine is chiefly meant for testing.
Methods
impl ChannelStateMachine
[src]
impl ChannelStateMachine
Trait Implementations
impl StateMachine for ChannelStateMachine
[src]
impl StateMachine for ChannelStateMachine
fn apply(&mut self, command: &[u8]) -> Vec<u8>
[src]
fn apply(&mut self, command: &[u8]) -> Vec<u8>
Applies a command to the state machine. Returns an application-specific result value. Read more
fn query(&self, _query: &[u8]) -> Vec<u8>
[src]
fn query(&self, _query: &[u8]) -> Vec<u8>
Queries a value of the state machine. Does not go through the durable log, or mutate the state machine. Returns an application-specific result value. Read more
fn snapshot(&self) -> Vec<u8>
[src]
fn snapshot(&self) -> Vec<u8>
Take a snapshot of the state machine.
fn restore_snapshot(&mut self, _snapshot: Vec<u8>)
[src]
fn restore_snapshot(&mut self, _snapshot: Vec<u8>)
Restore a snapshot of the state machine.
impl Debug for ChannelStateMachine
[src]
impl Debug for ChannelStateMachine
Auto Trait Implementations
impl Send for ChannelStateMachine
impl Send for ChannelStateMachine
impl !Sync for ChannelStateMachine
impl !Sync for ChannelStateMachine