pub enum ReadError {
EndOfInput,
UnknownVariant(u16),
InvalidUtf8String(FromUtf8Error),
InvalidUtf8Str(Utf8Error),
TrailingBytes(usize),
ReaderNotPersistent,
}Expand description
Error thrown while reading
Variants§
EndOfInput
The reader was exhausted before the object could be deserialized
UnknownVariant(u16)
While reading a variant, encountered a variant that did not exist in the current version.
InvalidUtf8String(FromUtf8Error)
While reading a String, could not interpret it as a valid UTF8 string
InvalidUtf8Str(Utf8Error)
While reading a &str, could not interpret it as a valid UTF8 string
TrailingBytes(usize)
If ReadConfig::error_on_trailing_bytes is set to true, this error will be thrown when there are still bytes left to be read.
ReaderNotPersistent
Throws an error when Reader::read_slice is called but the reader does not have a persistent buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadError
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnwindSafe for ReadError
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