pub struct MemStore { /* private fields */ }
Expand description

An in-memory storage system implementing the RaftStorage trait.

Implementations

Create a new MemStore instance. TODO(xp): creating a store should not require an id.

Trait Implementations

The storage engine’s associated type used for exposing a snapshot for reading & writing. Read more
Get a series of log entries from storage. Read more
Returns the last deleted log id and the last log id. Read more
Returns the last applied log id which is recorded in state machine, and the last applied membership log id and membership config. Read more
Delete conflict log entries since log_id, inclusive.
Delete applied log entries upto log_id, inclusive.
Append a payload of entries to the log. Read more
Apply the given payload of entries to the state machine. Read more
Build snapshot Read more
Create a new blank snapshot, returning a writable handle to the snapshot object. Read more
Install a snapshot which has finished streaming from the cluster leader. Read more
Get a readable handle to the current snapshot, along with its metadata. Read more

Get a handle to the state machine for testing purposes.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more