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)>
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()
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 for InvalidEncodingError
impl PartialEq for InvalidEncodingError
Source§impl PartialOrd for InvalidEncodingError
impl PartialOrd for InvalidEncodingError
impl Copy for InvalidEncodingError
impl Eq for InvalidEncodingError
impl StructuralPartialEq for InvalidEncodingError
Auto Trait Implementations§
impl Freeze for InvalidEncodingError
impl RefUnwindSafe for InvalidEncodingError
impl Send for InvalidEncodingError
impl Sync for InvalidEncodingError
impl Unpin for InvalidEncodingError
impl UnwindSafe for InvalidEncodingError
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