Enum zerovec::ZeroVecError
source · #[non_exhaustive]pub enum ZeroVecError {
InvalidLength {
ty: &'static str,
len: usize,
},
ParseError {
ty: &'static str,
},
VarZeroVecFormatError,
}
Expand description
A generic error type to be used for decoding slices of ULE types
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.
InvalidLength
Attempted to parse a buffer into a slice of the given ULE type but its length was not compatible
ParseError
The byte sequence provided for ty
failed to parse correctly
VarZeroVecFormatError
The byte buffer was not in the appropriate format for VarZeroVec
Implementations§
source§impl ZeroVecError
impl ZeroVecError
sourcepub fn parse<T: ?Sized + 'static>() -> ZeroVecError
pub fn parse<T: ?Sized + 'static>() -> ZeroVecError
Construct a parse error for the given type
sourcepub fn length<T: ?Sized + 'static>(len: usize) -> ZeroVecError
pub fn length<T: ?Sized + 'static>(len: usize) -> ZeroVecError
Construct an “invalid length” error for the given type and length
Trait Implementations§
source§impl Clone for ZeroVecError
impl Clone for ZeroVecError
source§fn clone(&self) -> ZeroVecError
fn clone(&self) -> ZeroVecError
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 ZeroVecError
impl Debug for ZeroVecError
source§impl Display for ZeroVecError
impl Display for ZeroVecError
source§impl PartialEq for ZeroVecError
impl PartialEq for ZeroVecError
source§fn eq(&self, other: &ZeroVecError) -> bool
fn eq(&self, other: &ZeroVecError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ZeroVecError
impl Eq for ZeroVecError
impl StructuralPartialEq for ZeroVecError
Auto Trait Implementations§
impl Freeze for ZeroVecError
impl RefUnwindSafe for ZeroVecError
impl Send for ZeroVecError
impl Sync for ZeroVecError
impl Unpin for ZeroVecError
impl UnwindSafe for ZeroVecError
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