Trait Preparable

Source
pub trait Preparable {
    type DB: ConnectionPool + Sync + Send;

    // Required methods
    fn prepare<'life0, 'async_trait, S>(
        &'life0 mut self,
        query: S,
    ) -> Pin<Box<dyn Future<Output = Result<Statement<Self::DB>>> + Send + 'async_trait>>
       where S: Into<String> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn driver_name(&self) -> &str;
    fn conn_str(&self) -> &str;
}
Expand description

The trait to create a prepared statment for later queries or executions.

Required Associated Types§

Required Methods§

Source

fn prepare<'life0, 'async_trait, S>( &'life0 mut self, query: S, ) -> Pin<Box<dyn Future<Output = Result<Statement<Self::DB>>> + Send + 'async_trait>>
where S: Into<String> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn driver_name(&self) -> &str

Source

fn conn_str(&self) -> &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.

Implementors§