[−][src]Struct bitrw::BitRead
Provides BitRead
from a Read
.
use bitrw::UseBitRead; let mut c = std::io::Cursor::new(&[0b00_11_10_1_0, 0b1_110_101_1, 0b1101000]); let mut r = c.use_bit_read(); assert_eq!(r.read::<u8>(0).unwrap(), 0); assert_eq!(r.read::<u16>(1).unwrap(), 0); assert_eq!(r.read::<u32>(1).unwrap(), 1); assert_eq!(r.read::<u64>(2).unwrap(), 2); assert_eq!(r.read::<u128>(2).unwrap(), 3); assert_eq!(r.read::<usize>(3).unwrap(), 4); assert_eq!(r.read::<u8>(3).unwrap(), 5); assert_eq!(r.read::<u16>(3).unwrap(), 6); assert_eq!(r.read::<u32>(8).unwrap(), 0b11010001);
Methods
impl<'_> BitRead<'_>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,