pub trait SenderHandle {
    type Item;
    type Error;

    // Required method
    fn send<'life0, 'async_trait>(
        &'life0 mut self,
        item: Self::Item
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Sender trait implemented for some service handles.

Useful for sending data into the service.

Required Associated Types§

source

type Item

Type of value send into the service.

source

type Error

Type of error returned when the send has failed.

Required Methods§

source

fn send<'life0, 'async_trait>( &'life0 mut self, item: Self::Item ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Sends the given item into the service.

Arguments
  • item - value to the send into the service.
Returns

Returns Ok(()) when it successfully send data into the service, Err(Self::Error) otherwise.

Implementors§

source§

impl<C, SM> SenderHandle for ClientHandle<C, SM>where C: Cancellable, <C as Cancellable>::Handle: SenderHandle<Item = Vec<u8>> + Send + Sync, SM: Into<Vec<u8>> + Send,

§

type Item = SM

§

type Error = ClientError