Skip to main content

PoolFactory

Trait PoolFactory 

Source
pub trait PoolFactory:
    Send
    + Sync
    + 'static {
    // Required methods
    fn create<'a>(
        &'a self,
        config: &'a DatasourceConfig,
    ) -> CreatePoolFuture<'a>;
    fn check<'a>(&'a self, handle: &'a DatasourceHandle) -> CheckFuture<'a>;
    fn supported_schemes(&self) -> &[&str];
    fn name(&self) -> &'static str;

    // Provided method
    fn matches(&self, config: &DatasourceConfig) -> bool { ... }
}

Required Methods§

Source

fn create<'a>(&'a self, config: &'a DatasourceConfig) -> CreatePoolFuture<'a>

Source

fn check<'a>(&'a self, handle: &'a DatasourceHandle) -> CheckFuture<'a>

Source

fn supported_schemes(&self) -> &[&str]

Source

fn name(&self) -> &'static str

Provided Methods§

Source

fn matches(&self, config: &DatasourceConfig) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§