Struct openraft_memstore::ClientResponse
source · [−]pub struct ClientResponse(_);
Expand description
The application data response type which the MemStore
works with.
Trait Implementations
sourceimpl Clone for ClientResponse
impl Clone for ClientResponse
sourcefn clone(&self) -> ClientResponse
fn clone(&self) -> ClientResponse
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ClientResponse
impl Debug for ClientResponse
sourceimpl<'de> Deserialize<'de> for ClientResponse
impl<'de> Deserialize<'de> for ClientResponse
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl RaftStorage<ClientRequest, ClientResponse> for MemStore
impl RaftStorage<ClientRequest, ClientResponse> for MemStore
type SnapshotData = Cursor<Vec<u8, Global>>
type SnapshotData = Cursor<Vec<u8, Global>>
The storage engine’s associated type used for exposing a snapshot for reading & writing. Read more
fn save_hard_state<'life0, 'life1, 'async_trait>(
&'life0 self,
hs: &'life1 HardState
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn read_hard_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<HardState>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn try_get_log_entries<'life0, 'async_trait, RB>(
&'life0 self,
range: RB
) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<ClientRequest>>, StorageError>> + Send + 'async_trait>>where
RB: 'async_trait + RangeBounds<u64> + Clone + Debug + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn try_get_log_entries<'life0, 'async_trait, RB>(
&'life0 self,
range: RB
) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<ClientRequest>>, StorageError>> + Send + 'async_trait>>where
RB: 'async_trait + RangeBounds<u64> + Clone + Debug + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Get a series of log entries from storage. Read more
sourcefn get_log_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<LogState, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_log_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<LogState, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the last deleted log id and the last log id. Read more
sourcefn last_applied_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(Option<LogId>, Option<EffectiveMembership>), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn last_applied_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(Option<LogId>, Option<EffectiveMembership>), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the last applied log id which is recorded in state machine, and the last applied membership log id and
membership config. Read more
sourcefn delete_conflict_logs_since<'life0, 'async_trait>(
&'life0 self,
log_id: LogId
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_conflict_logs_since<'life0, 'async_trait>(
&'life0 self,
log_id: LogId
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Delete conflict log entries since
log_id
, inclusive.sourcefn purge_logs_upto<'life0, 'async_trait>(
&'life0 self,
log_id: LogId
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn purge_logs_upto<'life0, 'async_trait>(
&'life0 self,
log_id: LogId
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Delete applied log entries upto
log_id
, inclusive.sourcefn append_to_log<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entries: &'life1 [&'life2 Entry<ClientRequest>]
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn append_to_log<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entries: &'life1 [&'life2 Entry<ClientRequest>]
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Append a payload of entries to the log. Read more
sourcefn apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entries: &'life1 [&'life2 Entry<ClientRequest>]
) -> Pin<Box<dyn Future<Output = Result<Vec<ClientResponse>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entries: &'life1 [&'life2 Entry<ClientRequest>]
) -> Pin<Box<dyn Future<Output = Result<Vec<ClientResponse>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Apply the given payload of entries to the state machine. Read more
sourcefn build_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Snapshot<Self::SnapshotData>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn build_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Snapshot<Self::SnapshotData>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Build snapshot Read more
sourcefn begin_receiving_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn begin_receiving_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Create a new blank snapshot, returning a writable handle to the snapshot object. Read more
sourcefn install_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
meta: &'life1 SnapshotMeta,
snapshot: Box<Self::SnapshotData>
) -> Pin<Box<dyn Future<Output = Result<StateMachineChanges, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn install_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
meta: &'life1 SnapshotMeta,
snapshot: Box<Self::SnapshotData>
) -> Pin<Box<dyn Future<Output = Result<StateMachineChanges, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Install a snapshot which has finished streaming from the cluster leader. Read more
sourcefn get_current_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<Self::SnapshotData>>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_current_snapshot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<Self::SnapshotData>>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get a readable handle to the current snapshot, along with its metadata. Read more
sourceimpl Serialize for ClientResponse
impl Serialize for ClientResponse
impl AppDataResponse for ClientResponse
Auto Trait Implementations
impl RefUnwindSafe for ClientResponse
impl Send for ClientResponse
impl Sync for ClientResponse
impl Unpin for ClientResponse
impl UnwindSafe for ClientResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more