pub enum EncodeError<T>{
ValueTooSmall(T),
Underflow(T),
}
Expand description
Indicates that encoding a number failed.
Variants§
ValueTooSmall(T)
Indicates an attempt to encode the number 0
, which can’t be
represented in fibonacci encoding.
Underflow(T)
A bug in fibonacci_codec in which encoding the contained number resulted in an attempt to subtract a larger fibonacci number than the number to encode.
Trait Implementations§
Source§impl<T> Debug for EncodeError<T>
impl<T> Debug for EncodeError<T>
Source§impl<T> Display for EncodeError<T>
impl<T> Display for EncodeError<T>
Source§impl<T> Fail for EncodeError<T>
impl<T> Fail for EncodeError<T>
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
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<T> PartialEq for EncodeError<T>
impl<T> PartialEq for EncodeError<T>
impl<T> StructuralPartialEq for EncodeError<T>
Auto Trait Implementations§
impl<T> Freeze for EncodeError<T>where
T: Freeze,
impl<T> RefUnwindSafe for EncodeError<T>where
T: RefUnwindSafe,
impl<T> Send for EncodeError<T>
impl<T> Sync for EncodeError<T>
impl<T> Unpin for EncodeError<T>where
T: Unpin,
impl<T> UnwindSafe for EncodeError<T>where
T: UnwindSafe,
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