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: {0:?}
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§
source§impl Error
impl Error
sourcepub const fn invalid_value(tag: Tag, msg: String) -> Self
pub const fn invalid_value(tag: Tag, msg: String) -> Self
Build an error from the provided invalid value
sourcepub const fn unexpected_class(expected: Option<Class>, actual: Class) -> Self
pub const fn unexpected_class(expected: Option<Class>, actual: Class) -> Self
Build an error from the provided unexpected class
sourcepub const fn unexpected_tag(expected: Option<Tag>, actual: Tag) -> Self
pub const fn unexpected_tag(expected: Option<Tag>, actual: Tag) -> Self
Build an error from the provided unexpected tag
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Error> for SerializeError
impl From<Error> for SerializeError
source§impl From<FromUtf16Error> for Error
impl From<FromUtf16Error> for Error
source§fn from(_: FromUtf16Error) -> Self
fn from(_: FromUtf16Error) -> Self
source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
source§fn from(_: FromUtf8Error) -> Self
fn from(_: FromUtf8Error) -> Self
source§impl<I, E> FromExternalError<I, E> for Error
impl<I, E> FromExternalError<I, E> for Error
source§impl<'a> ParseError<&'a [u8]> for Error
impl<'a> ParseError<&'a [u8]> for Error
source§fn from_error_kind(_input: &'a [u8], kind: ErrorKind) -> Self
fn from_error_kind(_input: &'a [u8], kind: ErrorKind) -> Self
source§fn append(_input: &'a [u8], kind: ErrorKind, _other: Self) -> Self
fn append(_input: &'a [u8], kind: ErrorKind, _other: Self) -> Self
source§impl PartialEq for Error
impl PartialEq for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)