pub trait Error: Error + Sized {
// Required method
fn custom<T>(msg: T) -> Self
where T: Display;
// Provided methods
fn invalid_type(unexp: impl Display, exp: impl Display) -> Self { ... }
fn missing_field(field: impl Display) -> Self { ... }
}Expand description
Error type used by a deserializer.
Required Methods§
Provided Methods§
Sourcefn invalid_type(unexp: impl Display, exp: impl Display) -> Self
fn invalid_type(unexp: impl Display, exp: impl Display) -> Self
Receives a type different from what it was expecting when visiting through a deserialization.
Sourcefn missing_field(field: impl Display) -> Self
fn missing_field(field: impl Display) -> Self
One or more fields are missing in the provided arguments during deserializer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".