pub struct OutboxClaim<E> { /* private fields */ }Expand description
English: Exposes core 0.4’s domain, persistence, and event-workflow API.
日本語: コア 0.4 のドメイン、永続化、イベント処理 API を公開します。 English: Exposes the outbox persistence port, owned claims, and acknowledgement identifiers.
日本語: アウトボックス永続化ポート、所有された取得結果、確認応答用の識別子を公開します。 English: Owned message identifier and event returned by an outbox claim.
Constructing or dropping this container does not reserve, acknowledge, or release a message. Leases, redelivery, and acknowledgement effects are adapter responsibilities.
日本語: アウトボックスの取得操作が返す、所有されたメッセージ識別子とイベントです。
このコンテナーの構築や破棄は、メッセージの予約、確認応答、解放を行いません。 リース、再配信、確認応答の効果はアダプターの責務です。
English: Split a claim to transfer its identifier and payload independently.
日本語: 識別子とペイロードを別々に渡すために取得結果を分解します。
use ddd_toolkit_core::{OutboxClaim, OutboxMessageId};
let claim = OutboxClaim::new(OutboxMessageId::new("message-1"), 42_u32);
assert_eq!(claim.message_id().as_str(), "message-1");
assert_eq!(*claim.event(), 42);
let (id, event) = claim.into_parts();
assert_eq!(id.into_inner(), "message-1");
assert_eq!(event, 42);Implementations§
Source§impl<E> OutboxClaim<E>
impl<E> OutboxClaim<E>
Sourcepub fn new(message_id: OutboxMessageId, event: E) -> OutboxClaim<E>
pub fn new(message_id: OutboxMessageId, event: E) -> OutboxClaim<E>
English: Pairs message_id with event without contacting an outbox adapter.
日本語: アウトボックスアダプターにアクセスせず、message_id と event を組にします。
Sourcepub fn message_id(&self) -> &OutboxMessageId
pub fn message_id(&self) -> &OutboxMessageId
English: Borrows the identifier used to acknowledge this message.
日本語: このメッセージの確認応答に使う識別子を借用します。
Sourcepub fn event(&self) -> &E
pub fn event(&self) -> &E
English: Borrows the claimed payload without removing it from this container.
日本語: このコンテナーから取り出さずに、取得したペイロードを借用します。
Sourcepub fn into_parts(self) -> (OutboxMessageId, E)
pub fn into_parts(self) -> (OutboxMessageId, E)
English: Consumes the claim and returns the identifier and event without cloning. This does not acknowledge the message.
日本語: 取得結果を消費し、複製せずに識別子とイベントを返します。 この操作はメッセージの確認応答を行いません。