#[non_exhaustive]pub enum IntegerDecodingError {
TooManyOctets,
ValueTooLarge,
NotEnoughOctets,
InvalidPrefix,
}Expand description
Represents all errors that can be encountered while decoding an integer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TooManyOctets
5.1. specifies that “excessively large integer decodings” MUST be considered an error (whether the size is the number of octets or value). This variant corresponds to the encoding containing too many octets.
ValueTooLarge
The variant corresponds to the case where the value of the integer being decoded exceeds a certain threshold.
NotEnoughOctets
When a buffer from which an integer was supposed to be encoded does not contain enough octets to complete the decoding.
InvalidPrefix
Only valid prefixes are [1, 8]
Trait Implementations§
Source§impl Clone for IntegerDecodingError
impl Clone for IntegerDecodingError
Source§fn clone(&self) -> IntegerDecodingError
fn clone(&self) -> IntegerDecodingError
Returns a duplicate 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 IntegerDecodingError
impl Debug for IntegerDecodingError
Source§impl Display for IntegerDecodingError
impl Display for IntegerDecodingError
Source§impl Error for IntegerDecodingError
impl Error for IntegerDecodingError
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()
Source§impl PartialEq for IntegerDecodingError
impl PartialEq for IntegerDecodingError
impl Copy for IntegerDecodingError
impl StructuralPartialEq for IntegerDecodingError
Auto Trait Implementations§
impl Freeze for IntegerDecodingError
impl RefUnwindSafe for IntegerDecodingError
impl Send for IntegerDecodingError
impl Sync for IntegerDecodingError
impl Unpin for IntegerDecodingError
impl UnwindSafe for IntegerDecodingError
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