pub struct CqrsWorkQueueRecipeOptions<TCommand> {
pub name: String,
pub records: Node<WorkQueueRecord<CqrsQueuedCommandPayload<TCommand>>>,
pub status: Node<CqrsStatus>,
pub errors: Option<Node<CqrsError<TCommand>>>,
pub worker_id: Option<String>,
pub policy: CqrsWorkQueuePolicy,
}Expand description
CqrsWorkQueueRecipeOptions data container.
Fields§
§name: Stringname field for name.
records: Node<WorkQueueRecord<CqrsQueuedCommandPayload<TCommand>>>records field for records.
status: Node<CqrsStatus>status field for status.
errors: Option<Node<CqrsError<TCommand>>>errors field for errors.
worker_id: Option<String>worker_id field for worker id.
policy: CqrsWorkQueuePolicypolicy field for policy.
Implementations§
Source§impl<TCommand> CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand> CqrsWorkQueueRecipeOptions<TCommand>
Sourcepub fn new(
records: Node<WorkQueueRecord<CqrsQueuedCommandPayload<TCommand>>>,
status: Node<CqrsStatus>,
) -> Self
pub fn new( records: Node<WorkQueueRecord<CqrsQueuedCommandPayload<TCommand>>>, status: Node<CqrsStatus>, ) -> Self
Creates or computes new.
Sourcepub fn with_errors(self, errors: Node<CqrsError<TCommand>>) -> Self
pub fn with_errors(self, errors: Node<CqrsError<TCommand>>) -> Self
Updates or reads with_errors.
Sourcepub fn for_worker(self, worker_id: impl Into<String>) -> Self
pub fn for_worker(self, worker_id: impl Into<String>) -> Self
Updates or reads for_worker.
Sourcepub fn with_policy(self, policy: CqrsWorkQueuePolicy) -> Self
pub fn with_policy(self, policy: CqrsWorkQueuePolicy) -> Self
Updates or reads with_policy.
Trait Implementations§
Source§impl<TCommand: Clone> Clone for CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand: Clone> Clone for CqrsWorkQueueRecipeOptions<TCommand>
Source§fn clone(&self) -> CqrsWorkQueueRecipeOptions<TCommand>
fn clone(&self) -> CqrsWorkQueueRecipeOptions<TCommand>
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<TCommand> Freeze for CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand> !RefUnwindSafe for CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand> !Send for CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand> !Sync for CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand> Unpin for CqrsWorkQueueRecipeOptions<TCommand>where
TCommand: Unpin,
impl<TCommand> UnsafeUnpin for CqrsWorkQueueRecipeOptions<TCommand>
impl<TCommand> !UnwindSafe for CqrsWorkQueueRecipeOptions<TCommand>
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