Add more doc for AsyncFileWriter

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-09 21:34:07 +10:00
parent 5ba8b07bcb
commit e62775a9ec
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -148,6 +148,11 @@ impl AsyncFileWriterInner {
}
}
/// AsyncFileWriter will pass the `Bytes` you give to another thread via
/// a `mpsc` and decompress and unpack it if needed.
///
/// # Cancellation
///
/// AsyncFileWriter removes the file if `done` isn't called.
#[derive(Debug)]
pub struct AsyncFileWriter(ScopeGuard<AsyncFileWriterInner, fn(AsyncFileWriterInner), Always>);