pub enum Error {
EncodingError(String),
InvalidVectorLength,
InvalidWriteLength(String),
InvalidInput,
DecodingError(String),
EndOfStream,
TrailingData,
UnknownValue(u64),
LibraryError,
}
Expand description
Errors that are thrown by this crate.
Variants§
EncodingError(String)
An error occurred during encoding.
InvalidVectorLength
The length of a vector is invalid.
InvalidWriteLength(String)
Error writing everything out.
InvalidInput
Invalid input when trying to decode a primitive integer.
DecodingError(String)
An error occurred during decoding.
EndOfStream
Reached the end of a byte stream.
TrailingData
Found unexpected data after deserializing.
UnknownValue(u64)
An unknown value in an enum. The application might not want to treat this as an error because it is only an unknown value, not an invalid value.
LibraryError
An internal library error that indicates a bug.
Trait Implementations§
source§impl Error for Error
Available on crate feature std
only.
impl Error for Error
Available on crate feature
std
only.1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Infallible> for Error
impl From<Infallible> for Error
source§fn from(_e: Infallible) -> Self
fn from(_e: Infallible) -> Self
Converts to this type from the input type.
source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
source§fn from(_e: TryFromIntError) -> Self
fn from(_e: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
source§fn from(_: TryFromSliceError) -> Self
fn from(_: TryFromSliceError) -> Self
Converts to this type from the input type.
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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