pub trait DatabaseFactory: Send + Sized {
type Error: Error;
type Connection: DatabaseConnection + Sync + Clone;
// Required methods
fn init(
&self,
) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send + Sized;
fn init_system(
&self,
) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send + Sized;
}
Required Associated Types§
type Error: Error
type Connection: DatabaseConnection + Sync + Clone
Required Methods§
fn init( &self, ) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send + Sized
fn init_system( &self, ) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send + Sized
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.