pub enum Error {
EndOfStream {
total: usize,
read: usize,
requested: usize,
},
ByteLenTooLong {
len: usize,
},
InvalidType,
}
Variants§
EndOfStream
Emitted when trying to read more bytes than
there are available/remaining from a Deserializer
.
ByteLenTooLong
Emitted when trying to encode the usize
length
of a sequence type which exceeds ByteLen::MAX
.
InvalidType
Emitted (usually when deserializing) when some byte/s are interpreted as invalid in the context of the given type. This strongly depends on the particular type and some types may not even have bytes that are “invalid” (such as numeric types).
Trait Implementations§
source§impl PartialEq<Error> for Error
impl PartialEq<Error> 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