pub enum CwtParseError {
CborError(Error<Error>),
InvalidRootValue,
InvalidTag(u64),
InvalidParts,
InvalidPartsCount(usize),
MalformedUnProtectedHeader,
ProtectedHeaderNotBinary,
ProtectedHeaderNotValidCbor,
ProtectedHeaderNotMap,
PayloadNotBinary,
InvalidPayload(Error<Error>),
SignatureNotBinary,
}
Expand description
An enum representing all the possible errors that can occur while trying to parse data representing a CWT (CBOR Web Token).
Variants§
CborError(Error<Error>)
Cannot parse the data as CBOR
InvalidRootValue
The root value is not a tag
InvalidTag(u64)
The root tag is invalid
InvalidParts
The main CBOR object is not an array
InvalidPartsCount(usize)
The main CBOR array does not contain 4 parts
MalformedUnProtectedHeader
The unprotected header section is not a CBOR map or an emtpy sequence of bytes
ProtectedHeaderNotBinary
The protected header section is not a binary string
ProtectedHeaderNotValidCbor
The protected header section is not valid CBOR-encoded data
ProtectedHeaderNotMap
The protected header section does not contain key-value pairs
PayloadNotBinary
The payload section is not a binary string
InvalidPayload(Error<Error>)
Cannot deserialize the payload
SignatureNotBinary
The signature section is not a binary string
Trait Implementations§
Source§impl Debug for CwtParseError
impl Debug for CwtParseError
Source§impl Display for CwtParseError
impl Display for CwtParseError
Source§impl Error for CwtParseError
impl Error for CwtParseError
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 From<CwtParseError> for ParseError
impl From<CwtParseError> for ParseError
Source§fn from(source: CwtParseError) -> Self
fn from(source: CwtParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CwtParseError
impl !RefUnwindSafe for CwtParseError
impl Send for CwtParseError
impl Sync for CwtParseError
impl Unpin for CwtParseError
impl !UnwindSafe for CwtParseError
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