#[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
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