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§
Sourcefn connect(&self) -> BoxFuture<'_, Result<Box<dyn Connection>>>
fn connect(&self) -> BoxFuture<'_, Result<Box<dyn Connection>>>
Establish a new database connection with the options specified by ConnectionOptions.
Sourcefn get_metadata(&self) -> Box<dyn ConnectionFactoryMetadata>
fn get_metadata(&self) -> Box<dyn ConnectionFactoryMetadata>
Returns the ConnectionFactoryMetadata about the product this ConnectionFactory is applicable to.