Trait request_response::network::Sender
source · pub trait Sender<K: SignatureKey + 'static>:
Send
+ Sync
+ 'static
+ Clone {
// Required method
fn send_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§
Object Safety§
This trait is not object safe.
Implementors§
impl<T, K> Sender<K> for Twhere
T: Deref<Target: ConnectedNetwork<K>> + Send + Sync + 'static + Clone,
K: SignatureKey + 'static,
A blanket implementation of the Sender
trait for all types that dereference to ConnectedNetwork