[][src]Trait please::ConnectionProvider

pub trait ConnectionProvider {
    type Error;
    type Connection: Connection<Backend = Pg>;
    fn get(&self) -> Result<Self::Connection, Self::Error>;
}

Trait for types providing database connections. This is typically implemented by an Arc<ConnectionPool> or functionally equivalent type.

Associated Types

Error type which may be returned when the provider is unable to obtain a database connection.

Type of the connection returned. Currently the connection must use the postgres backend.

Required Methods

Obtain a connection from this provider.

Implementors