pub enum FromBytesError {
IoError(Error),
RequiredFieldNotFound,
InternalNul,
MissingNul,
TruncatedField {
wanted: usize,
got: usize,
},
InvalidLength,
InvalidDynDiscriminant,
OddPairItemCount,
}
Expand description
Error type for deserializing data from a byte buffer
Variants§
IoError(Error)
I/O error
RequiredFieldNotFound
Required field not found
InternalNul
NUL inside a string
MissingNul
Missing NUL terminator
TruncatedField
Truncated field
InvalidLength
Invalid length
InvalidDynDiscriminant
Invalid PT_DYN discriminant
OddPairItemCount
Odd item count in pair array
Trait Implementations§
source§impl Debug for FromBytesError
impl Debug for FromBytesError
source§impl Display for FromBytesError
impl Display for FromBytesError
source§impl Error for FromBytesError
impl Error for FromBytesError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for FromBytesError
impl !RefUnwindSafe for FromBytesError
impl Send for FromBytesError
impl Sync for FromBytesError
impl Unpin for FromBytesError
impl !UnwindSafe for FromBytesError
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