Skip to main content

Crate distributed

Crate distributed 

Source

Re-exports§

pub use entity::upcast_events;
pub use entity::upcast_payload;
pub use entity::BitcodePayloadCodec;
pub use entity::Committable;
pub use entity::Entity;
pub use entity::Event;
pub use entity::EventRecord;
pub use entity::EventRecordError;
pub use entity::EventUpcaster;
pub use entity::LocalEvent;
pub use entity::PayloadCodec;
pub use entity::UpcastError;
pub use entity::BITCODE_PAYLOAD_CODEC;
pub use entity::BITCODE_PAYLOAD_CODEC_VERSION;
pub use repository::AsyncCommitBatch;
pub use repository::AsyncGetStream;
pub use repository::AsyncInboxStore;
pub use repository::AsyncReadModelWritePlanStore;
pub use repository::AsyncRelationalReadModelQueryStore;
pub use repository::AsyncRepository;
pub use repository::AsyncSnapshotStore;
pub use repository::AsyncSnapshotWrite;
pub use repository::AsyncStreamWrite;
pub use repository::AsyncTransactionalCommit;
pub use repository::CommitBatch;
pub use repository::InboxOutcome;
pub use repository::InboxReceipt;
pub use repository::PreparedEventAppend;
pub use repository::RepositoryError;
pub use repository::SnapshotWrite;
pub use repository::StreamIdentity;
pub use aggregate::hydrate;
pub use aggregate::Aggregate;
pub use aggregate::AsyncAggregateBuilder;
pub use aggregate::AsyncAggregateRepository;
pub use lock::AsyncLock;
pub use lock::AsyncLockManager;
pub use lock::InMemoryAsyncLock;
pub use lock::InMemoryAsyncLockFuture;
pub use lock::InMemoryAsyncLockManager;
pub use lock::LockError;
pub use queued_repo::AsyncGetAllWithOpts;
pub use queued_repo::AsyncGetWithOpts;
pub use queued_repo::AsyncUnlockableRepository;
pub use queued_repo::Queueable;
pub use queued_repo::QueuedRepository;
pub use queued_repo::ReadOpts;
pub use read_model::AsyncReadModelLoadBuilder;
pub use read_model::AsyncReadModelWorkspaceExt;
pub use read_model::ColumnDef;
pub use read_model::ColumnType;
pub use read_model::DeleteRowMutation;
pub use read_model::ExpectedVersion;
pub use read_model::ForeignKey;
pub use read_model::InMemoryReadModelStore;
pub use read_model::IndexDef;
pub use read_model::PatchMode;
pub use read_model::PatchRowMutation;
pub use read_model::PrimaryKey;
pub use read_model::ReadModel;
pub use read_model::ReadModelAdapterCapabilities;
pub use read_model::ReadModelCommitOutcome;
pub use read_model::ReadModelError;
pub use read_model::ReadModelIncludeRows;
pub use read_model::ReadModelLoadGraph;
pub use read_model::ReadModelLoadRequest;
pub use read_model::ReadModelMigrationArtifact;
pub use read_model::ReadModelMutation;
pub use read_model::ReadModelQueryCapabilities;
pub use read_model::ReadModelSchema;
pub use read_model::ReadModelSchemaAdapter;
pub use read_model::ReadModelSchemaAdapterCapabilities;
pub use read_model::ReadModelSchemaBootstrap;
pub use read_model::ReadModelSchemaIssue;
pub use read_model::ReadModelSchemaIssueKind;
pub use read_model::ReadModelSchemaRegistry;
pub use read_model::ReadModelSchemaVerification;
pub use read_model::ReadModelWorkspace;
pub use read_model::ReadModelWritePlan;
pub use read_model::ReadModelWritePlanBuilder;
pub use read_model::RelationalReadModel;
pub use read_model::RelationalReadModelIncludes;
pub use read_model::RelationshipDef;
pub use read_model::RelationshipKind;
pub use read_model::RowKey;
pub use read_model::RowMutation;
pub use read_model::RowPatch;
pub use read_model::RowValue;
pub use read_model::RowValues;
pub use read_model::RowWriteMode;
pub use read_model::Versioned;
pub use read_model::DEFAULT_READ_MODEL_VERSION_COLUMN;
pub use table::generate_table_migration_artifacts;
pub use table::table_schema_bootstrap_result;
pub use table::table_schema_statements;
pub use table::DeleteTableRowMutation;
pub use table::PatchTableRowMutation;
pub use table::TableAdapterCapabilities;
pub use table::TableColumn;
pub use table::TableCommitOutcome;
pub use table::TableIndex;
pub use table::TableMigrationArtifact;
pub use table::TableModel;
pub use table::TableMutation;
pub use table::TableRowMutation;
pub use table::TableSchema;
pub use table::TableSchemaAdapter;
pub use table::TableSchemaAdapterCapabilities;
pub use table::TableSchemaBootstrap;
pub use table::TableSchemaIssue;
pub use table::TableSchemaIssueKind;
pub use table::TableSchemaRegistry;
pub use table::TableSchemaRegistryExt;
pub use table::TableSchemaVerification;
pub use table::TableSqlDialect;
pub use table::TableSqlSchemaAdapter;
pub use table::TableStoreError;
pub use table::TableWritePlan;
pub use table::DEFAULT_TABLE_VERSION_COLUMN;
pub use snapshot::hydrate_from_snapshot;
pub use snapshot::AsyncSnapshotAggregateRepository;
pub use snapshot::InMemorySnapshotStore;
pub use snapshot::SnapshotRecord;
pub use snapshot::Snapshottable;

