Skip to main content

EncryptedSocketStreamReader

Struct EncryptedSocketStreamReader 

Source
pub struct EncryptedSocketStreamReader<'scope> { /* private fields */ }
Expand description

Plaintext input which drives its retained TLS receive future. No lock spans an asynchronous wait; paused input does not prevent application output.

Trait Implementations§

Source§

impl ReadableStream for EncryptedSocketStreamReader<'_>

Source§

async fn read_into( &mut self, buffer: &mut [u8], cancellation: &Cancellation, ) -> OperationResult<usize>

Read a possibly short prefix. Empty storage does not establish EOF.
Source§

fn try_read_into(&mut self, buffer: &mut [u8]) -> Result<usize>

Attempt one read now, without waiting. Unlike polling read_into once, this reaches the transport, so it observes input, EOF and errors already queued there. WouldBlock means no input is available now; zero with nonempty storage is EOF, and empty storage returns zero. Other errors are as for read_into, except that a cancelled transport reports ConnectionAborted, since there is no operation cancellation to report and the input cannot resume. Wrappers must forward this rather than polling a read.
Source§

async fn close(&mut self) -> Result<()>

Retire this direction. Transport ownership and final closure are separate.

Auto Trait Implementations§

§

impl<'scope> !RefUnwindSafe for EncryptedSocketStreamReader<'scope>

§

impl<'scope> !UnwindSafe for EncryptedSocketStreamReader<'scope>

§

impl<'scope> Freeze for EncryptedSocketStreamReader<'scope>

§

impl<'scope> Send for EncryptedSocketStreamReader<'scope>

§

impl<'scope> Sync for EncryptedSocketStreamReader<'scope>

§

impl<'scope> Unpin for EncryptedSocketStreamReader<'scope>

§

impl<'scope> UnsafeUnpin for EncryptedSocketStreamReader<'scope>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.