[−][src]Struct bitstream_io::read::ByteReader
For reading aligned bytes from a stream of bytes in a given endianness.
This only reads aligned values and maintains no internal state.
Implementations
impl<R: Read, E: Endianness> ByteReader<R, E>[src]
pub fn new(reader: R) -> ByteReader<R, E>[src]
Wraps a ByteReader around something that implements Read
pub fn endian(reader: R, _endian: E) -> ByteReader<R, E>[src]
Wraps a ByteReader around something that implements Read
with the given endianness.
pub fn into_reader(self) -> R[src]
Unwraps internal reader and disposes of ByteReader.
pub fn reader(&mut self) -> &mut R[src]
Provides mutable reference to internal reader
pub fn into_bitreader(self) -> BitReader<R, E>[src]
Converts ByteReader to BitReader in the same endianness.
pub fn bitreader(&mut self) -> BitReader<&mut R, E>[src]
Provides temporary BitReader in the same endianness.
Warning
Any unread bits left over when BitReader is dropped are lost.
Trait Implementations
impl<R: Read, E: Endianness> ByteRead for ByteReader<R, E>[src]
Auto Trait Implementations
impl<R, E> RefUnwindSafe for ByteReader<R, E> where
E: RefUnwindSafe,
R: RefUnwindSafe, [src]
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, E> Send for ByteReader<R, E> where
E: Send,
R: Send, [src]
E: Send,
R: Send,
impl<R, E> Sync for ByteReader<R, E> where
E: Sync,
R: Sync, [src]
E: Sync,
R: Sync,
impl<R, E> Unpin for ByteReader<R, E> where
E: Unpin,
R: Unpin, [src]
E: Unpin,
R: Unpin,
impl<R, E> UnwindSafe for ByteReader<R, E> where
E: UnwindSafe,
R: UnwindSafe, [src]
E: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
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.
pub 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>,