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::CommitBatch;
pub use repository::GetStream;
pub use repository::InboxOutcome;
pub use repository::InboxReceipt;
pub use repository::InboxStore;
pub use repository::PreparedEventAppend;
pub use repository::ReadModelWritePlanStore;
pub use repository::RelationalReadModelQueryStore;
pub use repository::Repository;
pub use repository::RepositoryError;
pub use repository::SnapshotStore;
pub use repository::SnapshotWrite;
pub use repository::StreamIdentity;
pub use repository::StreamWrite;
pub use repository::TransactionalCommit;
pub use aggregate::hydrate;
pub use aggregate::Aggregate;
pub use aggregate::AggregateBuilder;
pub use aggregate::AggregateRepository;
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::GetAllWithOpts;
pub use queued_repo::GetWithOpts;
pub use queued_repo::Queueable;
pub use queued_repo::QueuedRepository;
pub use queued_repo::ReadOpts;
pub use queued_repo::UnlockableRepository;
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::ReadModelLoadBuilder;
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::ReadModelWorkspaceExt;
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 manifest::DistributedManifestEnvelope;
pub use manifest::DistributedProjectManifest;
pub use manifest::MessageEndpointManifest;
pub use manifest::ServiceManifest;
pub use manifest::TransportManifest;
pub use manifest::DISTRIBUTED_MANIFEST_SCHEMA_VERSION;
pub use snapshot::hydrate_from_snapshot;
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
manifest
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§

AggregateCommit
Builder returned by AggregateRepository::outbox and AggregateRepository::read_models that commits an aggregate together with outbox rows, relational read-model writes, and (when the repository has snapshots configured) a snapshot — all in one async transactional batch.
BusOutboxPublishHook
Publishes committed outbox rows through publisher and settles their claims in store. The store must be the same outbox store the commit wrote to.
BusPublisher
Publishes outbox-derived Messages through a Bus, routing by kind: commands to send_message (point-to-point), events to publish_message (fan-out).
ClaimOutboxMessages
CommitBuilder
Async builder for chaining multiple items into one transactional commit batch.
CommitReceipt
Outcome of an outbox-bearing commit.
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.
OutboxPublisherConfig
Outbox publisher installed on a repository so commits publish immediately.
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.
StagedCommitBuilder
Async builder returned after one or more aggregates are staged explicitly.

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§

AsyncOutboxStore
Async store capability for claiming and updating durable outbox messages.
CommitBuilderExt
Extension trait to start an async commit builder chain from an outbox message.
OutboxPublishHook
Publishes an already-committed, claimed outbox row and settles its claim.
OutboxPublisher
Trait for publishing outbox records to external systems.
OutboxStore
Store capability for claiming and updating durable outbox messages.
ReadModelWritePlanCommitExt
Extension trait for async relational read-model write-plan commit entrypoints.

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.