pub struct ConnectionPool { /* private fields */ }Expand description
Pre-allocated connection pool for reduced allocation overhead.
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub fn acquire(&mut self) -> Option<&mut Connection>
pub fn acquire(&mut self) -> Option<&mut Connection>
Acquire a connection from the pool.
Sourcepub fn get(&self, id: u64) -> Option<&Connection>
pub fn get(&self, id: u64) -> Option<&Connection>
Get connection by ID.
Sourcepub fn get_mut(&mut self, id: u64) -> Option<&mut Connection>
pub fn get_mut(&mut self, id: u64) -> Option<&mut Connection>
Get mutable connection by ID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectionPool
impl RefUnwindSafe for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin for ConnectionPool
impl UnwindSafe for ConnectionPool
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
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging