SendStream

Struct SendStream 

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

A WebTransport send-stream.

Tuple Fields§

§0: T

Implementations§

Source§

impl<T> SendStream<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 SendStream<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 SendStream<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 SendStream<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<T> DerefMut for SendStream<T>

Source§

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

Mutably dereferences the value.
Source§

impl<T> Finish for SendStream<T>
where T: Finish,

Source§

type Error = <T as Finish>::Error

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

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

Finish the stream.
Source§

impl<T> From<T> for SendStream<T>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<T> Write for SendStream<T>
where T: Write,

Source§

type Error = <T as Write>::Error

An error that can occur while writing to the stream.
Source§

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

Write the data from the given buffer into the stream, returning the amount of of bytes that were successfully written into the stream. If the returned amount is smaller than the size of the data that was being written, the user should try writing the remaining data again.
Source§

impl<T> WriteAbort for SendStream<T>
where T: WriteAbort,

Source§

type Error = <T as WriteAbort>::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> WriteAborted for SendStream<T>
where T: WriteAborted,

Source§

type Error = <T as WriteAborted>::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 read side to abort.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for SendStream<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,