pub trait JsonSchema {
// Required method
fn schema() -> Schema;
// Provided method
fn schema_name() -> Option<&'static str> { ... }
}Expand description
Trait for types that can generate JSON Schema.
Required Methods§
Provided Methods§
Sourcefn schema_name() -> Option<&'static str>
fn schema_name() -> Option<&'static str>
Get the schema name for use in #/components/schemas/.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.