[−][src]Struct libp2p_core::muxing::StreamMuxerBox
Abstract StreamMuxer.
Methods
impl StreamMuxerBox[src]
pub fn new<T>(muxer: T) -> StreamMuxerBox where
T: StreamMuxer + Send + Sync + 'static,
T::OutboundSubstream: Send,
T::Substream: Send, [src]
T: StreamMuxer + Send + Sync + 'static,
T::OutboundSubstream: Send,
T::Substream: Send,
Turns a stream muxer into a StreamMuxerBox.
Trait Implementations
impl StreamMuxer for StreamMuxerBox[src]
type Substream = usize
Type of the object that represents the raw substream where data can be read and written.
type OutboundSubstream = usize
Future that will be resolved when the outgoing substream is open.
fn poll_inbound(&self) -> Poll<Option<Self::Substream>, IoError>[src]
fn open_outbound(&self) -> Self::OutboundSubstream[src]
fn poll_outbound(
&self,
s: &mut Self::OutboundSubstream
) -> Poll<Option<Self::Substream>, IoError>[src]
&self,
s: &mut Self::OutboundSubstream
) -> Poll<Option<Self::Substream>, IoError>
fn destroy_outbound(&self, substream: Self::OutboundSubstream)[src]
fn read_substream(
&self,
s: &mut Self::Substream,
buf: &mut [u8]
) -> Poll<usize, IoError>[src]
&self,
s: &mut Self::Substream,
buf: &mut [u8]
) -> Poll<usize, IoError>
fn write_substream(
&self,
s: &mut Self::Substream,
buf: &[u8]
) -> Poll<usize, IoError>[src]
&self,
s: &mut Self::Substream,
buf: &[u8]
) -> Poll<usize, IoError>
fn flush_substream(&self, s: &mut Self::Substream) -> Poll<(), IoError>[src]
fn shutdown_substream(
&self,
s: &mut Self::Substream,
kind: Shutdown
) -> Poll<(), IoError>[src]
&self,
s: &mut Self::Substream,
kind: Shutdown
) -> Poll<(), IoError>
fn destroy_substream(&self, s: Self::Substream)[src]
fn shutdown(&self, kind: Shutdown) -> Poll<(), IoError>[src]
fn flush_all(&self) -> Poll<(), IoError>[src]
Auto Trait Implementations
impl Send for StreamMuxerBox
impl Sync for StreamMuxerBox
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Same for T
type Output = T
Should always be Self