pub struct WorkQueue<T> {
pub commands: Node<WorkQueueCommand<T>>,
pub records: Node<WorkQueueRecord<T>>,
pub status: Node<WorkQueueStatus>,
pub issues: Node<DataIssue>,
/* private fields */
}Expand description
WorkQueue data container.
Fields§
§commands: Node<WorkQueueCommand<T>>commands field for commands.
records: Node<WorkQueueRecord<T>>records field for records.
status: Node<WorkQueueStatus>status field for status.
issues: Node<DataIssue>issues field for issues.
Implementations§
Source§impl<T: Clone + 'static> WorkQueue<T>
impl<T: Clone + 'static> WorkQueue<T>
Sourcepub fn submit(
&self,
payload: T,
opts: WorkQueueSubmitOptions,
) -> MessageBusCommand<WorkQueueSubmit<T>>
pub fn submit( &self, payload: T, opts: WorkQueueSubmitOptions, ) -> MessageBusCommand<WorkQueueSubmit<T>>
Updates or reads submit.
Sourcepub fn claim(&self, opts: WorkQueueClaimOptions) -> WorkQueueCommand<T>
pub fn claim(&self, opts: WorkQueueClaimOptions) -> WorkQueueCommand<T>
Updates or reads claim.
Sourcepub fn renew_lease(
&self,
work_id: impl Into<String>,
lease_id: impl Into<String>,
attempt: u32,
worker_id: impl Into<String>,
command_id: impl Into<String>,
) -> WorkQueueCommand<T>
pub fn renew_lease( &self, work_id: impl Into<String>, lease_id: impl Into<String>, attempt: u32, worker_id: impl Into<String>, command_id: impl Into<String>, ) -> WorkQueueCommand<T>
Updates or reads renew_lease.
Sourcepub fn release(
&self,
work_id: impl Into<String>,
lease_id: impl Into<String>,
attempt: u32,
worker_id: impl Into<String>,
command_id: impl Into<String>,
) -> WorkQueueCommand<T>
pub fn release( &self, work_id: impl Into<String>, lease_id: impl Into<String>, attempt: u32, worker_id: impl Into<String>, command_id: impl Into<String>, ) -> WorkQueueCommand<T>
Updates or reads release.
Sourcepub fn complete(
&self,
work_id: impl Into<String>,
lease_id: impl Into<String>,
attempt: u32,
worker_id: impl Into<String>,
command_id: impl Into<String>,
result: Option<String>,
) -> WorkQueueCommand<T>
pub fn complete( &self, work_id: impl Into<String>, lease_id: impl Into<String>, attempt: u32, worker_id: impl Into<String>, command_id: impl Into<String>, result: Option<String>, ) -> WorkQueueCommand<T>
Updates or reads complete.
Sourcepub fn fail(
&self,
work_id: impl Into<String>,
lease_id: impl Into<String>,
attempt: u32,
worker_id: impl Into<String>,
command_id: impl Into<String>,
retryable: Option<bool>,
) -> WorkQueueCommand<T>
pub fn fail( &self, work_id: impl Into<String>, lease_id: impl Into<String>, attempt: u32, worker_id: impl Into<String>, command_id: impl Into<String>, retryable: Option<bool>, ) -> WorkQueueCommand<T>
Updates or reads fail.
Sourcepub fn cancel(
&self,
work_id: impl Into<String>,
command_id: impl Into<String>,
reason: Option<String>,
) -> WorkQueueCommand<T>
pub fn cancel( &self, work_id: impl Into<String>, command_id: impl Into<String>, reason: Option<String>, ) -> WorkQueueCommand<T>
Updates or reads cancel.
Sourcepub fn schedule(
&self,
work_id: impl Into<String>,
not_before_ms: u64,
command_id: impl Into<String>,
) -> WorkQueueCommand<T>
pub fn schedule( &self, work_id: impl Into<String>, not_before_ms: u64, command_id: impl Into<String>, ) -> WorkQueueCommand<T>
Updates or reads schedule.
Sourcepub fn expire_leases(
&self,
command_id: impl Into<String>,
) -> WorkQueueCommand<T>
pub fn expire_leases( &self, command_id: impl Into<String>, ) -> WorkQueueCommand<T>
Updates or reads expire_leases.
Sourcepub fn available(&self) -> WorkQueueAvailableProjection<T>
pub fn available(&self) -> WorkQueueAvailableProjection<T>
Updates or reads available.
Sourcepub fn available_named(
&self,
name: Option<impl Into<String>>,
) -> WorkQueueAvailableProjection<T>
pub fn available_named( &self, name: Option<impl Into<String>>, ) -> WorkQueueAvailableProjection<T>
Updates or reads available_named.
Sourcepub fn work(
&self,
work_id: impl Into<String>,
) -> WorkQueueProjection<WorkQueueWorkSnapshot<T>>
pub fn work( &self, work_id: impl Into<String>, ) -> WorkQueueProjection<WorkQueueWorkSnapshot<T>>
Updates or reads work.
Sourcepub fn work_named(
&self,
work_id: impl Into<String>,
name: Option<impl Into<String>>,
) -> WorkQueueProjection<WorkQueueWorkSnapshot<T>>
pub fn work_named( &self, work_id: impl Into<String>, name: Option<impl Into<String>>, ) -> WorkQueueProjection<WorkQueueWorkSnapshot<T>>
Updates or reads work_named.
Sourcepub fn dead_letter(&self) -> WorkQueueProjection<WorkQueueDeadLetterPage<T>>
pub fn dead_letter(&self) -> WorkQueueProjection<WorkQueueDeadLetterPage<T>>
Updates or reads dead_letter.
Sourcepub fn dead_letter_named(
&self,
name: Option<impl Into<String>>,
) -> WorkQueueProjection<WorkQueueDeadLetterPage<T>>
pub fn dead_letter_named( &self, name: Option<impl Into<String>>, ) -> WorkQueueProjection<WorkQueueDeadLetterPage<T>>
Updates or reads dead_letter_named.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for WorkQueue<T>
impl<T> !RefUnwindSafe for WorkQueue<T>
impl<T> !Send for WorkQueue<T>
impl<T> !Sync for WorkQueue<T>
impl<T> Unpin for WorkQueue<T>where
T: Unpin,
impl<T> UnsafeUnpin for WorkQueue<T>
impl<T> !UnwindSafe for WorkQueue<T>
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