Trait DatabaseInterface

Source
pub trait DatabaseInterface: Send + Sync {
    type Connection<'a>: AsyncConnection<Backend = Pg>
       where Self: 'a;

    // Required method
    fn db(&self) -> impl Future<Output = Result<Self::Connection<'_>>> + Send;
}

Required Associated Types§

Source

type Connection<'a>: AsyncConnection<Backend = Pg> where Self: 'a

Required Methods§

Source

fn db(&self) -> impl Future<Output = Result<Self::Connection<'_>>> + Send

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§