Skip to main content

SchemaMetadata

Trait SchemaMetadata 

Source
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§

Source

type SchemaMetadata

Static metadata type emitted by codegen.

Required Methods§

Source

fn schema_metadata() -> &'static Self::SchemaMetadata

Return the process-global metadata instance for this model.

Provided Methods§

Source

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".

Implementors§