pub trait Error: Error + Sized {
// Required method
fn custom<T>(msg: T) -> Self
where T: Display;
// Provided methods
fn unsupported_type(ty: impl Display) -> Self { ... }
fn missing_field(field: impl Display) -> Self { ... }
}Expand description
Error type used by a serializer.
Required Methods§
Provided Methods§
Sourcefn unsupported_type(ty: impl Display) -> Self
fn unsupported_type(ty: impl Display) -> Self
Ran into an element type that is not supported by the serializer.
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 serialization.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".