pub trait MysqlTrait {
// Required methods
fn query_drop<Q>(&mut self, query: Q) -> Result<()>
where Q: AsRef<str>;
fn query_first<T, Q>(&mut self, query: Q) -> Result<Option<T>>
where Q: AsRef<str>,
T: FromRow;
fn query_map<T, F, Q, U>(&mut self, query: Q, f: F) -> Result<Vec<U>>
where Q: AsRef<str>,
T: FromRow,
F: FnMut(T) -> U;
fn exec_drop<Q, P>(&mut self, query: Q, params: P) -> Result<()>
where Q: AsRef<str>,
P: Into<Params>;
}
Expand description
Generic trait exposing methods used for interaction with SQLite
in DeriveMysql
macro implementation.
Required Methods§
fn query_drop<Q>(&mut self, query: Q) -> Result<()>
fn query_first<T, Q>(&mut self, query: Q) -> Result<Option<T>>
fn query_map<T, F, Q, U>(&mut self, query: Q, f: F) -> Result<Vec<U>>
fn exec_drop<Q, P>(&mut self, query: Q, params: P) -> Result<()>
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.