Struct openraft_sledstore::ExampleTypeConfig
source · pub struct ExampleTypeConfig {}
Expand description
Declare the type configuration for example K/V store.
Trait Implementations§
source§impl Clone for ExampleTypeConfig
impl Clone for ExampleTypeConfig
source§fn clone(&self) -> ExampleTypeConfig
fn clone(&self) -> ExampleTypeConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExampleTypeConfig
impl Debug for ExampleTypeConfig
source§impl Default for ExampleTypeConfig
impl Default for ExampleTypeConfig
source§fn default() -> ExampleTypeConfig
fn default() -> ExampleTypeConfig
Returns the “default value” for a type. Read more
source§impl Ord for ExampleTypeConfig
impl Ord for ExampleTypeConfig
source§fn cmp(&self, other: &ExampleTypeConfig) -> Ordering
fn cmp(&self, other: &ExampleTypeConfig) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ExampleTypeConfig> for ExampleTypeConfig
impl PartialEq<ExampleTypeConfig> for ExampleTypeConfig
source§fn eq(&self, other: &ExampleTypeConfig) -> bool
fn eq(&self, other: &ExampleTypeConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ExampleTypeConfig> for ExampleTypeConfig
impl PartialOrd<ExampleTypeConfig> for ExampleTypeConfig
source§fn partial_cmp(&self, other: &ExampleTypeConfig) -> Option<Ordering>
fn partial_cmp(&self, other: &ExampleTypeConfig) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl RaftLogReader<ExampleTypeConfig> for Arc<SledStore>
impl RaftLogReader<ExampleTypeConfig> for Arc<SledStore>
source§fn get_log_state<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<LogState<ExampleTypeConfig>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_log_state<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<LogState<ExampleTypeConfig>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the last deleted log id and the last log id. Read more
source§fn try_get_log_entries<'life0, 'async_trait, RB>(
&'life0 mut self,
range: RB
) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<ExampleTypeConfig>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
RB: 'async_trait + RangeBounds<u64> + Clone + Debug + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn try_get_log_entries<'life0, 'async_trait, RB>( &'life0 mut self, range: RB ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<ExampleTypeConfig>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where RB: 'async_trait + RangeBounds<u64> + Clone + Debug + Send + Sync, Self: 'async_trait, 'life0: 'async_trait,
Get a series of log entries from storage. Read more
source§impl RaftSnapshotBuilder<ExampleTypeConfig, Cursor<Vec<u8, Global>>> for Arc<SledStore>
impl RaftSnapshotBuilder<ExampleTypeConfig, Cursor<Vec<u8, Global>>> for Arc<SledStore>
source§fn build_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Snapshot<ExampleNodeId, BasicNode, Cursor<Vec<u8>>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn build_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Snapshot<ExampleNodeId, BasicNode, Cursor<Vec<u8>>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Build snapshot Read more
source§impl RaftStorage<ExampleTypeConfig> for Arc<SledStore>
impl RaftStorage<ExampleTypeConfig> for Arc<SledStore>
§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
§type SnapshotBuilder = Arc<SledStore>
type SnapshotBuilder = Arc<SledStore>
Snapshot builder type.
source§fn save_vote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
vote: &'life1 Vote<ExampleNodeId>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_vote<'life0, 'life1, 'async_trait>( &'life0 mut self, vote: &'life1 Vote<ExampleNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
To ensure correctness: the vote must be persisted on disk before returning.
fn read_vote<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Option<Vote<ExampleNodeId>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn get_log_reader<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Self::LogReader> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_log_reader<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Self::LogReader> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the log reader. Read more
source§fn append_to_log<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entries: &'life1 [&'life2 Entry<ExampleTypeConfig>]
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_to_log<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, entries: &'life1 [&'life2 Entry<ExampleTypeConfig>] ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Append a payload of entries to the log. Read more
source§fn delete_conflict_logs_since<'life0, 'async_trait>(
&'life0 mut self,
log_id: LogId<ExampleNodeId>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_conflict_logs_since<'life0, 'async_trait>( &'life0 mut self, log_id: LogId<ExampleNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Delete conflict log entries since
log_id
, inclusive. Read moresource§fn purge_logs_upto<'life0, 'async_trait>(
&'life0 mut self,
log_id: LogId<ExampleNodeId>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn purge_logs_upto<'life0, 'async_trait>( &'life0 mut self, log_id: LogId<ExampleNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Delete applied log entries upto
log_id
, inclusive. Read moresource§fn last_applied_state<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(Option<LogId<ExampleNodeId>>, StoredMembership<ExampleNodeId, BasicNode>), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn last_applied_state<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<(Option<LogId<ExampleNodeId>>, StoredMembership<ExampleNodeId, BasicNode>), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the last applied log id which is recorded in state machine, and the last applied
membership config. Read more
source§fn apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entries: &'life1 [&'life2 Entry<ExampleTypeConfig>]
) -> Pin<Box<dyn Future<Output = Result<Vec<ExampleResponse>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, entries: &'life1 [&'life2 Entry<ExampleTypeConfig>] ) -> Pin<Box<dyn Future<Output = Result<Vec<ExampleResponse>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Apply the given payload of entries to the state machine. Read more
source§fn get_snapshot_builder<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Self::SnapshotBuilder> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_snapshot_builder<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Self::SnapshotBuilder> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the snapshot builder for the state machine. Read more
source§fn begin_receiving_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin_receiving_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Create a new blank snapshot, returning a writable handle to the snapshot object. Read more
source§fn install_snapshot<'life0, 'life1, 'async_trait>(
&'life0 mut self,
meta: &'life1 SnapshotMeta<ExampleNodeId, BasicNode>,
snapshot: Box<Self::SnapshotData>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn install_snapshot<'life0, 'life1, 'async_trait>( &'life0 mut self, meta: &'life1 SnapshotMeta<ExampleNodeId, BasicNode>, snapshot: Box<Self::SnapshotData> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Install a snapshot which has finished streaming from the leader. Read more
source§fn get_current_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<ExampleNodeId, BasicNode, Self::SnapshotData>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<ExampleNodeId, BasicNode, Self::SnapshotData>>, StorageError<ExampleNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get a readable handle to the current snapshot, along with its metadata. Read more
source§impl RaftTypeConfig for ExampleTypeConfig
impl RaftTypeConfig for ExampleTypeConfig
impl Copy for ExampleTypeConfig
impl Eq for ExampleTypeConfig
impl StructuralEq for ExampleTypeConfig
impl StructuralPartialEq for ExampleTypeConfig
Auto Trait Implementations§
impl RefUnwindSafe for ExampleTypeConfig
impl Send for ExampleTypeConfig
impl Sync for ExampleTypeConfig
impl Unpin for ExampleTypeConfig
impl UnwindSafe for ExampleTypeConfig
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.