pub trait QueryModel:
Sized
+ Send
+ 'static {
type Schema: SchemaAccess;
type Variables: QueryVariableSet;
// Required methods
fn model_name() -> &'static str;
fn selection() -> QuerySelection;
fn from_row(row: &PgRow, prefix: &str) -> Result<Self, Error>;
// Provided method
fn selection_with_variables(_variables: &QueryVariables) -> QuerySelection { ... }
}Required Associated Types§
type Schema: SchemaAccess
type Variables: QueryVariableSet
Required Methods§
fn model_name() -> &'static str
fn selection() -> QuerySelection
fn from_row(row: &PgRow, prefix: &str) -> Result<Self, Error>
Provided Methods§
fn selection_with_variables(_variables: &QueryVariables) -> QuerySelection
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".