pub struct ChaCha<T, C = ChaCha20> {
pub wrapped: T,
pub read: C,
pub write: C,
}
Fields§
§wrapped: T
§read: C
§write: C
Implementations§
Trait Implementations§
Source§impl<T: Ord, C: Ord> Ord for ChaCha<T, C>
impl<T: Ord, C: Ord> Ord for ChaCha<T, C>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, C: PartialOrd> PartialOrd for ChaCha<T, C>
impl<T: PartialOrd, C: PartialOrd> PartialOrd for ChaCha<T, C>
Source§impl<T: Read, C: StreamCipher> Read for ChaCha<T, C>
impl<T: Read, C: StreamCipher> Read for ChaCha<T, C>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
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§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl<T: Read, C: StreamCipher> Read for ChaCha<T, C>
impl<T: Read, C: StreamCipher> Read for ChaCha<T, C>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
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>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl<T: Write, C: StreamCipherSeek + StreamCipher> Write for ChaCha<T, C>
impl<T: Write, C: StreamCipherSeek + StreamCipher> Write for ChaCha<T, C>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Source§impl<T: Write, C: StreamCipherSeek + StreamCipher> Write for ChaCha<T, C>
impl<T: Write, C: StreamCipherSeek + StreamCipher> Write for ChaCha<T, C>
Source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
impl<T: Copy, C: Copy> Copy for ChaCha<T, C>
impl<T: Eq, C: Eq> Eq for ChaCha<T, C>
impl<T, C> StructuralPartialEq for ChaCha<T, C>
Auto Trait Implementations§
impl<T, C> Freeze for ChaCha<T, C>
impl<T, C> RefUnwindSafe for ChaCha<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for ChaCha<T, C>
impl<T, C> Sync for ChaCha<T, C>
impl<T, C> Unpin for ChaCha<T, C>
impl<T, C> UnwindSafe for ChaCha<T, C>where
T: UnwindSafe,
C: 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