[][src]Struct memstore::MemStore

pub struct MemStore { /* fields omitted */ }

An in-memory storage system implementing the async_raft::RaftStorage trait.

Implementations

impl MemStore[src]

pub fn new(id: NodeId) -> Self[src]

Create a new MemStore instance.

pub async fn get_log<'a>(
    &'a self
) -> RwLockWriteGuard<'a, BTreeMap<u64, Entry<ClientRequest>>>
[src]

Get a handle to the log for testing purposes.

pub async fn get_state_machine<'a>(
    &'a self
) -> RwLockWriteGuard<'a, MemStoreStateMachine>
[src]

Get a handle to the state machine for testing purposes.

pub async fn read_hard_state<'a>(
    &'a self
) -> RwLockReadGuard<'a, Option<HardState>>
[src]

Get a handle to the current hard state for testing purposes.

Trait Implementations

impl RaftStorage<ClientRequest, ClientResponse> for MemStore[src]

type Snapshot = Cursor<Vec<u8>>

The storage engine's associated type used for exposing a snapshot for reading & writing.

Auto Trait Implementations

impl !RefUnwindSafe for MemStore

impl Send for MemStore

impl Sync for MemStore

impl Unpin for MemStore

impl UnwindSafe for MemStore

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]