[][src]Struct libp2p::yamux::Yamux

pub struct Yamux<S>(_);

A Yamux connection.


impl<C> Yamux<Incoming<C>> where
    C: AsyncRead + AsyncWrite + Send + Unpin + 'static, 

pub fn new(io: C, cfg: Config, mode: Mode) -> Yamux<Incoming<C>>[src]

Create a new Yamux connection.

impl<C> Yamux<LocalIncoming<C>> where
    C: AsyncRead + AsyncWrite + Unpin + 'static, 

pub fn local(io: C, cfg: Config, mode: Mode) -> Yamux<LocalIncoming<C>>[src]

Create a new Yamux connection (which is Send).

Trait Implementations

impl<S> Debug for Yamux<S>[src]

impl<S> StreamMuxer for Yamux<S> where
    S: Stream<Item = Result<Stream, YamuxError>> + Unpin

type Substream = Stream

Type of the object that represents the raw substream where data can be read and written.

type OutboundSubstream = OpenSubstreamToken

Future that will be resolved when the outgoing substream is open.

type Error = YamuxError

Error type of the muxer

Auto Trait Implementations

impl<S> !RefUnwindSafe for Yamux<S>

impl<S> Send for Yamux<S> where
    S: Send

impl<S> Sync for Yamux<S> where
    S: Send

impl<S> Unpin for Yamux<S> where
    S: Unpin

impl<S> !UnwindSafe for Yamux<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,