Driver

Trait Driver 

Source
pub trait Driver {
    type Connection: Connection;
    type SqlWriter: SqlWriter;
    type Prepared: Prepared;

    const NAME: &'static str;

    // Required method
    fn sql_writer(&self) -> Self::SqlWriter;

    // Provided method
    fn connect(
        &self,
        url: Cow<'static, str>,
    ) -> impl Future<Output = Result<impl Connection>> { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

Required Associated Types§

Required Methods§

Source

fn sql_writer(&self) -> Self::SqlWriter

Provided Methods§

Source

fn connect( &self, url: Cow<'static, str>, ) -> impl Future<Output = Result<impl Connection>>

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§