pub trait ConnectionManager: Sync + Send {
type Connection: Send;
type Error: Error + Send;
type CreateFut: Future<Output = Result<Self::Connection, Self::Error>> + Send;
type ValidFut<'a>: Future<Output = bool> + Send
where Self: 'a;
// Required methods
fn create_connection(&self) -> Self::CreateFut;
fn is_valid<'a>(
&'a self,
connection: &'a Self::Connection,
) -> Self::ValidFut<'a>;
}Required Associated Types§
type Connection: Send
type Error: Error + Send
type CreateFut: Future<Output = Result<Self::Connection, Self::Error>> + Send
type ValidFut<'a>: Future<Output = bool> + Send where Self: 'a
Required Methods§
fn create_connection(&self) -> Self::CreateFut
fn is_valid<'a>( &'a self, connection: &'a Self::Connection, ) -> Self::ValidFut<'a>
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.