pub struct ProcessMessagingPolicy<TPayload, TCommand> {
pub command: ProcessMessageCommandFn<TPayload, TCommand>,
pub ack_rejected: bool,
pub outbox_topic: Option<String>,
}Expand description
ProcessMessagingPolicy data container.
Fields§
§command: ProcessMessageCommandFn<TPayload, TCommand>command field for command.
ack_rejected: boolack_rejected field for ack rejected.
outbox_topic: Option<String>outbox_topic field for outbox topic.
Implementations§
Source§impl<TPayload, TCommand> ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> ProcessMessagingPolicy<TPayload, TCommand>
Sourcepub fn new(
command: impl Fn(&MessageEnvelope<TPayload>, &MessageBusDelivery) -> Option<ProcessCommand<TCommand>> + 'static,
) -> Self
pub fn new( command: impl Fn(&MessageEnvelope<TPayload>, &MessageBusDelivery) -> Option<ProcessCommand<TCommand>> + 'static, ) -> Self
Creates or computes new.
Sourcepub fn ack_rejected(self, ack_rejected: bool) -> Self
pub fn ack_rejected(self, ack_rejected: bool) -> Self
Updates or reads ack_rejected.
Sourcepub fn with_outbox_topic(self, topic: impl Into<String>) -> Self
pub fn with_outbox_topic(self, topic: impl Into<String>) -> Self
Updates or reads with_outbox_topic.
Trait Implementations§
Source§impl<TPayload: Clone, TCommand: Clone> Clone for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload: Clone, TCommand: Clone> Clone for ProcessMessagingPolicy<TPayload, TCommand>
Source§fn clone(&self) -> ProcessMessagingPolicy<TPayload, TCommand>
fn clone(&self) -> ProcessMessagingPolicy<TPayload, 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<TPayload, TCommand> Freeze for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> !RefUnwindSafe for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> !Send for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> !Sync for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> Unpin for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> UnsafeUnpin for ProcessMessagingPolicy<TPayload, TCommand>
impl<TPayload, TCommand> !UnwindSafe for ProcessMessagingPolicy<TPayload, 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