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§
type Connection<'a>: AsyncConnection<Backend = Pg> where Self: 'a
Required Methods§
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.