pub struct BackpressureState { /* private fields */ }Expand description
Global backpressure state shared across the runtime.
This is written to the SHM control region for clients to read.
Implementations§
Source§impl BackpressureState
impl BackpressureState
Sourcepub fn record_rejection(&self)
pub fn record_rejection(&self)
Increments the rejected request count.
Sourcepub fn rejected_count(&self) -> u64
pub fn rejected_count(&self) -> u64
Returns the number of rejected requests.
Sourcepub fn active_clients(&self) -> usize
pub fn active_clients(&self) -> usize
Returns the number of active clients.
Sourcepub fn queue_depth(&self) -> usize
pub fn queue_depth(&self) -> usize
Returns the current queue depth.
Trait Implementations§
Source§impl Debug for BackpressureState
impl Debug for BackpressureState
Auto Trait Implementations§
impl !Freeze for BackpressureState
impl RefUnwindSafe for BackpressureState
impl Send for BackpressureState
impl Sync for BackpressureState
impl Unpin for BackpressureState
impl UnsafeUnpin for BackpressureState
impl UnwindSafe for BackpressureState
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