Struct agreed_memstore::ClientRequest [−][src]
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
impl Clone for ClientRequest
[src]
impl Clone for ClientRequest
[src]fn clone(&self) -> ClientRequest
[src]
fn clone(&self) -> ClientRequest
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ClientRequest
[src]
impl Debug for ClientRequest
[src]impl<'de> Deserialize<'de> for ClientRequest
[src]
impl<'de> Deserialize<'de> for ClientRequest
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl RaftStorage<ClientRequest, ClientResponse> for MemStore
[src]
impl RaftStorage<ClientRequest, ClientResponse> for MemStore
[src]type Snapshot = Cursor<Vec<u8>>
type Snapshot = Cursor<Vec<u8>>
The storage engine’s associated type used for exposing a snapshot for reading & writing. Read more
type ShutdownError = ShutdownError
type ShutdownError = ShutdownError
The error type used to indicate to Raft that shutdown is needed when calling the
apply_entry_to_state_machine
method. Read more
fn get_membership_config<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<MembershipConfig>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn get_membership_config<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<MembershipConfig>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Get the latest membership config found in the log. Read more
fn get_initial_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<InitialState>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn get_initial_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<InitialState>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Get Raft’s state information from storage. Read more
fn save_hard_state<'life0, 'life1, 'async_trait>(
&'life0 self,
hs: &'life1 HardState
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
fn save_hard_state<'life0, 'life1, 'async_trait>(
&'life0 self,
hs: &'life1 HardState
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Save Raft’s hard-state. Read more
fn get_log_entries<'life0, 'async_trait>(
&'life0 self,
start: u64,
stop: u64
) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<ClientRequest>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn get_log_entries<'life0, 'async_trait>(
&'life0 self,
start: u64,
stop: u64
) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<ClientRequest>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Get a series of log entries from storage. Read more
fn delete_logs_from<'life0, 'async_trait>(
&'life0 self,
start: u64,
stop: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn delete_logs_from<'life0, 'async_trait>(
&'life0 self,
start: u64,
stop: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Delete all logs starting from start
and stopping at stop
, else continuing to the end
of the log if stop
is None
. Read more
fn append_entry_to_log<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 Entry<ClientRequest>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
fn append_entry_to_log<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 Entry<ClientRequest>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Append a new entry to the log. Read more
fn replicate_to_log<'life0, 'life1, 'async_trait>(
&'life0 self,
entries: &'life1 [Entry<ClientRequest>]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
fn replicate_to_log<'life0, 'life1, 'async_trait>(
&'life0 self,
entries: &'life1 [Entry<ClientRequest>]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Replicate a payload of entries to the log. Read more
fn apply_entry_to_state_machine<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
index: &'life1 u64,
data: &'life2 ClientRequest
) -> Pin<Box<dyn Future<Output = Result<ClientResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
fn apply_entry_to_state_machine<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
index: &'life1 u64,
data: &'life2 ClientRequest
) -> Pin<Box<dyn Future<Output = Result<ClientResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]Apply the given log entry to the state machine. Read more
fn replicate_to_state_machine<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entries: &'life1 [(&'life2 u64, &'life3 ClientRequest)]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
fn replicate_to_state_machine<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entries: &'life1 [(&'life2 u64, &'life3 ClientRequest)]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Apply the given payload of entries to the state machine, as part of replication. Read more
fn do_log_compaction<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<CurrentSnapshotData<Self::Snapshot>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn do_log_compaction<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<CurrentSnapshotData<Self::Snapshot>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Perform log compaction, returning a handle to the generated snapshot. Read more
fn create_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(String, Box<Self::Snapshot>)>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn create_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(String, Box<Self::Snapshot>)>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Create a new blank snapshot, returning a writable handle to the snapshot object along with the ID of the snapshot. Read more
fn finalize_snapshot_installation<'life0, 'async_trait>(
&'life0 self,
index: u64,
term: u64,
delete_through: Option<u64>,
id: String,
snapshot: Box<Self::Snapshot>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn finalize_snapshot_installation<'life0, 'async_trait>(
&'life0 self,
index: u64,
term: u64,
delete_through: Option<u64>,
id: String,
snapshot: Box<Self::Snapshot>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Finalize the installation of a snapshot which has finished streaming from the cluster leader. Read more
fn get_current_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<CurrentSnapshotData<Self::Snapshot>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn get_current_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<CurrentSnapshotData<Self::Snapshot>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Get a readable handle to the current snapshot, along with its metadata. Read more
impl Serialize for ClientRequest
[src]
impl Serialize for ClientRequest
[src]impl AppData for ClientRequest
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClientRequest
impl Send for ClientRequest
impl Sync for ClientRequest
impl Unpin for ClientRequest
impl UnwindSafe for ClientRequest
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,