Skip to main content

Inbound

Trait Inbound 

Source
pub trait Inbound:
    Send
    + Sync
    + 'static {
    type Wire: ConnStream;
    type BindTarget: Clone + Send + Sync + 'static;

    // Required methods
    fn bind<'async_trait>(
        target: Self::BindTarget,
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait;
    fn accept<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Wire, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Bound inbound runtime that accepts final wire streams.

Required Associated Types§

Source

type Wire: ConnStream

Wire stream produced by this runtime.

Source

type BindTarget: Clone + Send + Sync + 'static

Local bind target and any transport-specific construction config.

Required Methods§

Source

fn bind<'async_trait>( target: Self::BindTarget, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

Bind and construct the inbound runtime.

Source

fn accept<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Wire, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Wait for one inbound wire.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§