pub struct BatchProcessor<Q: Queue + 'static> { /* private fields */ }Expand description
A processor that batches jobs before dispatching them.
Implementations§
Source§impl<Q: Queue + 'static> BatchProcessor<Q>
impl<Q: Queue + 'static> BatchProcessor<Q>
Sourcepub fn new(queue: Q, config: BatchConfig) -> Self
pub fn new(queue: Q, config: BatchConfig) -> Self
Creates a processor; nothing is read until start.
Sourcepub fn start<H>(&self, topic: &str, handler: H)where
H: BatchJobHandler + 'static,
pub fn start<H>(&self, topic: &str, handler: H)where
H: BatchJobHandler + 'static,
Starts a batch processor for topic using handler.
Auto Trait Implementations§
impl<Q> Freeze for BatchProcessor<Q>
impl<Q> RefUnwindSafe for BatchProcessor<Q>where
Arc<Q>: RefUnwindSafe,
impl<Q> Send for BatchProcessor<Q>
impl<Q> Sync for BatchProcessor<Q>
impl<Q> Unpin for BatchProcessor<Q>
impl<Q> UnsafeUnpin for BatchProcessor<Q>where
Arc<Q>: UnsafeUnpin,
impl<Q> UnwindSafe for BatchProcessor<Q>where
Arc<Q>: UnwindSafe,
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