pub struct ChMux<TransportSink, TransportStream> { /* private fields */ }
Expand description
Channel multiplexer.
Implementations§
source§impl<TransportSink, TransportSinkError, TransportStream, TransportStreamError> ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportSinkError, TransportStream, TransportStreamError> ChMux<TransportSink, TransportStream>
sourcepub async fn new(
cfg: Cfg,
transport_sink: TransportSink,
transport_stream: TransportStream
) -> Result<(Self, Client, Listener), ChMuxError<TransportSinkError, TransportStreamError>>
pub async fn new( cfg: Cfg, transport_sink: TransportSink, transport_stream: TransportStream ) -> Result<(Self, Client, Listener), ChMuxError<TransportSinkError, TransportStreamError>>
sourcepub async fn run(
self
) -> Result<(), ChMuxError<TransportSinkError, TransportStreamError>>
pub async fn run( self ) -> Result<(), ChMuxError<TransportSinkError, TransportStreamError>>
Runs the multiplexer dispatcher.
The dispatcher terminates when the client, server and all channels have been dropped or the transport is closed.
Trait Implementations§
Auto Trait Implementations§
impl<TransportSink, TransportStream> Freeze for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> !RefUnwindSafe for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> Send for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> Sync for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> Unpin for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> !UnwindSafe for ChMux<TransportSink, TransportStream>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more