Enum awint_core::SerdeError[][src]

pub enum SerdeError {
    ZeroBitwidth,
    NonEqualWidths,
    InvalidRadix,
    Empty,
    InvalidChar,
    Overflow,
}
Expand description

A serialization or deserialization error

Variants

ZeroBitwidth

If an input bitwidth is zero

NonEqualWidths

If some kind of width does not match in contexts that require equal widths

InvalidRadix

A radix is not in the range 2..=36

Empty

An input is empty. This could be part of a string, e.x. calling <awint_ext::ExtAwi as FromStr>::from_str with no integral “i64”, or no bitwidth “-100”, instead of the full “-100i64”.

InvalidChar

There is an unrecognized character that is not _, -, 0..=9, a..=z, or A..=Z depending on the radix and other context

Overflow

The value represented by the string cannot fit in the specified unsigned or signed integer. This may also be thrown in case of internal algorithms failing from extreme string lengths approaching memory exhaustion.

Trait Implementations

impl Clone for SerdeError[src]

pub fn clone(&self) -> SerdeError[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for SerdeError[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Display for SerdeError[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Copy for SerdeError[src]

Auto Trait Implementations

impl Send for SerdeError

impl Sync for SerdeError

impl Unpin for SerdeError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.