pub enum ReadError {
NotEnoughBytes(usize, usize),
UnconsumedData(usize),
SizeTooBig(usize, usize),
StructureInvalid(String),
UnknownTag(u32),
}
Variants
NotEnoughBytes(usize, usize)
Return the number of bytes left and the number of bytes demanded
UnconsumedData(usize)
Data is left in the buffer
SizeTooBig(usize, usize)
Expecting a size that is above the limit
StructureInvalid(String)
Structure of data is not what it should be
UnknownTag(u32)
Unknown enumeration tag
Trait Implementations
sourceimpl Error for ReadError
impl Error for ReadError
1.30.0 · sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
impl Eq for ReadError
impl StructuralEq for ReadError
impl StructuralPartialEq for ReadError
Auto Trait Implementations
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnwindSafe for ReadError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more