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§
source§impl Error for ReadError
impl Error for ReadError
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()