pub struct ConcurrencyBuilder { /* private fields */ }
Expand description
The builder of Concurrency
middleware.
It’s Default
configuration has max_concurrency
of the result of
std::thread::available_parallelism
, fallback to 1
if it fails.
See module level documentations for details.
Implementations§
Source§impl ConcurrencyBuilder
impl ConcurrencyBuilder
Sourcepub fn new(max_concurrency: NonZeroUsize) -> Self
pub fn new(max_concurrency: NonZeroUsize) -> Self
Create the middleware with concurrency limit max_concurrency
.
Trait Implementations§
Source§impl Clone for ConcurrencyBuilder
impl Clone for ConcurrencyBuilder
Source§fn clone(&self) -> ConcurrencyBuilder
fn clone(&self) -> ConcurrencyBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConcurrencyBuilder
impl Debug for ConcurrencyBuilder
Source§impl Default for ConcurrencyBuilder
impl Default for ConcurrencyBuilder
Auto Trait Implementations§
impl Freeze for ConcurrencyBuilder
impl RefUnwindSafe for ConcurrencyBuilder
impl Send for ConcurrencyBuilder
impl Sync for ConcurrencyBuilder
impl Unpin for ConcurrencyBuilder
impl UnwindSafe for ConcurrencyBuilder
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