RecvStream

Struct RecvStream 

Source
#[repr(transparent)]
pub struct RecvStream<T>(pub T);
Expand description

A WebTransport recv-stream.

Tuple Fields§

§0: T

Implementations§

Source§

impl<T> RecvStream<T>

Source

pub const fn from_const(value: T) -> Self

Create an instance from a value of the underlying type T with a const context.

Source

pub fn into_inner(self) -> T

Take the underlying value out.

Source

pub const fn inner_ref(&self) -> &T

Take a ref to the underlying value.

Source

pub fn inner_mut(&mut self) -> &mut T

Take a mut ref to the underlying value.

Trait Implementations§

Source§

impl<T> AsMut<T> for RecvStream<T>

Source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsRef<T> for RecvStream<T>

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> Deref for RecvStream<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T> DerefMut for RecvStream<T>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<T> Finished for RecvStream<T>
where T: Finished,

Source§

type Error = <T as Finished>::Error

An error that can occur while waiting for a stream to be aborted.
Source§

async fn finished(self) -> Result<(), Self::Error>

Wait for a stream to finish.
Source§

impl<T> From<T> for RecvStream<T>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<T> Read for RecvStream<T>
where T: Read,

Source§

type Error = <T as Read>::Error

An error that can occur while reading the stream.
Source§

async fn read(&mut self, buf: &mut [u8]) -> Result<NonZeroUsize, Self::Error>

Read the data from the stream into a given buffer and return the amount of bytes filled in the buffer or None if the stream is closed and does not have any pending unread data. Read more
Source§

impl<T> ReadAbort for RecvStream<T>
where T: ReadAbort,

Source§

type Error = <T as ReadAbort>::Error

An error that can occur while stopping the stream.
Source§

async fn abort(self, error_code: ErrorCode) -> Result<(), Self::Error>

Abort the stream.
Source§

impl<T> ReadAborted for RecvStream<T>
where T: ReadAborted,

Source§

type Error = <T as ReadAborted>::Error

An error that can occur while waiting for a stream to be aborted.
Source§

async fn aborted(self) -> Result<ErrorCode, Self::Error>

Wait for a stream’s corresponding write side to abort.

Auto Trait Implementations§

§

impl<T> Freeze for RecvStream<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for RecvStream<T>
where T: RefUnwindSafe,

§

impl<T> Send for RecvStream<T>
where T: Send,

§

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

§

impl<T> Unpin for RecvStream<T>
where T: Unpin,

§

impl<T> UnwindSafe for RecvStream<T>
where T: UnwindSafe,

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<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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<T> Send for T
where T: Send,

Source§

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