Started AsyncSource.

Fortune for chacha20stream's current commit: Half blessing − 半吉
read-stream-wrapper-async
Avril 3 years ago
parent e536d6b232
commit 5d1ac4fa7a
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -28,6 +28,9 @@ pub type Error = ErrorStack;
pub mod sink; pub mod sink;
pub use sink::Sink; pub use sink::Sink;
pub mod source;
pub use source::Source;
#[cfg(test)] #[cfg(test)]
mod test mod test
{ {

@ -1,4 +1,4 @@
//! Asyncronous `Write` wrapper. //! Asyncronous `AsyncWrite` wrapper.
use super::*; use super::*;
/// Async ChaCha Sink /// Async ChaCha Sink

@ -0,0 +1,14 @@
//! Asyncronous `AsyncRead` wrapper.
use super::*;
/// TODO: Document
//#[derive(Debug)]
#[pin_project]
pub struct Source<R>
{
#[pin] stream: R,
crypter: Crypter, // for chacha, finalize does nothing it seems. we can also call it multiple times.
buffer: BufferVec, // used to buffer the operation (ad-hoc-buffer wouldn't work for async operations as the buffer may need to be saved over yields.)
}
Loading…
Cancel
Save