pub struct Worker { /* private fields */ }
Implementations§
source§impl Worker
impl Worker
pub fn new(consumer: Consumer) -> Self
pub fn concurrency(&self) -> Option<usize>
pub fn with_concurrency(self, concurrency: Option<usize>) -> Self
pub fn poll_interval(&self) -> &Option<u64>
pub fn with_poll_interval(self, poll_interval: Option<u64>) -> Self
pub fn cancellation_token(&self) -> &CancellationToken
pub fn with_cancellation_token( self, cancellation_token: CancellationToken, ) -> Self
pub async fn run(self, job_processor: impl JobProcessor) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Worker
impl !RefUnwindSafe for Worker
impl Send for Worker
impl Sync for Worker
impl Unpin for Worker
impl !UnwindSafe for Worker
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