pub struct ConnectionGuard { /* private fields */ }
Expand description
Limits the number of connections.
Implementations§
source§impl ConnectionGuard
impl ConnectionGuard
sourcepub fn try_acquire(&self) -> Option<ConnectionPermit>
pub fn try_acquire(&self) -> Option<ConnectionPermit>
Acquire a connection permit.
sourcepub fn available_connections(&self) -> usize
pub fn available_connections(&self) -> usize
Get the number of available connection slots.
sourcepub fn max_connections(&self) -> usize
pub fn max_connections(&self) -> usize
Get the maximum number of connections.
Trait Implementations§
source§impl Clone for ConnectionGuard
impl Clone for ConnectionGuard
source§fn clone(&self) -> ConnectionGuard
fn clone(&self) -> ConnectionGuard
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ConnectionGuard
impl RefUnwindSafe for ConnectionGuard
impl Send for ConnectionGuard
impl Sync for ConnectionGuard
impl Unpin for ConnectionGuard
impl UnwindSafe for ConnectionGuard
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)