pub enum EnvelopeError {
InvalidTlvType(u8),
InvalidTlvLength(usize),
UnexpectedEof(usize),
InvalidUtf8(FromUtf8Error),
InvalidTimestamp(u64),
InvalidSequence(u64),
StringTooLong(String, usize),
MalformedHeader(String),
DuplicateTlvEntry(u8),
NonCanonicalOrder(u8, u8),
Io(String),
}Expand description
Errors that can occur when working with envelopes
Variants§
InvalidTlvType(u8)
Invalid TLV type code
InvalidTlvLength(usize)
Invalid TLV length
UnexpectedEof(usize)
Unexpected end of data
InvalidUtf8(FromUtf8Error)
Invalid UTF-8 in string field
InvalidTimestamp(u64)
Invalid timestamp value
InvalidSequence(u64)
Invalid sequence value
StringTooLong(String, usize)
String field exceeds maximum length
MalformedHeader(String)
Malformed envelope header in text format
DuplicateTlvEntry(u8)
Duplicate TLV entry
NonCanonicalOrder(u8, u8)
TLV entries not in canonical order
Io(String)
IO error
Trait Implementations§
Source§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
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<Error> for EnvelopeError
impl From<Error> for EnvelopeError
Source§impl From<FromUtf8Error> for EnvelopeError
impl From<FromUtf8Error> for EnvelopeError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EnvelopeError
impl PartialEq for EnvelopeError
impl StructuralPartialEq for EnvelopeError
Auto Trait Implementations§
impl Freeze for EnvelopeError
impl RefUnwindSafe for EnvelopeError
impl Send for EnvelopeError
impl Sync for EnvelopeError
impl Unpin for EnvelopeError
impl UnwindSafe for EnvelopeError
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