#[non_exhaustive]pub enum EncodingError {
Utf8(Utf8Error),
Other(&'static Encoding),
}
Expand description
An error when decoding or encoding
If feature encoding
is disabled, the EncodingError
is always EncodingError::Utf8
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Utf8(Utf8Error)
Input was not valid UTF-8
Other(&'static Encoding)
Available on crate feature
encoding
only.Input did not adhere to the given encoding
Trait Implementations§
Source§impl Clone for EncodingError
impl Clone for EncodingError
Source§fn clone(&self) -> EncodingError
fn clone(&self) -> EncodingError
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 EncodingError
impl Debug for EncodingError
Source§impl Display for EncodingError
impl Display for EncodingError
Source§impl Error for EncodingError
impl Error for EncodingError
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 From<EncodingError> for DeError
Available on crate feature serialize
only.
impl From<EncodingError> for DeError
Available on crate feature
serialize
only.Source§fn from(e: EncodingError) -> Self
fn from(e: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(error: EncodingError) -> Error
fn from(error: EncodingError) -> Error
Creates a new Error::EncodingError
from the given error
Source§impl From<Utf8Error> for EncodingError
impl From<Utf8Error> for EncodingError
Source§impl PartialEq for EncodingError
impl PartialEq for EncodingError
impl Eq for EncodingError
impl StructuralPartialEq for EncodingError
Auto Trait Implementations§
impl Freeze for EncodingError
impl RefUnwindSafe for EncodingError
impl Send for EncodingError
impl Sync for EncodingError
impl Unpin for EncodingError
impl UnwindSafe for EncodingError
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
)