pub trait JsonDecode: Sized {
// Required method
fn from_json_value(value: &JsonValue) -> Result<Self, JsonDecodeError>;
}Expand description
A type that can be decoded from a JsonValue.
The derive in reliakit-derive generates implementations of this trait.
Required Methods§
Sourcefn from_json_value(value: &JsonValue) -> Result<Self, JsonDecodeError>
fn from_json_value(value: &JsonValue) -> Result<Self, JsonDecodeError>
Decodes Self from a JsonValue, or returns a JsonDecodeError.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".