Expand description
Shared vocabulary types and traits for the EventCore event sourcing library.
This crate provides the foundational types that are shared between the main
eventcore crate and adapter implementations like eventcore-postgres.
By extracting these types into a separate crate, we enable feature flag-based
adapter re-exports without circular dependencies.
§Overview
This crate contains:
- Core traits:
Event,EventStore,CommandLogic,CommandStreams,StreamResolver - Domain types:
StreamId,StreamVersion,StreamWrites,StreamWriteEntry - Event handling:
EventStreamReader,EventStreamSlice,NewEvents - Command types:
StreamDeclarations,StreamDeclarationsError - Errors:
EventStoreError,CommandError,Operation
Structs§
- Attempt
Number - Attempt number for retry operations (1-based).
- Backoff
Multiplier - Backoff multiplier for exponential retry delays.
- Batch
Size - Batch size domain type for limiting query results.
- Delay
Milliseconds - Delay in milliseconds for retry or backoff operations.
- Event
Filter - Filter criteria for selecting which events to read from the event store.
- Event
Page - Pagination parameters for reading events.
- Event
Stream Reader - Event stream reader generic over event payload type.
- Event
Stream Slice - Marker type returned by a successful
EventStore::append_events()call. - Failure
Context - Context provided to error handler when event processing fails.
- MaxConsecutive
Failures - Maximum number of consecutive poll failures before stopping.
- MaxRetries
- Maximum number of retry attempts.
- MaxRetry
Attempts - Maximum number of retry attempts for event processing.
- NewEvents
- Collection of new events produced by a command.
- Retry
Count - Count of retry attempts that have been made (0-based).
- Stream
Declarations - Stream
Id - Stream identifier domain type.
- Stream
Position - Global stream position representing a location in the ordered event log.
- Stream
Prefix - Stream prefix domain type for filtering events by stream ID prefix.
- Stream
Version - Stream version domain type.
- Stream
Write Entry - Stream
Writes - Collection of events to write, organized by stream.
Enums§
- Command
Error - Error type for command execution failures.
- Event
Store Error - Error type returned by event store operations.
- Failure
Strategy - Strategy for handling event processing failures.
- Operation
- Identifies the event store operation that failed.
- Stream
Declarations Error
Traits§
- Checkpoint
Store - Trait for persisting and retrieving projection checkpoints.
- Command
Logic - Trait defining the business logic of a command.
- Command
Streams - Infrastructure trait describing the streams required to execute a command.
- Event
- Event trait for domain-first event sourcing.
- Event
Reader - Trait for reading events globally for projections.
- Event
Store - Trait defining the contract for event store implementations.
- Projector
- Trait for transforming events into read model updates.
- Projector
Coordinator - Trait for coordinating projector leadership across multiple instances.
- Stream
Resolver - Trait for runtime stream discovery when static declarations are insufficient.