pub trait Eventual: Client {
    type DeleteInvocationStream;
    type ExistsInvocationStream;
    type GetInvocationStream;
    type SetInvocationStream;

    // Required methods
    fn invoke_delete(
        &self,
        bucket: String,
        key: String
    ) -> impl Future<Output = Result<(Result<(), String>, Self::Transmission)>> + Send;
    fn serve_delete(
        &self
    ) -> impl Future<Output = Result<Self::DeleteInvocationStream>> + Send;
    fn invoke_exists(
        &self,
        bucket: String,
        key: String
    ) -> impl Future<Output = Result<(Result<bool, String>, Self::Transmission)>> + Send;
    fn serve_exists(
        &self
    ) -> impl Future<Output = Result<Self::ExistsInvocationStream>> + Send;
    fn invoke_get(
        &self,
        bucket: String,
        key: String
    ) -> impl Future<Output = Result<(Result<Option<IncomingInputStream>, String>, Self::Transmission)>> + Send;
    fn serve_get(
        &self
    ) -> impl Future<Output = Result<Self::GetInvocationStream>> + Send;
    fn invoke_set(
        &self,
        bucket: String,
        key: String,
        value: impl Stream<Item = Bytes> + Send + 'static
    ) -> impl Future<Output = Result<(Result<(), String>, Self::Transmission)>> + Send;
    fn serve_set(
        &self
    ) -> impl Future<Output = Result<Self::SetInvocationStream>> + Send;
}

Required Associated Types§

Required Methods§

source

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

source

fn serve_delete( &self ) -> impl Future<Output = Result<Self::DeleteInvocationStream>> + Send

source

fn invoke_exists( &self, bucket: String, key: String ) -> impl Future<Output = Result<(Result<bool, String>, Self::Transmission)>> + Send

source

fn serve_exists( &self ) -> impl Future<Output = Result<Self::ExistsInvocationStream>> + Send

source

fn invoke_get( &self, bucket: String, key: String ) -> impl Future<Output = Result<(Result<Option<IncomingInputStream>, String>, Self::Transmission)>> + Send

source

fn serve_get( &self ) -> impl Future<Output = Result<Self::GetInvocationStream>> + Send

source

fn invoke_set( &self, bucket: String, key: String, value: impl Stream<Item = Bytes> + Send + 'static ) -> impl Future<Output = Result<(Result<(), String>, Self::Transmission)>> + Send

source

fn serve_set( &self ) -> impl Future<Output = Result<Self::SetInvocationStream>> + Send

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Client> Eventual for T

§

type DeleteInvocationStream = Pin<Box<dyn Stream<Item = Result<AcceptedInvocation<<T as Client>::Context, (String, String), <T as Client>::Subject, <<T as Client>::Acceptor as Acceptor>::Transmitter>, Error>> + Send>>

§

type ExistsInvocationStream = Pin<Box<dyn Stream<Item = Result<AcceptedInvocation<<T as Client>::Context, (String, String), <T as Client>::Subject, <<T as Client>::Acceptor as Acceptor>::Transmitter>, Error>> + Send>>

§

type GetInvocationStream = Pin<Box<dyn Stream<Item = Result<AcceptedInvocation<<T as Client>::Context, (String, String), <T as Client>::Subject, <<T as Client>::Acceptor as Acceptor>::Transmitter>, Error>> + Send>>

§

type SetInvocationStream = Pin<Box<dyn Stream<Item = Result<AcceptedInvocation<<T as Client>::Context, (String, String, Box<dyn Stream<Item = Result<Vec<u8>, Error>> + Send + Sync + Unpin>), <T as Client>::Subject, <<T as Client>::Acceptor as Acceptor>::Transmitter>, Error>> + Send>>