pub struct BitReader<'a> { /* private fields */ }Expand description
MSB-first reader over an RBSP (emulation prevention already removed).
Implementations§
Source§impl<'a> BitReader<'a>
impl<'a> BitReader<'a>
Sourcepub fn bits_left(&self) -> isize
pub fn bits_left(&self) -> isize
Bits left before the end of the buffer (negative once overrun).
Sourcepub fn is_byte_aligned(&self) -> bool
pub fn is_byte_aligned(&self) -> bool
Whether the next read starts on a byte boundary.
Sourcepub fn byte_align(&mut self)
pub fn byte_align(&mut self)
Skip to the next byte boundary (no-op when already on one).
Sourcepub fn byte_pos(&self) -> usize
pub fn byte_pos(&self) -> usize
Byte offset of the reader, rounded up to the next byte boundary.
Sourcepub fn ue(&mut self) -> u32
pub fn ue(&mut self) -> u32
ue(v). Saturates on codes longer than 32 bits, which no conforming
stream contains.
Sourcepub fn more_rbsp_data(&self) -> bool
pub fn more_rbsp_data(&self) -> bool
more_rbsp_data(): whether anything other than the stop bit and its
alignment zeros is left.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for BitReader<'a>
impl<'a> Freeze for BitReader<'a>
impl<'a> Move for BitReader<'a>
impl<'a> RefUnwindSafe for BitReader<'a>
impl<'a> Send for BitReader<'a>
impl<'a> Sync for BitReader<'a>
impl<'a> Unpin for BitReader<'a>
impl<'a> UnsafeUnpin for BitReader<'a>
impl<'a> UnwindSafe for BitReader<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more