pub trait HasProsaicSchema {
const PROSAIC_SCHEMA: &'static [(&'static str, ValueType)];
}Expand description
Compile-time schema for a context type.
Deriving #[derive(IntoContext)] automatically implements this trait
using the field names and Rust types of the struct. Hand-written impls
are also supported for types that need ValueType::Entity slots or
other mappings the derive does not produce.
The PROSAIC_SCHEMA constant is queryable at const evaluation time, so
the prosaic_template! macro can emit per-slot assertions against it
using prosaic_common::schema_lookup and
prosaic_common::types_compatible.
Required Associated Constants§
const PROSAIC_SCHEMA: &'static [(&'static str, ValueType)]
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.