pub trait Deserialize: Sized {
// Required method
fn deserialize(
dcx: &DiagCtxt<'_>,
value: &Spanned<DeValue<'_>>,
) -> Option<Self>;
}Expand description
A type which can be deserialized from a toml value.
Required Methods§
Sourcefn deserialize(dcx: &DiagCtxt<'_>, value: &Spanned<DeValue<'_>>) -> Option<Self>
fn deserialize(dcx: &DiagCtxt<'_>, value: &Spanned<DeValue<'_>>) -> Option<Self>
Attempt to deserialize the value. Returns None and raises an error on failure.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".