pub trait Schematic {
// Provided methods
fn schema_name() -> Option<String> { ... }
fn build_schema(schema: SchemaBuilder) -> Schema { ... }
}Expand description
Defines a schema that represents the shape of the implementing type.
Provided Methods§
Sourcefn schema_name() -> Option<String>
fn schema_name() -> Option<String>
Define a name for this schema type. Names are required for non-primitive values as a means to link references, and avoid cycles.
Sourcefn build_schema(schema: SchemaBuilder) -> Schema
fn build_schema(schema: SchemaBuilder) -> Schema
Create and return a schema that models the structure of the implementing type. The schema can be used to generate code, documentation, or other artifacts.
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.