Atomic

Trait Atomic 

Source
pub trait Atomic: Client {
    // Provided methods
    fn invoke_compare_and_swap(
        &self,
        bucket: &str,
        key: &str,
        old: u64,
        new: u64,
    ) -> impl Future<Output = Result<(Result<bool, String>, Self::Transmission)>> + Send { ... }
    fn serve_compare_and_swap(
        &self,
    ) -> impl Future<Output = Result<Self::InvocationStream<Self::Context, (String, String, u64, u64), <Self::Acceptor as Acceptor>::Transmitter>>> + Send { ... }
    fn invoke_increment(
        &self,
        bucket: &str,
        key: &str,
        delta: u64,
    ) -> impl Future<Output = Result<(Result<u64, String>, Self::Transmission)>> + Send { ... }
    fn serve_increment(
        &self,
    ) -> impl Future<Output = Result<Self::InvocationStream<Self::Context, (String, String, u64), <Self::Acceptor as Acceptor>::Transmitter>>> + Send { ... }
}

Provided Methods§

Source

fn invoke_compare_and_swap( &self, bucket: &str, key: &str, old: u64, new: u64, ) -> impl Future<Output = Result<(Result<bool, String>, Self::Transmission)>> + Send

Source

fn serve_compare_and_swap( &self, ) -> impl Future<Output = Result<Self::InvocationStream<Self::Context, (String, String, u64, u64), <Self::Acceptor as Acceptor>::Transmitter>>> + Send

Source

fn invoke_increment( &self, bucket: &str, key: &str, delta: u64, ) -> impl Future<Output = Result<(Result<u64, String>, Self::Transmission)>> + Send

Source

fn serve_increment( &self, ) -> impl Future<Output = Result<Self::InvocationStream<Self::Context, (String, String, u64), <Self::Acceptor as Acceptor>::Transmitter>>> + 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<T: Client> Atomic for T