Enum bitreader::BitReaderError
source · 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
Fields
Requested more bits than there are left in the byte slice at the current position.
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)>
The lower-level source of this error, if any. Read more
source§impl PartialEq<BitReaderError> for BitReaderError
impl PartialEq<BitReaderError> for BitReaderError
source§fn eq(&self, other: &BitReaderError) -> bool
fn eq(&self, other: &BitReaderError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BitReaderError
impl StructuralPartialEq for BitReaderError
Auto Trait Implementations§
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