pub trait ConnectionPool<D: Driver>: Debug {
// Required methods
fn get(
&self,
) -> impl Future<Output = Result<impl AsRef<D::Connection> + AsMut<D::Connection>>> + Send;
fn timeout_get(
&self,
timeout: Duration,
) -> impl Future<Output = Result<impl AsRef<D::Connection> + AsMut<D::Connection>>> + Send;
fn detach(&self) -> impl Future<Output = Result<D::Connection>> + Send
where Self: Sized;
fn resize(&self, max_size: usize) -> Result<()>;
fn close(self) -> impl Future<Output = Result<()>> + Send;
}Required Methods§
fn get( &self, ) -> impl Future<Output = Result<impl AsRef<D::Connection> + AsMut<D::Connection>>> + Send
fn timeout_get( &self, timeout: Duration, ) -> impl Future<Output = Result<impl AsRef<D::Connection> + AsMut<D::Connection>>> + Send
fn detach(&self) -> impl Future<Output = Result<D::Connection>> + Sendwhere
Self: Sized,
fn resize(&self, max_size: usize) -> Result<()>
fn close(self) -> impl Future<Output = Result<()>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".