[][src]Struct buffered_reader::Memory

pub struct Memory<'a, C> { /* fields omitted */ }

Wraps a memory buffer.

Although it is possible to use Generic to wrap a buffer, this implementation is optimized for a memory buffer, and avoids double buffering.

Implementations

impl<'a> Memory<'a, ()>[src]

pub fn new(buffer: &'a [u8]) -> Self[src]

Instantiates a new Memory.

buffer contains the Memory's contents.

impl<'a, C> Memory<'a, C>[src]

Like new(), but sets a cookie.

The cookie can be retrieved using the cookie_ref and cookie_mut methods, and set using the cookie_set method.

pub fn total_out(&self) -> usize[src]

Returns the number of bytes that have been consumed by this reader.

Trait Implementations

impl<'a, C> BufferedReader<C> for Memory<'a, C>[src]

impl<'a, C> Debug for Memory<'a, C>[src]

impl<'a, C> Display for Memory<'a, C>[src]

impl<'a, C> Read for Memory<'a, C>[src]

Auto Trait Implementations

impl<'a, C> RefUnwindSafe for Memory<'a, C> where
    C: RefUnwindSafe

impl<'a, C> Send for Memory<'a, C> where
    C: Send

impl<'a, C> Sync for Memory<'a, C> where
    C: Sync

impl<'a, C> Unpin for Memory<'a, C> where
    C: Unpin

impl<'a, C> UnwindSafe for Memory<'a, C> where
    C: 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.