Modules§

aggregate
bus
Shared vocabulary for async message transports.
emitter
entity
lock
Lock - Pluggable locking abstractions
microsvc
microsvc — Convention-based microservice command handler framework.
queued_repo
read_model
Read Models - storage-backed projections and read-optimized views.
repository
snapshot
table
Neutral table/row primitives shared by read models and operational tables.

Macros§

aggregate
Generates the Aggregate trait impl with replay logic.
impl_aggregate
register_handlers
Register handler modules with a service using the convention pattern.

Structs§

AsyncCommitBuilder
Async builder for chaining multiple items into one transactional commit batch.
AsyncOutboxCommit
Helper returned by AsyncAggregateRepository::outbox to commit an aggregate and an outbox row in the same async transactional batch.
AsyncStagedCommitBuilder
Async builder returned after one or more aggregates are staged explicitly.
ClaimOutboxMessages
DrainResult
Result of a batch drain operation.
EventEmitter
HashMapOutboxStore
In-memory outbox table handle.
HashMapRepository
In-memory repository implementation using HashMap.
LocalEmitterPublisher
A publisher that emits events via an EventEmitter for in-process subscribers. Requires the emitter feature to be enabled.
LogPublisher
A simple publisher that logs events to stdout or a buffer.
OutboxClaimRef
OutboxDispatchOutcome
Counts of what one dispatch pass did. Raced/unclaimable ids are reflected as claimed < requested, not as an error; publish failures are released (retryable) or failed (attempt ceiling reached), not errors.
OutboxDispatcher
Bridges outbox claims to an AsyncMessagePublisher, shared by immediate after-commit dispatch and background worker polling.
OutboxMessage
Durable publication work item stored through the outbox pattern.
OutboxSource
An AsyncMessageSource backed by an AsyncOutboxStore.
OutboxWorker
Worker for processing outbox messages.
ProcessOneResult
Result of processing a single message.
ReceivedOutboxMessage
A claimed outbox row, settled back to the store on ack/nack.

Enums§

LogPublisherError
OutboxMessageStatus
Status of an outbox message.
OutboxPublishFailureAction

Constants§

DEFAULT_OUTBOX_SOURCE_BATCH
Default number of rows claimed per recv refill.
DEFAULT_OUTBOX_SOURCE_LEASE
Default lease held on a claimed row while it is being dispatched.
OUTBOX_MESSAGES_TABLE
SOURCED_METADATA_PREFIX
Reserved metadata key prefix for framework-derived keys. User metadata must not use this prefix; keys here (payload codec, destination, source context) carry decode/routing semantics and must not be shadowable by user metadata.

Traits§

AsyncCommitBuilderExt
Extension trait to start an async commit builder chain from an outbox message.
AsyncOutboxStore
Async store capability for claiming and updating durable outbox messages.
AsyncReadModelWritePlanCommitExt
Extension trait for async relational read-model write-plan commit entrypoints.
OutboxPublisher
Trait for publishing outbox records to external systems.
OutboxStore
Store capability for claiming and updating durable outbox messages.

Functions§

outbox_message_insert_plan
outbox_message_key
outbox_message_row_values
outbox_message_schema
Schema for the durable outbox delivery table.

Type Aliases§

SourcedResult

Attribute Macros§

digest
Attribute macro that automatically inserts a digest call at the beginning of a method.
enqueue
Attribute macro that automatically queues a local event for emission.
sourced
Attribute macro that generates a typed event enum, TryFrom<&EventRecord>, and impl Aggregate from annotated methods in an impl block.

Derive Macros§

ReadModel
Derive macro for the ReadModel trait.
Snapshot
Derive macro that generates a snapshot struct, fn snapshot(), and impl Snapshottable for an aggregate.