pub trait Sender<K: SignatureKey + 'static>:
Send
+ Sync
+ 'static
+ Clone {
// Required methods
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;
fn send_broadcast_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 Bytes,
) -> 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§
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.