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
position: u64
Current posititon in bits relative to the beginning of the reader.
length: u64
Total readable length in bits of the underlaying slice.
requested: u64
Bits requested to be read.
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
sourceimpl Clone for BitReaderError
impl Clone for BitReaderError
sourcefn clone(&self) -> BitReaderError
fn clone(&self) -> BitReaderError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BitReaderError
impl Debug for BitReaderError
sourceimpl Display for BitReaderError
impl Display for BitReaderError
sourceimpl Error for BitReaderError
impl Error for BitReaderError
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl PartialEq<BitReaderError> for BitReaderError
impl PartialEq<BitReaderError> for BitReaderError
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &BitReaderError) -> bool
fn ne(&self, other: &BitReaderError) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more