pub struct EmailWorker<B: QueueBackend> { /* private fields */ }Expand description
Email worker for background processing
Implementations§
Source§impl<B: QueueBackend + 'static> EmailWorker<B>
impl<B: QueueBackend + 'static> EmailWorker<B>
Sourcepub fn new(service: Arc<EmailQueueService<B>>) -> Self
pub fn new(service: Arc<EmailQueueService<B>>) -> Self
Create a new email worker
Sourcepub fn with_config(self, config: EmailWorkerConfig) -> Self
pub fn with_config(self, config: EmailWorkerConfig) -> Self
Create a worker with configuration
Sourcepub async fn start(&self) -> JoinHandle<()>
pub async fn start(&self) -> JoinHandle<()>
Start the worker
Auto Trait Implementations§
impl<B> Freeze for EmailWorker<B>
impl<B> !RefUnwindSafe for EmailWorker<B>
impl<B> Send for EmailWorker<B>
impl<B> Sync for EmailWorker<B>
impl<B> Unpin for EmailWorker<B>
impl<B> !UnwindSafe for EmailWorker<B>
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