[][src]Trait amplify::Bipolar

pub trait Bipolar {
    type Left;
    type Right;
    fn join(left: Self::Left, right: Self::Right) -> Self;
fn split(self) -> (Self::Left, Self::Right); }

Trait for splittable streams and other types, which can be separated into some two types ([Left], [Right]), like a reader and writer streams.

Associated Types

type Left

First separable type (like reader)

type Right

Second separable type (like writer)

Loading content...

Required methods

fn join(left: Self::Left, right: Self::Right) -> Self

Reconstruct the type from the halves

fn split(self) -> (Self::Left, Self::Right)

Split the type into two

Loading content...

Implementors

Loading content...