Enum der::ErrorKind [−][src]
Error type.
Variants (Non-exhaustive)
This error indicates a previous DER parsing operation resulted in
an error and tainted the state of a Decoder
or Encoder
.
Once this occurs, the overall operation has failed and cannot be subsequently resumed.
Incorrect length for a given field.
Fields of Length
tag: Tag
Tag type of the value being decoded.
Message is not canonically encoded.
Malformed OID
Integer overflow occurred (library bug!).
Message is longer than this library’s internal limits support.
Undecoded trailing data at end of message.
Fields of TrailingData
Unexpected end-of-message/nested field when decoding.
Encoded message is shorter than the expected length.
(i.e. an Encodable
impl on a particular type has a buggy encoded_len
)
Unexpected tag.
Fields of UnexpectedTag
oid
only.Unknown OID.
This error is intended to be used by libraries which parse DER-based formats which encounter unknown or unsupported OID libraries.
It enables passing back the OID value to the caller, which allows them to determine which OID(s) are causing the error (and then potentially contribute upstream support for algorithms they care about).
Fields of UnknownOid
oid: ObjectIdentifier
OID value that was unrecognized by a parser for a DER-based format.
Unknown/unsupported tag.
Fields of UnknownTag
byte: u8
Raw byte value of the tag.
Utf8(Utf8Error)
UTF-8 errors.
Unexpected value.
Fields of Value
tag: Tag
Tag of the unexpected value.
Implementations
impl ErrorKind
[src]
pub fn at(self, position: Length) -> Error
[src]
Annotate an ErrorKind
with context about where it occurred,
returning an error.
Trait Implementations
impl Clone for ErrorKind
[src]
impl Copy for ErrorKind
[src]
impl Debug for ErrorKind
[src]
impl Display for ErrorKind
[src]
impl Eq for ErrorKind
[src]
impl Error for ErrorKind
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<ErrorKind> for Error
[src]
impl PartialEq<ErrorKind> for ErrorKind
[src]
impl StructuralEq for ErrorKind
[src]
impl StructuralPartialEq for ErrorKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,