Enum batch_aint_one::BatchingPolicy
source · #[non_exhaustive]pub enum BatchingPolicy {
Immediate,
Size,
Duration(Duration, OnFull),
}Expand description
A policy controlling when batches get processed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Immediate
Immediately process the batch if possible.
Will process as many batches concurrently as the limit allows. When concurrency is maximised, as soon as a batch finishes the next batch will start. When concurrency is limited to 1, it will run batches serially.
Size
Process the batch when it reaches the maximum size.
Duration(Duration, OnFull)
Process the batch a given duration after it was created.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for BatchingPolicy
impl Send for BatchingPolicy
impl Sync for BatchingPolicy
impl Unpin for BatchingPolicy
impl UnwindSafe for BatchingPolicy
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