#[non_exhaustive]pub enum ErrorKind {
IoError(Error),
ResponseSizeExceedsLimit(usize),
MalformedTtlv(MalformedTtlvError),
SerdeError(SerdeError),
}Expand description
Details about the kind of error that occurred.
Errors can be roughly split into the following categories:
- Errors while reading/writing, i.e. ErrorKind::IoError and ErrorKind::ResponseSizeExceedsLimit.
- Errors while parsing/generating TTLV bytes, i.e. ErrorKind::MalformedTtlv.
- Errors while (de)serializing from/to Rust data structures, i.e. ErrorKind::SerdeError.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IoError(Error)
ResponseSizeExceedsLimit(usize)
MalformedTtlv(MalformedTtlvError)
SerdeError(SerdeError)
Trait Implementations§
Source§impl From<MalformedTtlvError> for ErrorKind
impl From<MalformedTtlvError> for ErrorKind
Source§fn from(err: MalformedTtlvError) -> Self
fn from(err: MalformedTtlvError) -> Self
Converts to this type from the input type.
Source§impl From<SerdeError> for ErrorKind
impl From<SerdeError> for ErrorKind
Source§fn from(err: SerdeError) -> Self
fn from(err: SerdeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorKind
impl !UnwindSafe for ErrorKind
impl Freeze for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
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