Trait schematic_types::Schematic
source · 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.
Object Safety§
This trait is not object safe.