pub enum BitReaderError {
NotEnoughData {
position: u64,
length: u64,
requested: u64,
},
TooManyBitsForType {
position: u64,
requested: u8,
allowed: u8,
},
}
Expand description
Error enumeration of BitReader errors.
Variants§
NotEnoughData
Requested more bits than there are left in the byte slice at the current position.
Fields
TooManyBitsForType
Requested more bits than the returned variable can hold, for example more than 8 bits when reading into a u8.
Trait Implementations§
Source§impl Clone for BitReaderError
impl Clone for BitReaderError
Source§fn clone(&self) -> BitReaderError
fn clone(&self) -> BitReaderError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BitReaderError
impl Debug for BitReaderError
Source§impl Display for BitReaderError
impl Display for BitReaderError
Source§impl Error for BitReaderError
impl Error for BitReaderError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§impl PartialEq for BitReaderError
impl PartialEq for BitReaderError
impl Copy for BitReaderError
impl StructuralPartialEq for BitReaderError
Auto Trait Implementations§
impl Freeze for BitReaderError
impl RefUnwindSafe for BitReaderError
impl Send for BitReaderError
impl Sync for BitReaderError
impl Unpin for BitReaderError
impl UnwindSafe for BitReaderError
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