Skip to main content

Split2

Trait Split2 

Source
pub trait Split2<I1, O1, I2, O2, E>:
    Transport<Message<I1, I2, (), (), ()>, Message<O1, O2, (), (), ()>, E>
    + Sized
    + Unpin
where E: Error,
{ // Provided method fn split_into_2( self, ) -> (Part<I1, O1, fn(O1) -> Message<O1, O2, (), (), ()>, fn(Message<I1, I2, (), (), ()>) -> Result<I1, Message<I1, I2, (), (), ()>>, Self, E, I1, I2, (), (), ()>, Part<I2, O2, fn(O2) -> Message<O1, O2, (), (), ()>, fn(Message<I1, I2, (), (), ()>) -> Result<I2, Message<I1, I2, (), (), ()>>, Self, E, I1, I2, (), (), ()>) { ... } }
Available on crate feature splitting only.
Expand description

Trait allowing transports to be split into two of different message types.

Provided Methods§

Source

fn split_into_2( self, ) -> (Part<I1, O1, fn(O1) -> Message<O1, O2, (), (), ()>, fn(Message<I1, I2, (), (), ()>) -> Result<I1, Message<I1, I2, (), (), ()>>, Self, E, I1, I2, (), (), ()>, Part<I2, O2, fn(O2) -> Message<O1, O2, (), (), ()>, fn(Message<I1, I2, (), (), ()>) -> Result<I2, Message<I1, I2, (), (), ()>>, Self, E, I1, I2, (), (), ()>)

Split into two transports.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, I1, O1, I2, O2, E> Split2<I1, O1, I2, O2, E> for T
where T: Transport<Message<I1, I2, (), (), ()>, Message<O1, O2, (), (), ()>, E> + Sized + Unpin, E: Error,