pub struct ActiveClientLimiter { /* private fields */ }Expand description
Shared active-client admission counter.
Implementations§
Source§impl ActiveClientLimiter
impl ActiveClientLimiter
pub fn new(max_active: usize) -> Self
Sourcepub fn try_acquire(&self) -> Option<ActiveClientPermit>
pub fn try_acquire(&self) -> Option<ActiveClientPermit>
Acquires one client slot. Dropping the returned permit releases it.
pub fn active(&self) -> usize
pub fn max_active(&self) -> usize
Trait Implementations§
Source§impl Clone for ActiveClientLimiter
impl Clone for ActiveClientLimiter
Auto Trait Implementations§
impl Freeze for ActiveClientLimiter
impl RefUnwindSafe for ActiveClientLimiter
impl Send for ActiveClientLimiter
impl Sync for ActiveClientLimiter
impl Unpin for ActiveClientLimiter
impl UnsafeUnpin for ActiveClientLimiter
impl UnwindSafe for ActiveClientLimiter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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