pub struct WorkerOpts<Args, W: Worker<Args> + ?Sized> { /* private fields */ }Implementations§
Source§impl<Args, W> WorkerOpts<Args, W>where
W: Worker<Args>,
impl<Args, W> WorkerOpts<Args, W>where
W: Worker<Args>,
pub fn new() -> Self
pub fn retry<RO>(self, retry: RO) -> Self
pub fn retry_queue<S: Into<String>>(self, retry_queue: S) -> Self
pub fn queue<S: Into<String>>(self, queue: S) -> Self
pub fn unique_for(self, unique_for: Duration) -> Self
pub fn into_opts(&self) -> EnqueueOpts
pub async fn perform_async( &self, redis: &RedisPool, args: impl Serialize + Send + 'static, ) -> Result<()>
pub async fn perform_in( &self, redis: &RedisPool, duration: Duration, args: impl Serialize + Send + 'static, ) -> Result<()>
Trait Implementations§
Source§impl<Args, W: Worker<Args>> Default for WorkerOpts<Args, W>
impl<Args, W: Worker<Args>> Default for WorkerOpts<Args, W>
Source§impl<Args, W: Worker<Args>> From<&WorkerOpts<Args, W>> for EnqueueOpts
impl<Args, W: Worker<Args>> From<&WorkerOpts<Args, W>> for EnqueueOpts
Source§fn from(opts: &WorkerOpts<Args, W>) -> Self
fn from(opts: &WorkerOpts<Args, W>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Args, W> Freeze for WorkerOpts<Args, W>where
W: ?Sized,
impl<Args, W> RefUnwindSafe for WorkerOpts<Args, W>
impl<Args, W> Send for WorkerOpts<Args, W>
impl<Args, W> Sync for WorkerOpts<Args, W>
impl<Args, W> Unpin for WorkerOpts<Args, W>
impl<Args, W> UnsafeUnpin for WorkerOpts<Args, W>where
W: ?Sized,
impl<Args, W> UnwindSafe for WorkerOpts<Args, W>
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