commonware_runtime

Trait Stream

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

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

Required Methods§

source

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Stream for commonware_runtime::deterministic::Stream

source§

impl Stream for MockStream

source§

impl Stream for commonware_runtime::tokio::Stream