Trait DatabaseFactory

Source
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§

Required Methods§

Source

fn init( &self, ) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send + Sized

Source

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.

Implementors§