pub struct WorkQueueOptions<T> {
pub queue_id: String,
pub bus: MessageBus<WorkQueueSubmit<T>>,
pub topic: String,
pub subscription_id: String,
pub from: MessageBusSubscriptionFrom,
pub name: Option<String>,
pub now: Rc<dyn Fn() -> u64>,
pub lease_duration_ms: u64,
pub retry: RetryPolicy,
}Expand description
WorkQueueOptions data container.
Fields§
§queue_id: Stringqueue_id field for queue id.
bus: MessageBus<WorkQueueSubmit<T>>bus field for bus.
topic: Stringtopic field for topic.
subscription_id: Stringsubscription_id field for subscription id.
from: MessageBusSubscriptionFromfrom field for from.
name: Option<String>name field for name.
now: Rc<dyn Fn() -> u64>now field for now.
lease_duration_ms: u64lease_duration_ms field for lease duration ms.
retry: RetryPolicyretry field for retry.
Implementations§
Source§impl<T> WorkQueueOptions<T>
impl<T> WorkQueueOptions<T>
Sourcepub fn new(
queue_id: impl Into<String>,
bus: MessageBus<WorkQueueSubmit<T>>,
topic: impl Into<String>,
subscription_id: impl Into<String>,
) -> Self
pub fn new( queue_id: impl Into<String>, bus: MessageBus<WorkQueueSubmit<T>>, topic: impl Into<String>, subscription_id: impl Into<String>, ) -> Self
Creates or computes new.
Sourcepub fn with_lease_duration_ms(self, lease_duration_ms: u64) -> Self
pub fn with_lease_duration_ms(self, lease_duration_ms: u64) -> Self
Updates or reads with_lease_duration_ms.
Sourcepub fn with_retry(self, retry: RetryPolicy) -> Self
pub fn with_retry(self, retry: RetryPolicy) -> Self
Updates or reads with_retry.
Trait Implementations§
Source§impl<T: Clone> Clone for WorkQueueOptions<T>
impl<T: Clone> Clone for WorkQueueOptions<T>
Source§fn clone(&self) -> WorkQueueOptions<T>
fn clone(&self) -> WorkQueueOptions<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for WorkQueueOptions<T>
impl<T> !RefUnwindSafe for WorkQueueOptions<T>
impl<T> !Send for WorkQueueOptions<T>
impl<T> !Sync for WorkQueueOptions<T>
impl<T> Unpin for WorkQueueOptions<T>where
T: Unpin,
impl<T> UnsafeUnpin for WorkQueueOptions<T>
impl<T> !UnwindSafe for WorkQueueOptions<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