Expand description
English: Core traits for modeling Domain-Driven Design entities and value objects.
日本語: ドメイン駆動設計のエンティティと値オブジェクトを表現するためのコアトレイトを提供します。
English: Entity exposes a stable identifier by reference, while ValueObject exposes
a wrapped value by reference or by value. Implement these traits on domain types to keep their
domain-facing APIs independent from persistence details.
日本語: Entity は安定した識別子を参照で公開し、ValueObject は内包値を参照または
値で公開します。永続化の詳細から独立したドメイン型の API を保つために、これらのトレイトを実装します。
English: For event-sourced aggregates, EventStore loads complete StreamHistory values
and appends events using ExpectedRevision. AggregateReplay supplies reconstruction hooks
for replay_aggregate and replay_with_optional_snapshot. SnapshotStore persists
AggregateSnapshot values separately; adapters define storage and concurrency behavior.
日本語: イベントソーシングを使う集約では、EventStore が完全な StreamHistory を
読み込み、ExpectedRevision を条件にイベントを追加します。AggregateReplay は
replay_aggregate と replay_with_optional_snapshot の復元フックを定めます。
SnapshotStore は AggregateSnapshot を別途永続化し、保存や並行処理の挙動は
アダプターが定めます。
English: Secret wraps a value implementing zeroize::Zeroize, redacts its formatted
output, and zeroizes it on drop. Access to the unredacted value is explicit; extracting it
transfers responsibility for zeroization to the caller. SecretMetadata is a zero-sized
marker and does not itself protect data.
日本語: Secret は zeroize::Zeroize を実装する値を包み、書式出力を秘匿化し、
破棄時にゼロ化します。秘匿化していない値には明示的にアクセスし、値を取り出した後の
ゼロ化は呼び出し側が管理します。SecretMetadata はサイズがゼロのマーカーであり、
それ自体はデータを保護しません。
English: AsyncEventStore and AsyncSnapshotStore expose boxed Send futures for
event and snapshot persistence. EventConsumer and Projection separate event handling
from read-model updates, with asynchronous counterparts AsyncEventConsumer and
AsyncProjection. DomainEventDeliveryMetadata optionally exposes DeliveryMetadata.
TransactionalOutbox separates save-and-enqueue, claim, and acknowledgement operations;
adapters supply transactions and delivery policies, not this crate.
日本語: AsyncEventStore と AsyncSnapshotStore はイベントとスナップショットの
永続化を、ボックス化された Send Future で公開します。EventConsumer と Projection
はイベント処理と読み取りモデル更新を分け、非同期版の AsyncEventConsumer と
AsyncProjection も提供します。DomainEventDeliveryMetadata は任意で
DeliveryMetadata を公開します。TransactionalOutbox は保存・登録、取得、確認応答を
分離します。トランザクションと配信方針はこのクレートではなくアダプターが提供します。
English: TransactionalOutboxLifecycleContext tracks a single save-and-enqueue attempt.
It pulls pending events without restoring them on failure, rejects repeated attempts, and
reports missing or unsuccessful enqueueing at completion. It does not implement a transaction.
日本語: TransactionalOutboxLifecycleContext は保存・登録の一回の試行を追跡します。
保留イベントを取り出して失敗時も復元せず、繰り返しの試行を拒否し、完了確認時に
未試行や未成功を報告します。トランザクション自体は実装しません。
English: AsyncTransactionalOutbox provides future-based outbox operations.
AsyncTransactionalOutboxLifecycleContext consumes an attempt and pulls events before polling;
dropping its future does not restore events. ProjectionCheckpoint carries application-defined
progress for ProjectionCheckpointStore, while IdempotentProjection reports applied or
duplicate input via ProjectionApplication. Implementations supply duplicate detection and
coordination between checkpoint persistence and read-model changes.
日本語: AsyncTransactionalOutbox は Future によるアウトボックス操作を提供します。
AsyncTransactionalOutboxLifecycleContext はポーリング前に試行を消費してイベントを取り出し、
Future の破棄でも復元しません。ProjectionCheckpoint はアプリケーション定義の進捗を
ProjectionCheckpointStore に渡し、IdempotentProjection は適用または重複を
ProjectionApplication で報告します。重複検出と、チェックポイント永続化・読み取りモデル変更の
連携は実装が提供します。
English: AsyncProjectionCheckpointStore persists progress through boxed Send futures,
and AsyncIdempotentProjection asynchronously distinguishes new application from duplicates.
These independent ports do not coordinate transactions; dropping a future does not guarantee
rollback or absence of side effects. Implementations define cancellation and retry semantics.
日本語: AsyncProjectionCheckpointStore はボックス化された Send Future で進捗を永続化し、
AsyncIdempotentProjection は新規適用と重複を非同期に区別します。これらの独立したポートは
トランザクションを調整せず、Future の破棄はロールバックや副作用の不在を保証しません。
キャンセルと再試行の意味は実装が定めます。
English: Specification composes fallible predicates with short-circuiting And,
Or, and Not. DomainService, Policy, and DomainFactory define typed operation,
rule-checking, and construction boundaries without prescribing persistence or thread safety.
ProcessManager returns a Transition of state and effect descriptions for callers to
store and execute. UnitOfWork exposes explicit registration, commit, and rollback ports;
implementations define their transaction guarantees. EventIdentity and VersionedEvent
describe event schemas, while UpcasterChain applies EventUpcaster stages in insertion
order without automatically selecting versions.
日本語: Specification は失敗し得る述語を、短絡評価する And、Or、Not で
結合します。DomainService、Policy、DomainFactory は永続化やスレッド安全性を
規定せず、型付きの操作、規則確認、構築の境界を定めます。ProcessManager は状態と
副作用の記述を Transition で返し、保存と実行は呼び出し側が担います。UnitOfWork は
明示的な登録、コミット、ロールバックのポートであり、トランザクションの保証は実装が定めます。
EventIdentity と VersionedEvent はイベントのスキーマを表し、UpcasterChain は
バージョンを自動選択せず、EventUpcaster の段階を追加順に適用します。
Structs§
- Aggregate
Snapshot - English: Re-exports snapshot state containers, classification, storage contracts, and errors.
- And
- English: Exposes fallible specifications and their short-circuiting boolean wrappers.
- Append
Result - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Async
Lifecycle Context - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Async
Transactional Outbox Lifecycle Context - English: Exposes asynchronous single-attempt enqueue tracking, errors, and their short aliases.
- Delivery
Metadata - English: Exposes delivery identifier containers and opt-in metadata access for events.
- Event
Identity - English: Exposes event schema identities and insertion-ordered, fallible upcasting stages.
- Lifecycle
Context - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- NoStream
- English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Not
- English: Exposes fallible specifications and their short-circuiting boolean wrappers.
- Or
- English: Exposes fallible specifications and their short-circuiting boolean wrappers.
- Outbox
Claim - English: Exposes the outbox persistence port, owned claims, and acknowledgement identifiers.
- Outbox
Message Id - English: Exposes the outbox persistence port, owned claims, and acknowledgement identifiers.
- Projection
Checkpoint - English: Exposes typed projection progress and synchronous/asynchronous checkpoint and duplicate-aware application ports.
- Rehydrated
Aggregate - English: Re-exports aggregate reconstruction hooks, replay helpers, results, and failure types.
- Revision
Conflict - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Secret
- English: Exposes
secret::Secretfor redacted formatting and zeroization on drop. - Secret
Metadata - English: Exposes
secret_metadata::SecretMetadata, a marker with no stored secret value. - Stream
History - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Stream
Revision - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Transactional
Outbox Lifecycle Context - English: Exposes the single-attempt outbox lifecycle context, its errors, and their short aliases.
- Transition
- English: Exposes process transition computation and owned state/effect results.
- Upcaster
Chain - English: Exposes event schema identities and insertion-ordered, fallible upcasting stages.
Enums§
- Append
Error - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Async
Transactional Outbox Completion Error - English: Exposes asynchronous single-attempt enqueue tracking, errors, and their short aliases.
- Async
Transactional Outbox Operation Error - English: Exposes asynchronous single-attempt enqueue tracking, errors, and their short aliases.
- Current
Revision - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Expected
Revision - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Lifecycle
Completion Error - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Lifecycle
Operation Error - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Load
Result - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Projection
Application - English: Exposes typed projection progress and synchronous/asynchronous checkpoint and duplicate-aware application ports.
- Replay
Error - English: Re-exports aggregate reconstruction hooks, replay helpers, results, and failure types.
- Snapshot
Load Error - English: Re-exports snapshot state containers, classification, storage contracts, and errors.
- Snapshot
Replay Error - English: Re-exports aggregate reconstruction hooks, replay helpers, results, and failure types.
- Snapshot
Save Error - English: Re-exports snapshot state containers, classification, storage contracts, and errors.
- Snapshot
Use - English: Re-exports snapshot state containers, classification, storage contracts, and errors.
- Stream
History Error - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Transactional
Outbox Completion Error - English: Exposes the single-attempt outbox lifecycle context, its errors, and their short aliases.
- Transactional
Outbox Operation Error - English: Exposes the single-attempt outbox lifecycle context, its errors, and their short aliases.
Traits§
- Aggregate
Creator - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Aggregate
Replay - English: Re-exports aggregate reconstruction hooks, replay helpers, results, and failure types.
- Aggregate
Root - English: Re-exports the
aggregate_root::AggregateRoottrait for the crate’s public API. - Async
Aggregate Creator - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Async
Command Handler - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Async
Domain Event Publisher - English: Re-exports
async_domain_event_publisher::AsyncDomainEventPublisher, the trait implemented by asynchronous domain-event publishers. - Async
Event Consumer - English: Exposes asynchronous event handling and read-model update ports.
- Async
Event Store - English: Exposes
async_event_store::AsyncEventStorefor future-based event persistence. - Async
Idempotent Projection - English: Exposes typed projection progress and synchronous/asynchronous checkpoint and duplicate-aware application ports.
- Async
Lifecycle Callback - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Async
Projection - English: Exposes asynchronous event handling and read-model update ports.
- Async
Projection Checkpoint Store - English: Exposes typed projection progress and synchronous/asynchronous checkpoint and duplicate-aware application ports.
- Async
Query Handler - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Async
Repository - English: Re-exports
async_repository::AsyncRepository, the trait for asynchronous persistence operations on aggregates. - Async
Snapshot Store - English: Exposes
async_snapshot::AsyncSnapshotStorefor asynchronous snapshot storage. - Async
Transactional Outbox - English: Exposes
async_transactional_outbox::AsyncTransactionalOutboxfor asynchronous save, claim, and acknowledgement. - Command
Handler - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Domain
Event - English: Re-exports the
domain_event::DomainEventmarker trait for the crate’s public API. - Domain
Event Conversion - English: Re-exports
domain_event_conversion::DomainEventConversionfor converting a domain event into another representation. - Domain
Event Delivery Metadata - English: Exposes delivery identifier containers and opt-in metadata access for events.
- Domain
Event Metadata - English: Re-exports
domain_event_metadata::DomainEventMetadatafor describing an event name, version, and optional metadata. - Domain
Event Publisher - English: Re-exports the
domain_event_publisher::DomainEventPublishertrait for publishing domain events. - Domain
Factory - English: Exposes
domain_factory::DomainFactoryfor fallible construction from owned input. - Domain
Service - English: Exposes typed domain operations and borrowed-context policy checks.
- Entity
- English: Re-exports the
entity::Entitytrait for the crate’s public API. - Event
Consumer - English: Exposes synchronous event consumption and projection update contracts.
- Event
Store - English: Re-exports event-stream storage contracts, revision checks, and validated histories.
- Event
Upcaster - English: Exposes event schema identities and insertion-ordered, fallible upcasting stages.
- Idempotent
Projection - English: Exposes typed projection progress and synchronous/asynchronous checkpoint and duplicate-aware application ports.
- Lifecycle
Callback - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Policy
- English: Exposes typed domain operations and borrowed-context policy checks.
- Process
Manager - English: Exposes process transition computation and owned state/effect results.
- Projection
- English: Exposes synchronous event consumption and projection update contracts.
- Projection
Checkpoint Store - English: Exposes typed projection progress and synchronous/asynchronous checkpoint and duplicate-aware application ports.
- Query
Handler - English: Re-exports synchronous and asynchronous CQRS handlers, aggregate creators, and lifecycle APIs.
- Repository
- English: Re-exports the
repository::Repositorytrait for the crate’s public API. - Snapshot
Store - English: Re-exports snapshot state containers, classification, storage contracts, and errors.
- Specification
- English: Exposes fallible specifications and their short-circuiting boolean wrappers.
- Transactional
Outbox - English: Exposes the outbox persistence port, owned claims, and acknowledgement identifiers.
- Unit
OfWork - English: Exposes
unit_of_work::UnitOfWorkfor explicit change registration and transaction requests. - Value
Object - English: Re-exports the
value_object::ValueObjecttrait for the crate’s public API. - Versioned
Event - English: Exposes event schema identities and insertion-ordered, fallible upcasting stages.
Functions§
- dispatch_
events - English: Publishes all currently pending events from an aggregate.
- dispatch_
events_ async - English: Re-exports
async_dispatch::dispatch_events_asyncto publish aggregate events asynchronously with restoration of pulled events if publishing fails. - replay_
aggregate - English: Re-exports aggregate reconstruction hooks, replay helpers, results, and failure types.
- replay_
with_ optional_ snapshot - English: Re-exports aggregate reconstruction hooks, replay helpers, results, and failure types.
Type Aliases§
- Async
Outbox Lifecycle Completion Error - English: Exposes asynchronous single-attempt enqueue tracking, errors, and their short aliases.
- Async
Outbox Lifecycle Context - English: Exposes asynchronous single-attempt enqueue tracking, errors, and their short aliases.
- Async
Outbox Lifecycle Operation Error - English: Exposes asynchronous single-attempt enqueue tracking, errors, and their short aliases.
- Outbox
Lifecycle Completion Error - English: Exposes the single-attempt outbox lifecycle context, its errors, and their short aliases.
- Outbox
Lifecycle Context - English: Exposes the single-attempt outbox lifecycle context, its errors, and their short aliases.
- Outbox
Lifecycle Operation Error - English: Exposes the single-attempt outbox lifecycle context, its errors, and their short aliases.