Skip to main content

Sender

Trait Sender 

Source
pub trait Sender<K: SignatureKey + 'static>:
    Send
    + Sync
    + 'static
    + Clone {
    // Required method
    fn send_direct_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 Bytes,
        recipient: K,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The Sender trait is used to allow the [RequestResponseProtocol] to send messages to a specific recipient

Required Methods§

Source

fn send_direct_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 Bytes, recipient: K, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send a message to a specific recipient

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§