commonware_runtime

Trait Sink

source
pub trait Sink:
    Sync
    + Send
    + 'static {
    // Required method
    fn send(
        &mut self,
        msg: Bytes,
    ) -> impl Future<Output = Result<(), Error>> + Send;
}
Expand description

Interface that any runtime must implement to send messages over a network connection.

Required Methods§

source

fn send(&mut self, msg: Bytes) -> impl Future<Output = Result<(), Error>> + Send

Send a message.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Sink for commonware_runtime::deterministic::Sink

source§

impl Sink for MockSink

source§

impl Sink for commonware_runtime::tokio::Sink