#[non_exhaustive]pub enum DataDecodeError {
NotEnoughBytes,
IntegerOverflow,
InvalidUtf8,
}Expand description
Indicates that an error has occured because the bytes being decoded were invalid in some way.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotEnoughBytes
The underlying reader did not return enough data to construct the type being read.
IntegerOverflow
The underlying data overflowed the current integer type being constructed.
InvalidUtf8
The underlaying data could not be converted to the type because it is not valid utf-8
Trait Implementations§
Source§impl Clone for DataDecodeError
impl Clone for DataDecodeError
Source§fn clone(&self) -> DataDecodeError
fn clone(&self) -> DataDecodeError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataDecodeError
impl Debug for DataDecodeError
Source§impl Display for DataDecodeError
impl Display for DataDecodeError
Source§impl Error for DataDecodeError
impl Error for DataDecodeError
Source§fn source(&self) -> Option<&(dyn stdError + 'static)>
fn source(&self) -> Option<&(dyn stdError + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Hash for DataDecodeError
impl Hash for DataDecodeError
Source§impl PartialEq for DataDecodeError
impl PartialEq for DataDecodeError
impl Copy for DataDecodeError
impl Eq for DataDecodeError
impl StructuralPartialEq for DataDecodeError
Auto Trait Implementations§
impl Freeze for DataDecodeError
impl RefUnwindSafe for DataDecodeError
impl Send for DataDecodeError
impl Sync for DataDecodeError
impl Unpin for DataDecodeError
impl UnwindSafe for DataDecodeError
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