pub trait ReplicationControl: Sync + Send {
type Command: Send;
type State: Send;
// Required methods
fn replication_state(&self) -> Self::State;
fn apply_replication(
&mut self,
command: Self::Command,
) -> impl Future<Output = Result<Self::State, StoreError>> + Send;
}Expand description
Replication control capability with implementation-owned command and state values.
Required Associated Types§
Required Methods§
Sourcefn replication_state(&self) -> Self::State
fn replication_state(&self) -> Self::State
Returns current replication state.
Sourcefn apply_replication(
&mut self,
command: Self::Command,
) -> impl Future<Output = Result<Self::State, StoreError>> + Send
fn apply_replication( &mut self, command: Self::Command, ) -> impl Future<Output = Result<Self::State, StoreError>> + Send
Applies one replication command.
§Errors
Returns StoreError with crate::StoreOperation::Replicate when
the replication operation fails.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".