Struct LocalLimits
pub struct LocalLimits { /* private fields */ }Expand description
Limits shared by every shard of one process.
Implementations§
§impl LocalLimits
impl LocalLimits
pub fn new() -> Self
pub fn max_in_use(&self, name: &str) -> u32
pub fn max_in_use(&self, name: &str) -> u32
The most permits ever held at once (the simulator’s checker).
Trait Implementations§
§impl Debug for LocalLimits
impl Debug for LocalLimits
§impl Default for LocalLimits
impl Default for LocalLimits
§fn default() -> LocalLimits
fn default() -> LocalLimits
Returns the “default value” for a type. Read more
§impl LimitBackend for LocalLimits
impl LimitBackend for LocalLimits
fn define(&self, name: &str, spec: LimitSpec)
§fn acquire_in(
&self,
name: &str,
ticket: u64,
priority: &Priority,
now_ms: u64,
waker: Option<&Waker>,
) -> Acquire
fn acquire_in( &self, name: &str, ticket: u64, priority: &Priority, now_ms: u64, waker: Option<&Waker>, ) -> Acquire
Asks for the permit of
ticket, queued at priority the first time
it is asked for. Idempotent: asking again for a granted ticket
answers Granted.§fn waiting(&self, name: &str) -> usize
fn waiting(&self, name: &str) -> usize
Steps waiting for a permit here, where the backend knows (metrics).
Auto Trait Implementations§
impl !Freeze for LocalLimits
impl RefUnwindSafe for LocalLimits
impl Send for LocalLimits
impl Sync for LocalLimits
impl Unpin for LocalLimits
impl UnsafeUnpin for LocalLimits
impl UnwindSafe for LocalLimits
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