pub struct ConcurrencyLimit { /* private fields */ }Expand description
Bounded-concurrency configuration.
Implementations§
Source§impl ConcurrencyLimit
impl ConcurrencyLimit
Sourcepub fn operations(n: usize) -> Self
pub fn operations(n: usize) -> Self
Limit concurrent operations (one permit per top-level call).
Sourcepub fn attempts(n: usize) -> Self
pub fn attempts(n: usize) -> Self
Limit concurrent attempts (one permit per attempt, retries included).
Sourcepub fn max_queued(self, n: usize) -> Self
pub fn max_queued(self, n: usize) -> Self
Cap the number of waiting callers (excess is rejected).
Sourcepub fn queue_timeout(self, d: Duration) -> Self
pub fn queue_timeout(self, d: Duration) -> Self
Maximum time a caller waits in the queue before being rejected.
Trait Implementations§
Source§impl Clone for ConcurrencyLimit
impl Clone for ConcurrencyLimit
Source§fn clone(&self) -> ConcurrencyLimit
fn clone(&self) -> ConcurrencyLimit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConcurrencyLimit
impl Debug for ConcurrencyLimit
Source§impl From<u32> for ConcurrencyLimit
impl From<u32> for ConcurrencyLimit
Auto Trait Implementations§
impl Freeze for ConcurrencyLimit
impl RefUnwindSafe for ConcurrencyLimit
impl Send for ConcurrencyLimit
impl Sync for ConcurrencyLimit
impl Unpin for ConcurrencyLimit
impl UnsafeUnpin for ConcurrencyLimit
impl UnwindSafe for ConcurrencyLimit
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