Struct spinoso_string::InvalidEncodingError
source · pub struct InvalidEncodingError { /* private fields */ }
Expand description
Error returned when failing to deserialize an Encoding
.
This error is returned from Encoding::try_from_flag
. See its
documentation for more detail.
When the std feature of spinoso-string
is enabled, this struct
implements std::error::Error
.
Examples
assert_eq!(
Encoding::try_from_flag(255),
Err(InvalidEncodingError::new())
);
assert_eq!(Encoding::try_from(255), Err(InvalidEncodingError::new()));
Implementations§
Trait Implementations§
source§impl Clone for InvalidEncodingError
impl Clone for InvalidEncodingError
source§fn clone(&self) -> InvalidEncodingError
fn clone(&self) -> InvalidEncodingError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InvalidEncodingError
impl Debug for InvalidEncodingError
source§impl Default for InvalidEncodingError
impl Default for InvalidEncodingError
source§fn default() -> InvalidEncodingError
fn default() -> InvalidEncodingError
Returns the “default value” for a type. Read more
source§impl Display for InvalidEncodingError
impl Display for InvalidEncodingError
source§impl Error for InvalidEncodingError
impl Error for InvalidEncodingError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl Hash for InvalidEncodingError
impl Hash for InvalidEncodingError
source§impl Ord for InvalidEncodingError
impl Ord for InvalidEncodingError
source§fn cmp(&self, other: &InvalidEncodingError) -> Ordering
fn cmp(&self, other: &InvalidEncodingError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<InvalidEncodingError> for InvalidEncodingError
impl PartialEq<InvalidEncodingError> for InvalidEncodingError
source§fn eq(&self, other: &InvalidEncodingError) -> bool
fn eq(&self, other: &InvalidEncodingError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InvalidEncodingError> for InvalidEncodingError
impl PartialOrd<InvalidEncodingError> for InvalidEncodingError
source§fn partial_cmp(&self, other: &InvalidEncodingError) -> Option<Ordering>
fn partial_cmp(&self, other: &InvalidEncodingError) -> Option<Ordering>
1.0.0 · source§fn 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