[][src]Trait lnpbp::lnp::transport::Duplex

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>); }

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

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>)

Loading content...

Implementors

impl Duplex for lnpbp::lnp::transport::ftcp::Connection[src]

impl Duplex for lnpbp::lnp::transport::zmqsocket::Connection[src]

Loading content...