[−][src]Struct claxon::input::BufferedReader
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_u8(&mut self) -> Result<u8>
[src]
fn read_u8_or_eof(&mut self) -> Result<Option<u8>>
[src]
fn read_into(&mut self, buffer: &mut [u8]) -> Result<()>
[src]
fn skip(&mut self, amount: u32) -> Result<()>
[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,
R: Unpin,
impl<R> Sync for BufferedReader<R> where
R: Sync,
R: Sync,
impl<R> Send for BufferedReader<R> where
R: Send,
R: Send,
impl<R> UnwindSafe for BufferedReader<R> where
R: UnwindSafe,
R: UnwindSafe,
impl<R> RefUnwindSafe for BufferedReader<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,