pub enum BitError {
OutOfBounds {
position: usize,
width: usize,
available: usize,
},
TooWide {
width: u32,
},
}Expand description
Reading past the end of the data, or asking for more bits than fit in the result.
Variants§
OutOfBounds
The requested field extends past the end of the buffer.
Fields
TooWide
More than 64 bits were requested as an integer.
Trait Implementations§
impl Copy for BitError
impl Eq for BitError
Source§impl Error for BitError
impl Error for BitError
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
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for BitError
Auto Trait Implementations§
impl Forget for BitError
impl Freeze for BitError
impl Move for BitError
impl RefUnwindSafe for BitError
impl Send for BitError
impl Sync for BitError
impl Unpin for BitError
impl UnsafeUnpin for BitError
impl UnwindSafe for BitError
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