[][src]Struct buffered_reader::Generic

pub struct Generic<T: Read, C> {
    pub reader: Box<T>,
    // some fields omitted
}

Wraps a Reader.

This is useful when reading from a file, and it even works with a &[u8] (but Memory is more efficient).

Fields

reader: Box<T>

Implementations

impl<T: Read> Generic<T, ()>[src]

pub fn new(reader: T, preferred_chunk_size: Option<usize>) -> Self[src]

Instantiate a new generic reader. reader is the source to wrap. preferred_chuck_size is the preferred chuck size. If None, then the default will be used, which is usually what you want.

impl<T: Read, C> Generic<T, C>[src]

Like new(), but sets a cookie, which can be retrieved using the cookie_ref and cookie_mut methods, and set using the cookie_set method.

Trait Implementations

impl<T: Read, C> BufferedReader<C> for Generic<T, C>[src]

impl<T: Read, C> Debug for Generic<T, C>[src]

impl<T: Read, C> Display for Generic<T, C>[src]

impl<T: Read, C> Read for Generic<T, C>[src]

Auto Trait Implementations

impl<T, C> RefUnwindSafe for Generic<T, C> where
    C: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, C> Send for Generic<T, C> where
    C: Send,
    T: Send

impl<T, C> Sync for Generic<T, C> where
    C: Sync,
    T: Sync

impl<T, C> Unpin for Generic<T, C> where
    C: Unpin

impl<T, C> UnwindSafe for Generic<T, C> where
    C: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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> ToString for T where
    T: Display + ?Sized
[src]

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.