pub struct ClientRequest {
    pub client: String,
    pub serial: u64,
    pub status: String,
}
Expand description

The application data request type which the MemStore works with.

Conceptually, for demo purposes, this represents an update to a client’s status info, returning the previously recorded status.

Fields

client: String

The ID of the client which has sent the request.

serial: u64

The serial number of this request.

status: String

A string describing the status of the client. For a real application, this should probably be an enum representing all of the various types of requests / operations which a client can perform.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

The storage engine’s associated type used for exposing a snapshot for reading & writing. Read more

Get the latest membership config found in the log or in state machine. Read more

Get Raft’s state information from storage. Read more

Save Raft’s hard-state. Read more

Get a series of log entries from storage. Read more

Get a series of log entries from storage. Read more

source

fn try_get_log_entry<'life0, 'async_trait>(
    &'life0 self,
    log_index: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Entry<ClientRequest>>, StorageError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Try to get an log entry. It does not return an error if in defensive mode and the log entry at log_index is not found. Read more

Returns the first log id in log. Read more

Returns the last log id in log. 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 all logs in a range.

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

Serialize this value into the given Serde serializer. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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