pub struct TaskQueue;Expand description
A task queue that delegates to a backend for task storage and retrieval.
Implementations§
Source§impl TaskQueue
impl TaskQueue
Sourcepub fn with_config(_config: QueueConfig) -> Self
pub fn with_config(_config: QueueConfig) -> Self
Creates a new task queue with the given configuration.
Sourcepub async fn enqueue(
&self,
task: Box<dyn Task>,
backend: &dyn TaskBackend,
) -> Result<TaskId, TaskExecutionError>
pub async fn enqueue( &self, task: Box<dyn Task>, backend: &dyn TaskBackend, ) -> Result<TaskId, TaskExecutionError>
Enqueues a task for execution through the specified backend.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskQueue
impl RefUnwindSafe for TaskQueue
impl Send for TaskQueue
impl Sync for TaskQueue
impl Unpin for TaskQueue
impl UnsafeUnpin for TaskQueue
impl UnwindSafe for TaskQueue
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