#[non_exhaustive]pub struct Limits { /* private fields */ }Expand description
A policy controlling limits on batch sizes and concurrency.
New items will be rejected when both the limits have been reached.
max_key_concurrency * max_batch_size is both:
- The number of items that can be processed concurrently.
- The number of items that can be queued concurrently.
So the total number of items in the system can be up to 2 * max_key_concurrency * max_batch_size.
Implementations§
Source§impl Limits
impl Limits
Sourcepub fn max_batch_size(self, max: usize) -> Self
pub fn max_batch_size(self, max: usize) -> Self
Limits the maximum size of a batch.
Sourcepub fn max_key_concurrency(self, max: usize) -> Self
pub fn max_key_concurrency(self, max: usize) -> Self
Limits the maximum number of batches that can be processed concurrently for a key.
Trait Implementations§
impl Copy for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
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