[][src]Struct claxon::input::BufferedReader

pub struct BufferedReader<R: Read> { /* fields omitted */ }

Similar to std::io::BufRead, but more performant.

There is no simple way to wrap a standard BufRead such that it can compute checksums on consume. This is really something that needs a less restrictive interface. Apart from enabling checksum computations, this buffered reader has some convenience functions.

Methods

impl<R: Read> BufferedReader<R>[src]

pub fn new(inner: R) -> BufferedReader<R>[src]

Wrap the reader in a new buffered reader.

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

Destroys the buffered reader, returning the wrapped reader.

Anything in the buffer will be lost.

Trait Implementations

impl<R: Read> ReadBytes for BufferedReader<R>[src]

fn read_be_u16(&mut self) -> Result<u16>[src]

Reads two bytes and interprets them as a big-endian 16-bit unsigned integer.

fn read_be_u16_or_eof(&mut self) -> Result<Option<u16>>[src]

Reads two bytes and interprets them as a big-endian 16-bit unsigned integer.

fn read_be_u24(&mut self) -> Result<u32>[src]

Reads three bytes and interprets them as a big-endian 24-bit unsigned integer.

fn read_be_u32(&mut self) -> Result<u32>[src]

Reads four bytes and interprets them as a big-endian 32-bit unsigned integer.

fn read_le_u32(&mut self) -> Result<u32>[src]

Reads four bytes and interprets them as a little-endian 32-bit unsigned integer.

Auto Trait Implementations

impl<R> Unpin for BufferedReader<R> where
    R: Unpin

impl<R> Sync for BufferedReader<R> where
    R: Sync

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

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

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

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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