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)>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)