pub trait Query<'s>: Parameters<'s> {
type Output;
// Required methods
fn prepare(connection: &Connection) -> Result<Statement<'_>>;
fn output<'c: 's>(execution: Execution<'c, 's>) -> Result<Self::Output>;
}Expand description
A SQL query which can prepare itself into a
Statement, bind itself as Parameters to the statement (if any), and
read any desired output from the statement execution.
Required Associated Types§
Required Methods§
Sourcefn prepare(connection: &Connection) -> Result<Statement<'_>>
fn prepare(connection: &Connection) -> Result<Statement<'_>>
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.