pub enum MalformedReason {
InvalidVersion(String),
UnexpectedKey {
expected: &'static str,
got: String,
},
MissingField(&'static str),
MalformedOidValue(String),
UnsupportedOidType(String),
InvalidOidHash(OidParseError),
InvalidSize(String),
DuplicateExtensionPriority(u8),
}Expand description
Specific reason a DecodeError::Malformed was returned.
Each variant marks a pointer that passed the not-a-pointer shape checks but failed deeper validation; callers should surface the error to the user.
Variants§
InvalidVersion(String)
The version value isn’t one of the recognized spec URLs.
UnexpectedKey
A line’s key was unexpected at this point in the parse.
MissingField(&'static str)
A required line (oid or size) was missing.
MalformedOidValue(String)
An OID value isn’t in <type>:<hash> form.
UnsupportedOidType(String)
An OID’s type prefix wasn’t sha256 (the only one we support).
InvalidOidHash(OidParseError)
An OID hash failed OidParseError validation (length or
character set).
InvalidSize(String)
The size value isn’t a non-negative integer.
DuplicateExtensionPriority(u8)
Two extension records shared the same priority digit.
Trait Implementations§
Source§impl Clone for MalformedReason
impl Clone for MalformedReason
Source§fn clone(&self) -> MalformedReason
fn clone(&self) -> MalformedReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MalformedReason
impl Debug for MalformedReason
Source§impl Display for MalformedReason
impl Display for MalformedReason
Source§impl Error for MalformedReason
impl Error for MalformedReason
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 MalformedReason
impl PartialEq for MalformedReason
Source§fn eq(&self, other: &MalformedReason) -> bool
fn eq(&self, other: &MalformedReason) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MalformedReason
impl StructuralPartialEq for MalformedReason
Auto Trait Implementations§
impl Freeze for MalformedReason
impl RefUnwindSafe for MalformedReason
impl Send for MalformedReason
impl Sync for MalformedReason
impl Unpin for MalformedReason
impl UnsafeUnpin for MalformedReason
impl UnwindSafe for MalformedReason
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