Enum UleError

enum UleError

An error type to be used for decoding slices of ULE types

Variants

InvalidLength { ty: &'static str, len: usize }

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 { ty: &'static str }

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

impl UleError

fn parse<T: ?Sized + 'static>() -> UleError

Construct a parse error for the given type

fn length<T: ?Sized + 'static>(len: usize) -> UleError

Construct an "invalid length" error for the given type and length

impl Clone for UleError

fn clone(self: &Self) -> UleError

impl Copy for UleError

impl Debug for UleError

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for UleError

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result<(), Error>

impl Eq for UleError

impl Error for UleError

impl Freeze for UleError

impl PartialEq for UleError

fn eq(self: &Self, other: &UleError) -> bool

impl RefUnwindSafe for UleError

impl Send for UleError

impl StructuralPartialEq for UleError

impl Sync for UleError

impl Unpin for UleError

impl UnsafeUnpin for UleError

impl UnwindSafe for UleError

impl<T> Any for UleError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for UleError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for UleError

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for UleError

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> ErasedDestructor for UleError

impl<T> From for UleError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for UleError

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for UleError

fn to_string(self: &Self) -> String

impl<T, U> Into for UleError

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for UleError

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for UleError

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>