pub struct WorkerExecutor { /* private fields */ }Expand description
Worker executor that processes jobs
Implementations§
Source§impl WorkerExecutor
impl WorkerExecutor
pub fn new(queue: Arc<JobQueue>, config: WorkerConfig) -> Self
Sourcepub async fn register_handler<F, Fut>(
&self,
job_type: impl Into<String>,
handler: F,
)
pub async fn register_handler<F, Fut>( &self, job_type: impl Into<String>, handler: F, )
Register a job handler
Auto Trait Implementations§
impl Freeze for WorkerExecutor
impl !RefUnwindSafe for WorkerExecutor
impl Send for WorkerExecutor
impl Sync for WorkerExecutor
impl Unpin for WorkerExecutor
impl !UnwindSafe for WorkerExecutor
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