Trait ConnectionFactory

Source
pub trait ConnectionFactory:
    'static
    + Send
    + Sync {
    // Required methods
    fn connect(&self) -> BoxFuture<'_, Result<Box<dyn Connection>>>;
    fn get_metadata(&self) -> Box<dyn ConnectionFactoryMetadata>;
}

Required Methods§

Source

fn connect(&self) -> BoxFuture<'_, Result<Box<dyn Connection>>>

Establish a new database connection with the options specified by ConnectionOptions.

Source

fn get_metadata(&self) -> Box<dyn ConnectionFactoryMetadata>

Returns the ConnectionFactoryMetadata about the product this ConnectionFactory is applicable to.

Implementors§