Trait FramedUidMux

Source
pub trait FramedUidMux<Id> {
    type Framed: IoDuplex;
    type Error;

    // Required method
    fn open_framed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Id,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Framed, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A multiplexer that opens framed streams with unique ids.

Required Associated Types§

Source

type Framed: IoDuplex

Stream type.

Source

type Error

Error type.

Required Methods§

Source

fn open_framed<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Self::Framed, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Opens a new framed stream with the given id.

Implementors§

Source§

impl<Id, M, C> FramedUidMux<Id> for FramedMux<M, C>
where Id: Sync, M: UidMux<Id> + Sync, C: Codec<<M as UidMux<Id>>::Stream> + Sync,

Source§

type Framed = <C as Codec<<M as UidMux<Id>>::Stream>>::Framed

Source§

type Error = <M as UidMux<Id>>::Error