pub enum DeserializeError {
Custom {
msg: String,
},
DuplicateField {
field: &'static str,
},
MissingField {
field: &'static str,
},
UnknownField {
field: String,
expected: &'static [&'static str],
},
UnknownVariant {
variant: String,
expected: &'static [&'static str],
},
}Expand description
The Deserializer’s error type.
Variants§
Trait Implementations§
Source§impl Clone for DeserializeError
impl Clone for DeserializeError
Source§fn clone(&self) -> DeserializeError
fn clone(&self) -> DeserializeError
Returns a duplicate 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 DeserializeError
impl Debug for DeserializeError
Source§impl Display for DeserializeError
impl Display for DeserializeError
Source§impl Error for DeserializeError
impl Error for DeserializeError
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 Error for DeserializeError
impl Error for DeserializeError
Source§fn custom<T>(msg: T) -> DeserializeErrorwhere
T: Display,
fn custom<T>(msg: T) -> DeserializeErrorwhere
T: Display,
Raised when there is general error when deserializing a type. Read more
Source§fn unknown_field(
field: &str,
expected: &'static [&'static str],
) -> DeserializeError
fn unknown_field( field: &str, expected: &'static [&'static str], ) -> DeserializeError
Raised when a
Deserialize struct type received a field with an
unrecognized name.Source§fn unknown_variant(
variant: &str,
expected: &'static [&'static str],
) -> DeserializeError
fn unknown_variant( variant: &str, expected: &'static [&'static str], ) -> DeserializeError
Raised when a
Deserialize enum type received a variant with an
unrecognized name.Source§fn missing_field(field: &'static str) -> DeserializeError
fn missing_field(field: &'static str) -> DeserializeError
Raised when a
Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> DeserializeError
fn duplicate_field(field: &'static str) -> DeserializeError
Raised when a
Deserialize struct type received more than one of the
same field.Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize receives a value of the right type but that
is wrong for some other reason. Read moreSource§impl From<DeserializeError> for Error
impl From<DeserializeError> for Error
Source§fn from(source: DeserializeError) -> Error
fn from(source: DeserializeError) -> Error
Converts to this type from the input type.
Source§impl From<DeserializeError> for Error
impl From<DeserializeError> for Error
Source§fn from(source: DeserializeError) -> Self
fn from(source: DeserializeError) -> Self
Converts to this type from the input type.
Source§impl IntoDeserializer<'_, DeserializeError> for Object
impl IntoDeserializer<'_, DeserializeError> for Object
Source§type Deserializer = Deserializer
type Deserializer = Deserializer
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Deserializer
fn into_deserializer(self) -> Deserializer
Convert this value into a deserializer.
Source§impl PartialEq for DeserializeError
impl PartialEq for DeserializeError
impl Eq for DeserializeError
impl StructuralPartialEq for DeserializeError
Auto Trait Implementations§
impl Freeze for DeserializeError
impl RefUnwindSafe for DeserializeError
impl Send for DeserializeError
impl Sync for DeserializeError
impl Unpin for DeserializeError
impl UnwindSafe for DeserializeError
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§impl<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§type Error = Infallible
type Error = Infallible
The error type in the returned
Result.Source§fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
Converts the value into a
Result.