pub trait JetroSchema {
const EXPRS: &'static [(&'static str, &'static str)];
// Required methods
fn exprs() -> &'static [(&'static str, &'static str)];
fn names() -> &'static [&'static str];
}Expand description
Trait implemented by #[derive(JetroSchema)] — pairs a type with a
fixed set of named expressions.
ⓘ
use jetro_core::JetroSchema;
#[derive(JetroSchema)]
#[expr(titles = "$.books.map(title)")]
#[expr(count = "$.books.len()")]
struct BookView;
for (name, src) in BookView::exprs() { /* register on a bucket */ }Required Associated Constants§
Required Methods§
fn exprs() -> &'static [(&'static str, &'static str)]
fn names() -> &'static [&'static str]
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.