pub type LoopbackConnect = Connect<'static, SendError, Infallible>;Available on crate feature
rch only.Expand description
A loopback connection.
Aliased Type§
pub struct LoopbackConnect(/* private fields */);Implementations§
Source§impl LoopbackConnect
impl LoopbackConnect
Sourcepub async fn loopback<Tx, Rx, Codec>(
cfg: Cfg,
) -> (LoopbackConnect, Sender<Tx, Codec>, Receiver<Rx, Codec>)
pub async fn loopback<Tx, Rx, Codec>( cfg: Cfg, ) -> (LoopbackConnect, Sender<Tx, Codec>, Receiver<Rx, Codec>)
Establishes a connection over a local loopback transport and returns a sender and receiver.
This establishes a chmux connection over the loopback transport and opens a channel.
You must poll the returned Connect future or spawn it for the connection to work.
§Panics
Panics if the chmux configuration is invalid.