[][src]Struct lzzzz::lz4f::AsyncBufReadCompressor

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

The AsyncBufRead-based streaming compressor.

Example

use async_std::{fs::File, io::BufReader, prelude::*};
use lzzzz::lz4f::AsyncBufReadCompressor;

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

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

Implementations

impl<R: AsyncBufRead + Unpin> AsyncBufReadCompressor<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: AsyncBufRead + Unpin> AsyncBufRead for AsyncBufReadCompressor<R>[src]

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

impl<R> Debug for AsyncBufReadCompressor<R> where
    R: AsyncBufRead + Unpin + Debug
[src]

impl<R: AsyncBufRead + Unpin> PinnedDrop for AsyncBufReadCompressor<R>[src]

impl<'pin, R: AsyncBufRead + Unpin> Unpin for AsyncBufReadCompressor<R> where
    __AsyncBufReadCompressor<'pin, R>: Unpin
[src]

impl<R: AsyncBufRead + Unpin> UnsafeUnpin for AsyncBufReadCompressor<R>[src]

Auto Trait Implementations

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

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

impl<R> !Sync for AsyncBufReadCompressor<R>

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

Blanket Implementations

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

impl<R> AsyncBufReadExt for R where
    R: AsyncBufRead + ?Sized

impl<R> AsyncBufReadExt for R where
    R: AsyncBufRead + ?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> BufReadExt for T where
    T: AsyncBufRead + ?Sized

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.