Trait MysqlTrait

Source
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§

Source

fn query_drop<Q>(&mut self, query: Q) -> Result<()>
where Q: AsRef<str>,

Source

fn query_first<T, Q>(&mut self, query: Q) -> Result<Option<T>>
where Q: AsRef<str>, T: FromRow,

Source

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,

Source

fn exec_drop<Q, P>(&mut self, query: Q, params: P) -> Result<()>
where Q: AsRef<str>, P: Into<Params>,

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.

Implementors§

Source§

impl<C> MysqlTrait for Conn<C>
where C: Queryable,

Source§

impl<C> MysqlTrait for Log<C>
where C: MysqlTrait,