Enum der_parser::error::Error
source · [−]pub enum Error {
Show 21 variants
BerTypeError,
BerValueError,
InvalidLength,
InvalidValue {
tag: Tag,
msg: String,
},
InvalidTag,
UnknownTag(u32),
UnexpectedTag {
expected: Option<Tag>,
actual: Tag,
},
UnexpectedClass {
expected: Option<Class>,
actual: Class,
},
IndefiniteLengthUnexpected,
ConstructExpected,
ConstructUnexpected,
IntegerTooLarge,
IntegerNegative,
BerMaxDepth,
StringInvalidCharset,
InvalidDateTime,
DerConstraintFailed(DerConstraint),
LifetimeError,
Unsupported,
Incomplete(Needed),
NomError(ErrorKind),
}
Variants
BerTypeError
BER object does not have the expected type
BerValueError
BER object does not have the expected value
InvalidLength
Invalid Length
InvalidValue
Invalid Value when parsing object with tag {tag:?} {msg:}
InvalidTag
Invalid Tag
UnknownTag(u32)
Unknown tag: {0:?}
UnexpectedTag
Unexpected Tag (expected: {expected:?}, actual: {actual:?})
UnexpectedClass
Unexpected Class (expected: {expected:?}, actual: {actual:?})
IndefiniteLengthUnexpected
Indefinite length not allowed
ConstructExpected
DER object was expected to be constructed (and found to be primitive)
ConstructUnexpected
DER object was expected to be primitive (and found to be constructed)
IntegerTooLarge
Integer too large to fit requested type
IntegerNegative
BER integer is negative, while an unsigned integer was requested
BerMaxDepth
BER recursive parsing reached maximum depth
StringInvalidCharset
Invalid encoding or forbidden characters in string
InvalidDateTime
Invalid Date or Time
DerConstraintFailed(DerConstraint)
DER Failed constraint
LifetimeError
Requesting borrowed data from a temporary object
Unsupported
Feature is not yet implemented
Incomplete(Needed)
incomplete data, missing: {0:?}
NomError(ErrorKind)
nom error: {0:?}
Implementations
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<FromUtf16Error> for Error
impl From<FromUtf16Error> for Error
sourcefn from(FromUtf16Error) -> Error
fn from(FromUtf16Error) -> Error
Converts to this type from the input type.
sourceimpl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
sourcefn from(FromUtf8Error) -> Error
fn from(FromUtf8Error) -> Error
Converts to this type from the input type.
sourceimpl<I, E> FromExternalError<I, E> for Error
impl<I, E> FromExternalError<I, E> for Error
sourceimpl<'a> ParseError<&'a [u8]> for Error
impl<'a> ParseError<&'a [u8]> for Error
sourcefn from_error_kind(_input: &'a [u8], kind: ErrorKind) -> Error
fn from_error_kind(_input: &'a [u8], kind: ErrorKind) -> Error
Creates an error from the input position and an ErrorKind
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
sourceimpl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more