pub enum Error {
Json(ErrorType),
Simd(Error),
MissingField(&'static str),
UnknownField {
unknown_field: String,
possible_field_names: &'static [&'static str],
},
FieldNotAnArray(&'static str),
UnknownEnumVariant(String),
InvalidEnumRepresentation,
InvalidStructRepresentation,
EOF,
InvalidNumber(TryFromIntError),
Custom(String),
BrokenUniverse(Infallible),
}Expand description
Deserialisation error
Variants§
Json(ErrorType)
Error from simd-json
Simd(Error)
Error from simd-json
MissingField(&'static str)
Missing field
UnknownField
Unexpected field
Fields
FieldNotAnArray(&'static str)
unnamed enum field is not an array
UnknownEnumVariant(String)
unknwon enum variant
InvalidEnumRepresentation
invalid enum representation, needs to be either a string or an object
InvalidStructRepresentation
invalid struct representation, needs to be an object
EOF
Unexpected e,nd of input
InvalidNumber(TryFromIntError)
Invalid integer number
Custom(String)
Custom error
BrokenUniverse(Infallible)
The universe is broken
Implementations§
Source§impl Error
impl Error
Sourcepub const fn expected_string() -> Self
pub const fn expected_string() -> Self
Expected String error
Sourcepub const fn expected_map() -> Self
pub const fn expected_map() -> Self
Expected Map error
Sourcepub const fn expected_array() -> Self
pub const fn expected_array() -> Self
Expected Array error
Sourcepub const fn expected_float() -> Self
pub const fn expected_float() -> Self
Expected Float error
Sourcepub fn expected_null() -> Self
pub fn expected_null() -> Self
Expected Null error
Sourcepub fn expected_integer() -> Self
pub fn expected_integer() -> Self
Expected Integer error
Sourcepub fn expected_boolean() -> Self
pub fn expected_boolean() -> Self
Expected Boolean error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(source: Infallible) -> Self
fn from(source: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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