Struct RecvWriteStream

Source
pub struct RecvWriteStream { /* private fields */ }
Expand description

Bidirectional stream.

Implementations§

Source§

impl RecvWriteStream

Source

pub fn split(self) -> (RecvStream, WriteStream)

Split the stream into unidirectional parts.

Source

pub fn split3(self) -> (RecvOnlyStream, WriteOnlyStream, CloseStream)

Split the stream into unidirectional parts which can be closed asynchronously. The single CloseStream closes both directions.

Trait Implementations§

Source§

impl Close for RecvWriteStream

Source§

fn close(&mut self) -> Close

Close a stream. Returns a future.
Source§

impl Default for RecvWriteStream

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for RecvWriteStream

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<RecvWriteStream> for ReadWriteStream

Source§

fn from(stream: RecvWriteStream) -> Self

Converts to this type from the input type.
Source§

impl From<RecvWriteStream> for RecvStream

Source§

fn from(stream: RecvWriteStream) -> Self

Converts to this type from the input type.
Source§

impl From<RecvWriteStream> for WriteStream

Source§

fn from(stream: RecvWriteStream) -> Self

Converts to this type from the input type.
Source§

impl Recv for RecvWriteStream

Source§

fn recv<R>(&mut self, capacity: usize, receptor: R) -> Recv<'_, R>
where R: Fn(&[u8], i32) -> usize + Unpin,

Receive data packets repeatedly. Returns a future. Read more
Source§

impl Write for RecvWriteStream

Source§

fn write<'a>(&'a mut self, data: &'a [u8]) -> Write<'_>

Write part of a byte slice. Returns a future.
Source§

fn write_note<'a>(&'a mut self, data: &'a [u8], note: i32) -> Write<'_>

Write part of a byte slice. Returns a future.
Source§

fn write_all<'a>(&'a mut self, data: &'a [u8]) -> WriteAll<'_>

Write a whole byte slice. Returns a future.

Auto Trait Implementations§

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
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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.