pub struct PoolFactory;Expand description
Thread-safe global pool factory
Implementations§
Source§impl PoolFactory
impl PoolFactory
Sourcepub fn create_pool<T: Poolable + Clone>() -> GenericPool<T>
pub fn create_pool<T: Poolable + Clone>() -> GenericPool<T>
Create a new pool for the given type
Sourcepub fn create_pool_with_capacity<T: Poolable + Clone>(
capacity: usize,
) -> GenericPool<T>
pub fn create_pool_with_capacity<T: Poolable + Clone>( capacity: usize, ) -> GenericPool<T>
Create a new pool with specified capacity
Auto Trait Implementations§
impl Freeze for PoolFactory
impl RefUnwindSafe for PoolFactory
impl Send for PoolFactory
impl Sync for PoolFactory
impl Unpin for PoolFactory
impl UnwindSafe for PoolFactory
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