[][src]Struct lzzzz::lz4f::AsyncReadCompressor

pub struct AsyncReadCompressor<R: AsyncRead + Unpin> { /* fields omitted */ }
This is supported on feature="async-io" only.

The AsyncRead-based streaming compressor.

Example

use async_std::{fs::File, prelude::*};
use lzzzz::lz4f::AsyncReadCompressor;

let mut f = File::open("foo.txt").await?;
let mut r = AsyncReadCompressor::new(&mut f, Default::default())?;

let mut buf = Vec::new();
r.read_to_end(&mut buf).await?;

Implementations

impl<R: AsyncRead + Unpin> AsyncReadCompressor<R>[src]

pub fn new(reader: R, prefs: Preferences) -> Result<Self>[src]

Creates a new AsyncBufReadCompressor<R>.

pub fn with_dict(
    reader: R,
    prefs: Preferences,
    dict: Dictionary
) -> Result<Self>
[src]

Creates a new AsyncBufReadCompressor<R> with a dictionary.

pub fn get_mut(&mut self) -> &mut R[src]

Returns a mutable reference to the reader.

pub fn get_ref(&self) -> &R[src]

Returns a shared reference to the reader.

pub fn into_inner(self) -> R[src]

Returns ownership of the reader.

Trait Implementations

impl<R: AsyncRead + Unpin> AsyncRead for AsyncReadCompressor<R>[src]

impl<R> Debug for AsyncReadCompressor<R> where
    R: AsyncRead + Unpin + Debug
[src]

impl<R: AsyncRead + Unpin> PinnedDrop for AsyncReadCompressor<R>[src]

impl<'pin, R: AsyncRead + Unpin> Unpin for AsyncReadCompressor<R> where
    __AsyncReadCompressor<'pin, R>: Unpin
[src]

impl<R: AsyncRead + Unpin> UnsafeUnpin for AsyncReadCompressor<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for AsyncReadCompressor<R> where
    R: RefUnwindSafe

impl<R> Send for AsyncReadCompressor<R> where
    R: Send

impl<R> !Sync for AsyncReadCompressor<R>

impl<R> UnwindSafe for AsyncReadCompressor<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReadExt for T where
    T: AsyncRead + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.