commonware_runtime

Trait Listener

Source
pub trait Listener<Si, St>:
    Sync
    + Send
    + 'static
where Si: Sink, St: Stream,
{ // Required method fn accept( &mut self, ) -> impl Future<Output = Result<(SocketAddr, Si, St), Error>> + Send; }
Expand description

Interface that any runtime must implement to handle incoming network connections.

Required Methods§

Source

fn accept( &mut self, ) -> impl Future<Output = Result<(SocketAddr, Si, St), Error>> + Send

Accept an incoming connection.

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.

Implementors§

Source§

impl Listener<Sink, Stream> for commonware_runtime::deterministic::Listener

Source§

impl Listener<Sink, Stream> for commonware_runtime::tokio::Listener