Enum zerovec::ZeroVecError
source · [−]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
InvalidLength
Attempted to parse a buffer into a slice of the given ULE type but its length was not compatible
ParseError
Fields
ty: &'static str
The byte sequence provided for ty
failed to parse correctly
VarZeroVecFormatError
The byte buffer was not in the appropriate format for VarZeroVec
Implementations
sourceimpl 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
sourceimpl Clone for ZeroVecError
impl Clone for ZeroVecError
sourcefn clone(&self) -> ZeroVecError
fn clone(&self) -> ZeroVecError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ZeroVecError
impl Debug for ZeroVecError
sourceimpl Display for ZeroVecError
impl Display for ZeroVecError
sourceimpl Error for ZeroVecError
impl Error for ZeroVecError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl PartialEq<ZeroVecError> for ZeroVecError
impl PartialEq<ZeroVecError> for ZeroVecError
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ZeroVecError) -> bool
fn ne(&self, other: &ZeroVecError) -> bool
This method tests for !=
.
impl Copy for ZeroVecError
impl Eq for ZeroVecError
impl StructuralEq for ZeroVecError
impl StructuralPartialEq for ZeroVecError
Auto Trait Implementations
impl RefUnwindSafe for ZeroVecError
impl Send for ZeroVecError
impl Sync for ZeroVecError
impl Unpin for ZeroVecError
impl UnwindSafe for ZeroVecError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more