Trait internet2::transport::Duplex[][src]

pub trait Duplex {
    fn as_receiver(&mut self) -> &mut dyn RecvFrame;
fn as_sender(&mut self) -> &mut dyn SendFrame;
fn split(self) -> (Box<dyn RecvFrame + Send>, Box<dyn SendFrame + Send>); }
Expand description

Marker trait for types that can provide a concrete implementation for both frame parser implementing RecvFrame and frame composer implementing SendFrame. These types must also implement [Bipolar], i.e. they must be splittable into the receiving and sending half-types.

Any type implementing both [AsReceiver] and [AsSender], plust providing [Bipolar] trait implementation has a blanket implementation of this trait

Required methods

Implementors