pub trait GetConnection {
// Required method
fn connection(
&mut self,
) -> impl Future<Output = Result<Connection, Error>> + Send + '_;
}
Expand description
Trait to lazily get a connection
Required Methods§
fn connection( &mut self, ) -> impl Future<Output = Result<Connection, Error>> + 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.
Implementations on Foreign Types§
Source§impl GetConnection for &Connection
If we already have a connection, the impl is trivial
impl GetConnection for &Connection
If we already have a connection, the impl is trivial
fn connection( &mut self, ) -> impl Future<Output = Result<Connection, Error>> + Send + '_
Source§impl GetConnection for Connection
If we already have a connection, the impl is trivial
impl GetConnection for Connection
If we already have a connection, the impl is trivial