mod impls;
mod pool;
use std::time::Duration;
pub use crate::{error::Error, metrics::PoolState, sync::pool::InstrumentedPool};
pub trait InstrumentablePool<'p> {
type Resource: 'p;
type Error: std::error::Error + Send + 'static;
fn get(&'p self) -> Result<Self::Resource, Error<Self::Error>>;
fn try_get(&'p self) -> Result<Self::Resource, Error<Self::Error>> {
Err(Error::NotImplemented)
}
fn get_timeout(&'p self, _timeout: Duration) -> Result<Self::Resource, Error<Self::Error>> {
Err(Error::NotImplemented)
}
fn get_state(&'p self) -> Result<PoolState, Error<Self::Error>> {
Err(Error::NotImplemented)
}
}