#[non_exhaustive]pub enum UleError {
InvalidLength {
ty: &'static str,
len: usize,
},
ParseError {
ty: &'static str,
},
}
Expand description
An 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.
Typically created by a ULE
impl via UleError::length()
.
ParseError
The byte sequence provided for ty
failed to parse correctly in the
given ULE type.
Typically created by a ULE
impl via UleError::parse()
.
Implementations§
Trait Implementations§
source§impl Error for UleError
impl Error for UleError
1.30.0 · 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()
impl Copy for UleError
impl Eq for UleError
impl StructuralPartialEq for UleError
Auto Trait Implementations§
impl Freeze for UleError
impl RefUnwindSafe for UleError
impl Send for UleError
impl Sync for UleError
impl Unpin for UleError
impl UnwindSafe for UleError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)