Enum awint::SerdeError
[−]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
impl Clone for SerdeError
fn clone(&self) -> SerdeError
fn clone(&self) -> SerdeError
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
impl Debug for SerdeError
impl Debug for SerdeError
impl Display for SerdeError
impl Display for SerdeError
impl Hash for SerdeError
impl Hash for SerdeError
impl Ord for SerdeError
impl Ord for SerdeError
fn cmp(&self, other: &SerdeError) -> Ordering
fn cmp(&self, other: &SerdeError) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialEq<SerdeError> for SerdeError
impl PartialEq<SerdeError> for SerdeError
fn eq(&self, other: &SerdeError) -> bool
fn eq(&self, other: &SerdeError) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
impl PartialOrd<SerdeError> for SerdeError
impl PartialOrd<SerdeError> for SerdeError
fn partial_cmp(&self, other: &SerdeError) -> Option<Ordering>
fn partial_cmp(&self, other: &SerdeError) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for SerdeError
impl Eq for SerdeError
impl StructuralEq for SerdeError
impl StructuralPartialEq for SerdeError
Auto Trait Implementations
impl RefUnwindSafe for SerdeError
impl Send for SerdeError
impl Sync for SerdeError
impl Unpin for SerdeError
impl UnwindSafe for SerdeError
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