Trait DistributedLog

Source
pub trait DistributedLog<K, C>:
    Send
    + Sync
    + 'static {
    type Err: Send + Sync + 'static;

    // Required methods
    fn send(
        &self,
        key: &K,
        msg: SendCommand<'_, C>,
    ) -> impl Future<Output = Result<(), Self::Err>> + Send;
    fn receive(
        &self,
        key: &K,
        f: &mut impl CommandReceiveFn<C>,
    ) -> impl Future<Output = Result<(), Self::Err>> + Send;
}

Required Associated Types§

Source

type Err: Send + Sync + 'static

Required Methods§

Source

fn send( &self, key: &K, msg: SendCommand<'_, C>, ) -> impl Future<Output = Result<(), Self::Err>> + Send

Source

fn receive( &self, key: &K, f: &mut impl CommandReceiveFn<C>, ) -> impl Future<Output = Result<(), Self::Err>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<K, M> DistributedLog<K, M> for LocalLog<K>
where K: Ord + Clone + Send + Sync + 'static, M: Serialize + for<'a> Deserialize<'a> + Send + Sync + 'static,