Skip to main content

Muxer

Struct Muxer 

pub struct Muxer<C> { /* private fields */ }
Available on crate feature yamux only.
Expand description

A Yamux connection.

Trait Implementations§

§

impl<C> Debug for Muxer<C>
where C: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<C> StreamMuxer for Muxer<C>
where C: AsyncRead + AsyncWrite + Unpin + 'static,

§

type Substream = Stream

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

type Error = Error

Error type of the muxer
§

fn poll_inbound( self: Pin<&mut Muxer<C>>, cx: &mut Context<'_>, ) -> Poll<Result<<Muxer<C> as StreamMuxer>::Substream, <Muxer<C> as StreamMuxer>::Error>>

Poll for new inbound substreams. Read more
§

fn poll_outbound( self: Pin<&mut Muxer<C>>, cx: &mut Context<'_>, ) -> Poll<Result<<Muxer<C> as StreamMuxer>::Substream, <Muxer<C> as StreamMuxer>::Error>>

Poll for a new, outbound substream.
§

fn poll_close( self: Pin<&mut Muxer<C>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <Muxer<C> as StreamMuxer>::Error>>

Poll to close this StreamMuxer. Read more
§

fn poll( self: Pin<&mut Muxer<C>>, cx: &mut Context<'_>, ) -> Poll<Result<StreamMuxerEvent, <Muxer<C> as StreamMuxer>::Error>>

Poll to allow the underlying connection to make progress. Read more

Auto Trait Implementations§

§

impl<C> !Freeze for Muxer<C>

§

impl<C> !RefUnwindSafe for Muxer<C>

§

impl<C> !UnwindSafe for Muxer<C>

§

impl<C> Forget for Muxer<C>

§

impl<C> Move for Muxer<C>

§

impl<C> Send for Muxer<C>
where C: Send, Arc<Config>: Send, RawVecInner: Send, RawTable<(StreamId, Arc<Mutex<RawMutex, Shared>>)>: Send, FuturesUnordered<StreamFuture<TaggedStream<StreamId, Receiver<StreamCommand>>>>: Send, Waker: Send, Arc<Mutex<RawMutex, RttInner>>: Send, Arc<Atomic<u32>>: Send, Arc<Mutex<RawMutex, usize>>: Send, Repr: Send, Arc<BoundedInner<StreamCommand>>: Send, Arc<Mutex<SenderTask>>: Send, Arc<Mutex<RawMutex, Shared>>: Send,

§

impl<C> Sync for Muxer<C>
where C: Sync, Arc<Config>: Sync, RawVecInner: Sync, RawTable<(StreamId, Arc<Mutex<RawMutex, Shared>>)>: Sync, FuturesUnordered<StreamFuture<TaggedStream<StreamId, Receiver<StreamCommand>>>>: Sync, Waker: Sync, Arc<Mutex<RawMutex, RttInner>>: Sync, Arc<Atomic<u32>>: Sync, Arc<Mutex<RawMutex, usize>>: Sync, Repr: Sync, Arc<BoundedInner<StreamCommand>>: Sync, Arc<Mutex<SenderTask>>: Sync, Arc<Mutex<RawMutex, Shared>>: Sync,

§

impl<C> Unpin for Muxer<C>
where Arc<Config>: Unpin, Fuse<Io<C>>: Unpin, *const u8 is !null: Unpin, Arc<Mutex<RawMutex, Shared>>: Unpin, FuturesUnordered<StreamFuture<TaggedStream<StreamId, Receiver<StreamCommand>>>>: Unpin, Waker: Unpin, Arc<Mutex<RawMutex, RttInner>>: Unpin, Arc<Atomic<u32>>: Unpin, Arc<Mutex<RawMutex, usize>>: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin, BoundedSenderInner<StreamCommand>: Unpin,

§

impl<C> UnsafeUnpin for Muxer<C>
where *const ArcInner<Config> is !null: UnsafeUnpin, PhantomData<ArcInner<Config>>: UnsafeUnpin, C: UnsafeUnpin, PhantomData<()>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<fn() -> NoHashHasher<StreamId>>: UnsafeUnpin, PhantomData<(StreamId, Arc<Mutex<RawMutex, Shared>>)>: UnsafeUnpin, *const ArcInner<ReadyToRunQueue<StreamFuture<TaggedStream<StreamId, Receiver<StreamCommand>>>>> is !null: UnsafeUnpin, PhantomData<ArcInner<ReadyToRunQueue<StreamFuture<TaggedStream<StreamId, Receiver<StreamCommand>>>>>>: UnsafeUnpin, Align8<*mut Task<StreamFuture<TaggedStream<StreamId, Receiver<StreamCommand>>>>>: UnsafeUnpin, Align1<u8>: UnsafeUnpin, *const (): UnsafeUnpin, &'static RawWakerVTable: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, RttInner>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, RttInner>>>: UnsafeUnpin, *const ArcInner<Atomic<u32>> is !null: UnsafeUnpin, PhantomData<ArcInner<Atomic<u32>>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, usize>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, usize>>>: UnsafeUnpin, PhantomData<Frame<()>>: UnsafeUnpin, *const () is !null: UnsafeUnpin, PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin, PhantomData<Stream>: UnsafeUnpin,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<S> StreamMuxerExt for S
where S: StreamMuxer,

§

fn poll_inbound_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Substream, Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll_inbound for StreamMuxers that are Unpin.
§

fn poll_outbound_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Substream, Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll_outbound for StreamMuxers that are Unpin.
§

fn poll_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<StreamMuxerEvent, Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll for StreamMuxers that are Unpin.
§

fn poll_close_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll_close for StreamMuxers that are Unpin.
§

fn close(self) -> Close<Self> ⓘ

Returns a future for closing this StreamMuxer.
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more