pub struct Config {}
Expand description

Declare the type configuration for MemStore.

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Config

source§

fn default() -> Config

Returns the “default value” for a type. Read more
source§

impl Ord for Config

source§

fn cmp(&self, other: &Config) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Config> for Config

source§

fn eq(&self, other: &Config) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Config> for Config

source§

fn partial_cmp(&self, other: &Config) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl RaftLogReader<Config> for Arc<MemStore>

source§

fn try_get_log_entries<'life0, 'async_trait, RB>( &'life0 mut self, range: RB ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<Config>>, StorageError<MemNodeId>>> + 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§

fn get_log_state<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<LogState<Config>, StorageError<MemNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Returns the last deleted log id and the last log id. Read more
source§

impl RaftSnapshotBuilder<Config, Cursor<Vec<u8, Global>>> for Arc<MemStore>

source§

fn build_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Snapshot<MemNodeId, (), Cursor<Vec<u8>>>, StorageError<MemNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Build snapshot Read more
source§

impl RaftStorage<Config> for Arc<MemStore>

§

type SnapshotData = Cursor<Vec<u8, Global>>

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

fn save_vote<'life0, 'life1, 'async_trait>( &'life0 mut self, vote: &'life1 Vote<MemNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<MemNodeId>>> + 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.
source§

fn read_vote<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Option<Vote<MemNodeId>>, StorageError<MemNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn last_applied_state<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<(Option<LogId<MemNodeId>>, StoredMembership<MemNodeId, ()>), StorageError<MemNodeId>>> + 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 delete_conflict_logs_since<'life0, 'async_trait>( &'life0 mut self, log_id: LogId<MemNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<MemNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Delete conflict log entries since log_id, inclusive. Read more
source§

fn purge_logs_upto<'life0, 'async_trait>( &'life0 mut self, log_id: LogId<MemNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<MemNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Delete applied log entries upto log_id, inclusive. Read more
source§

fn append_to_log<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, entries: &'life1 [&'life2 Entry<Config>] ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<MemNodeId>>> + 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 apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, entries: &'life1 [&'life2 Entry<Config>] ) -> Pin<Box<dyn Future<Output = Result<Vec<ClientResponse>, StorageError<MemNodeId>>> + 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 begin_receiving_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError<MemNodeId>>> + 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<MemNodeId, ()>, snapshot: Box<Self::SnapshotData> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<MemNodeId>>> + 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<MemNodeId, (), Self::SnapshotData>>, StorageError<MemNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Get a readable handle to the current snapshot, along with its metadata. Read more
§

type LogReader = Arc<MemStore>

Log reader type.
§

type SnapshotBuilder = Arc<MemStore>

Snapshot builder type.
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,

Get the log reader. 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,

Get the snapshot builder for the state machine. Read more
source§

impl RaftTypeConfig for Config

§

type D = ClientRequest

Application-specific request data passed to the state machine.
§

type R = ClientResponse

Application-specific response data returned by the state machine.
§

type NodeId = u64

A Raft node’s ID.
§

type Node = ()

Raft application level node data
source§

impl Copy for Config

source§

impl Eq for Config

source§

impl StructuralEq for Config

source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more