pub trait JsonSchema {
// Required method
fn json_schema() -> String;
// Provided method
fn is_optional() -> bool { ... }
}Expand description
A type with a JSON Schema.
Required Methods§
Sourcefn json_schema() -> String
fn json_schema() -> String
The schema, as a JSON object.
Provided Methods§
Sourcefn is_optional() -> bool
fn is_optional() -> bool
true when a struct field of this type may be left out (Option).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".