#[non_exhaustive]pub enum ErrorCategory {
Syntax,
Eof,
Data,
Limit,
Unsupported,
Usage,
Io,
}Expand description
Describes the category of an error, see Error::category.
The categories tell apart whether the input was not well-formed or did
not fit the values it was deserialized into. For instance an HTTP
server would answer requests that fail with errors of the
Syntax and Eof categories with
400 Bad Request and the ones of the Data category
with 422 Unprocessable Entity.
More categories may be added in the future.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Syntax
The input is not well-formed (ErrorKind::Syntax).
Eof
The input ended early (ErrorKind::EndOfFile).
Data
The input is well-formed but does not fit the values, or a value cannot be serialized.
Limit
A limit was exceeded (ErrorKind::LimitExceeded).
Unsupported
A type or value cannot be represented
(ErrorKind::UnsupportedType).
Usage
An API was used in a way that is not supported
(ErrorKind::InvalidState) or deser is set up wrongly
(ErrorKind::Configuration).
Io
Reading or writing failed (ErrorKind::Io).
Trait Implementations§
Source§impl Clone for ErrorCategory
impl Clone for ErrorCategory
impl Copy for ErrorCategory
Source§impl Debug for ErrorCategory
impl Debug for ErrorCategory
impl Eq for ErrorCategory
Source§impl PartialEq for ErrorCategory
impl PartialEq for ErrorCategory
impl StructuralPartialEq for ErrorCategory
Auto Trait Implementations§
impl Freeze for ErrorCategory
impl RefUnwindSafe for ErrorCategory
impl Send for ErrorCategory
impl Sync for ErrorCategory
impl Unpin for ErrorCategory
impl UnsafeUnpin for ErrorCategory
impl UnwindSafe for ErrorCategory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.