pub trait SchemaMetadata: Model {
type SchemaMetadata;
// Required method
fn schema_metadata() -> &'static Self::SchemaMetadata;
// Provided method
fn get_schema_metadata(&self) -> &'static Self::SchemaMetadata { ... }
}Expand description
Compile-time schema metadata access for generated models (trait; struct is crate::schema::SchemaMetadata).
Required Associated Types§
Sourcetype SchemaMetadata
type SchemaMetadata
Static metadata type emitted by codegen.
Required Methods§
Sourcefn schema_metadata() -> &'static Self::SchemaMetadata
fn schema_metadata() -> &'static Self::SchemaMetadata
Return the process-global metadata instance for this model.
Provided Methods§
Sourcefn get_schema_metadata(&self) -> &'static Self::SchemaMetadata
fn get_schema_metadata(&self) -> &'static Self::SchemaMetadata
Convenience accessor for instance callers.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".