pub enum ErrorKind {
UnexpectedEndOfFile,
InvalidType(Expectation<String>),
InvalidValue(Expectation<String>),
InvalidLength(Expectation<String>),
UnknownLength,
NumberOutOfRange,
Uncategorized(String),
DepthLimitExceeded,
Utf8(Utf8Error),
ReservedType,
StdIo(Error),
}Expand description
This type represents all possible errors that can occur when serializing or deserializing Lilliput data.
Variants§
UnexpectedEndOfFile
Unexpected EOF while parsing.
InvalidType(Expectation<String>)
A mismatch occurred between the decoded and expected value types.
InvalidValue(Expectation<String>)
The enclosed I/O error occurred while trying to read the encoded MessagePack data.
InvalidLength(Expectation<String>)
A decoded sequence/map did not have the enclosed expected length.
UnknownLength
An encoded sequence/map did not provide a length.
NumberOutOfRange
A numeric cast failed due to an out-of-range error.
Uncategorized(String)
An otherwise uncategorized error occurred.
DepthLimitExceeded
The depth limit was exceeded.
Utf8(Utf8Error)
An encoded string could not be parsed as UTF-8.
ReservedType
ReservedType.
StdIo(Error)
std::io::Error.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorKind
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe 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