Skip to main content

RecvStream

Struct RecvStream 

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

The receive half of a multiplexed stream.

Trait Implementations§

Source§

impl Drop for RecvStream

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl RecvStream for RecvStream

Source§

type Error = Error

Source§

async fn read_chunk( &mut self, max: usize, ) -> Result<Option<Bytes>, <RecvStream as RecvStream>::Error>

Read the next chunk of data, up to the max size. Read more
Source§

async fn read_buf<B>( &mut self, buf: &mut B, ) -> Result<Option<usize>, <RecvStream as RecvStream>::Error>
where B: BufMut + Send,

Read some data into the provided buffer. Read more
Source§

async fn read( &mut self, buf: &mut [u8], ) -> Result<Option<usize>, <RecvStream as RecvStream>::Error>

Read the next chunk of data, up to the max size. Read more
Source§

fn stop(&mut self, code: u32)

Send a STOP_SENDING QUIC code, informing the peer that no more data will be read. Read more
Source§

async fn closed(&mut self) -> Result<(), <RecvStream as RecvStream>::Error>

Block until the stream has been closed by either side. Read more
Source§

fn read_all( &mut self, ) -> impl Future<Output = Result<Bytes, Self::Error>> + MaybeSend

A helper to keep reading until the stream is closed.
Source§

fn read_all_buf<B>( &mut self, buf: &mut B, ) -> impl Future<Output = Result<usize, Self::Error>> + MaybeSend
where B: BufMut + MaybeSend,

A helper to keep reading until the buffer is full.

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> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

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

Source§

fn vzip(self) -> V