pub struct Pool<M: Manager> { /* private fields */ }
Expand description
Pool have manager, get/get_timeout Connection from Pool
Implementations§
source§impl<M: Manager> Pool<M>
impl<M: Manager> Pool<M>
pub fn new(m: M) -> Self
pub async fn get(&self) -> Result<ConnectionBox<M>, M::Error>
pub async fn get_timeout( &self, d: Option<Duration> ) -> Result<ConnectionBox<M>, M::Error>
pub fn state(&self) -> State
pub fn set_max_open(&self, n: u64)
Trait Implementations§
Auto Trait Implementations§
impl<M> RefUnwindSafe for Pool<M>where
M: RefUnwindSafe,
impl<M> Send for Pool<M>
impl<M> Sync for Pool<M>
impl<M> Unpin for Pool<M>
impl<M> UnwindSafe for Pool<M>where
M: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more