Struct embedded_tls::TlsReader

source ·
pub struct TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: TlsCipherSuite + 'static,
{ /* private fields */ }

Implementations§

source§

impl<'a, Socket, CipherSuite, State> TlsReader<'a, Socket, CipherSuite, State>
where Socket: AsyncRead + 'a, CipherSuite: TlsCipherSuite + 'static, State: SplitState,

source

pub async fn read_buffered(&mut self) -> Result<ReadBuffer<'_>, TlsError>

Reads buffered data. If nothing is in memory, it’ll wait for a TLS record and process it.

Trait Implementations§

source§

impl<'a, Socket, CipherSuite, State> AsRef<Socket> for TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: TlsCipherSuite + 'static,

source§

fn as_ref(&self) -> &Socket

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

impl<'a, Socket, CipherSuite, State> BufRead for TlsReader<'a, Socket, CipherSuite, State>
where Socket: AsyncRead + 'a, CipherSuite: TlsCipherSuite + 'static, State: SplitState,

source§

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

Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
source§

fn consume(&mut self, amt: usize)

Tell this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to fill_buf.
source§

impl<'a, Socket, CipherSuite, State> ErrorType for TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: TlsCipherSuite + 'static,

§

type Error = TlsError

Error type of all the IO operations on this type.
source§

impl<'a, Socket, CipherSuite, State> Read for TlsReader<'a, Socket, CipherSuite, State>
where Socket: AsyncRead + 'a, CipherSuite: TlsCipherSuite + 'static, State: SplitState,

source§

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

Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
source§

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

Read the exact number of bytes required to fill buf. Read more

Auto Trait Implementations§

§

impl<'a, Socket, CipherSuite, State> RefUnwindSafe for TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: RefUnwindSafe, Socket: RefUnwindSafe, State: RefUnwindSafe, <<<CipherSuite as TlsCipherSuite>::Hash as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe, <CipherSuite as TlsCipherSuite>::Hash: RefUnwindSafe,

§

impl<'a, Socket, CipherSuite, State> Send for TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: Send, Socket: Send, State: Send, <CipherSuite as TlsCipherSuite>::Hash: Send,

§

impl<'a, Socket, CipherSuite, State> Sync for TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: Sync, Socket: Sync, State: Sync, <CipherSuite as TlsCipherSuite>::Hash: Sync,

§

impl<'a, Socket, CipherSuite, State> Unpin for TlsReader<'a, Socket, CipherSuite, State>
where CipherSuite: Unpin, Socket: Unpin, State: Unpin, <<<CipherSuite as TlsCipherSuite>::Hash as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin, <CipherSuite as TlsCipherSuite>::Hash: Unpin,

§

impl<'a, Socket, CipherSuite, State> !UnwindSafe for TlsReader<'a, Socket, CipherSuite, State>

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

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.