pub struct ReadHalf<T, U> { /* private fields */ }
Expand description
Async Encryption Read Half
Implementations§
Source§impl<T, A, S> ReadHalf<T, Decryptor<A, S>>where
S: StreamPrimitive<A>,
A: AeadInPlace,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
impl<T, A, S> ReadHalf<T, Decryptor<A, S>>where
S: StreamPrimitive<A>,
A: AeadInPlace,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
Trait Implementations§
Source§impl<R: AsyncRead, A, S> AsyncBufRead for ReadHalf<R, Decryptor<A, S>>where
S: StreamPrimitive<A>,
A: AeadInPlace,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
impl<R: AsyncRead, A, S> AsyncBufRead for ReadHalf<R, Decryptor<A, S>>where
S: StreamPrimitive<A>,
A: AeadInPlace,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
Source§impl<T, A, S> AsyncRead for ReadHalf<T, Decryptor<A, S>>where
T: AsyncRead,
S: StreamPrimitive<A>,
A: AeadInPlace,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
impl<T, A, S> AsyncRead for ReadHalf<T, Decryptor<A, S>>where
T: AsyncRead,
S: StreamPrimitive<A>,
A: AeadInPlace,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
Source§fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut ReadBuf<'_>,
) -> Poll<Result<()>>
fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll<Result<()>>
The poll read simply tries to produce a value from the internal buffer. If no value is produced, it then tries to poll more bytes from the inner reader
This function may return a std::io::ErrorKind::InvalidData if it is not possible to decrypt the message, in this case, further read attempts will always produce the same error.
impl<'__pin, T, U> Unpin for ReadHalf<T, U>where
PinnedFieldsOf<__Origin<'__pin, T, U>>: Unpin,
Auto Trait Implementations§
impl<T, U> Freeze for ReadHalf<T, U>
impl<T, U> RefUnwindSafe for ReadHalf<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for ReadHalf<T, U>
impl<T, U> Sync for ReadHalf<T, U>
impl<T, U> UnwindSafe for ReadHalf<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more