pub struct Pools {
pub config: Config,
/* private fields */
}Fields§
§config: Config线程数量
Implementations§
Source§impl Pools
impl Pools
pub fn new(config: Config, size: usize) -> Result<Self, String>
pub fn get_connect(&mut self) -> Result<Connect, String>
pub fn _release_conn(&self, conn: Connect)
Sourcepub fn current_pool_size(&self) -> usize
pub fn current_pool_size(&self) -> usize
获取当前连接池中的连接数量
pub fn _cleanup_idle_connections(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pools
impl RefUnwindSafe for Pools
impl Send for Pools
impl Sync for Pools
impl Unpin for Pools
impl UnwindSafe for Pools
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