pub enum DecodeError {
FibonacciElementOverflow {
bit_pos: usize,
},
ConstructionOverflow {
bit_pos: usize,
},
}
Expand description
Returned if decoding a number fails. Usually indicates an overflow of the number being decoded.
Variants§
FibonacciElementOverflow
Indicates that the decoded number depends on a fibonacci sequence element that doesn’t fit the return type.
ConstructionOverflow
Indicates that the decoded number does not fit into the given result type. This more than anything indicates that a bit flip has occurred, and the next number can’t be trusted either.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Fail for DecodeError
impl Fail for DecodeError
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreSource§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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