pub struct LiveConnectionGuard { /* private fields */ }Expand description
M224 D3: RAII counter increment for the global connection cap. Wraps
Arc<AtomicUsize> so the live count cannot leak even if the listener/admit
loop panics or drops a connection mid-pipeline.
dropped automatically when the owning connection is dropped or forwarded.
Implementations§
Source§impl LiveConnectionGuard
impl LiveConnectionGuard
Sourcepub fn new(counter: Arc<AtomicUsize>) -> Self
pub fn new(counter: Arc<AtomicUsize>) -> Self
Create a new guard and increment the backing counter atomically.
Trait Implementations§
Source§impl Debug for LiveConnectionGuard
impl Debug for LiveConnectionGuard
Source§impl Drop for LiveConnectionGuard
impl Drop for LiveConnectionGuard
Auto Trait Implementations§
impl Freeze for LiveConnectionGuard
impl RefUnwindSafe for LiveConnectionGuard
impl Send for LiveConnectionGuard
impl Sync for LiveConnectionGuard
impl Unpin for LiveConnectionGuard
impl UnsafeUnpin for LiveConnectionGuard
impl UnwindSafe for LiveConnectionGuard
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