pub struct InMemoryStateMachine {
pub state: HashMap<String, Bytes>,
pub version: u64,
}Fields§
§state: HashMap<String, Bytes>§version: u64Implementations§
Trait Implementations§
Source§impl Clone for InMemoryStateMachine
impl Clone for InMemoryStateMachine
Source§fn clone(&self) -> InMemoryStateMachine
fn clone(&self) -> InMemoryStateMachine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryStateMachine
impl Debug for InMemoryStateMachine
Source§impl Default for InMemoryStateMachine
impl Default for InMemoryStateMachine
Source§impl StateMachine for InMemoryStateMachine
impl StateMachine for InMemoryStateMachine
type State = HashMap<String, Bytes>
fn apply_command<'life0, 'life1, 'async_trait>(
&'life0 mut self,
command: &'life1 Command,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Snapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore_snapshot<'life0, 'life1, 'async_trait>(
&'life0 mut self,
snapshot: &'life1 Snapshot,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Self::State> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_commands<'life0, 'life1, 'async_trait>(
&'life0 mut self,
commands: &'life1 [Command],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_deterministic(&self) -> bool
Auto Trait Implementations§
impl Freeze for InMemoryStateMachine
impl RefUnwindSafe for InMemoryStateMachine
impl Send for InMemoryStateMachine
impl Sync for InMemoryStateMachine
impl Unpin for InMemoryStateMachine
impl UnwindSafe for InMemoryStateMachine
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