Expand description
§cqrs-core
cqrs-core defines the core types for the CQRS aggregate system
Modules§
Structs§
- Always
Snapshot - A snapshot strategy that will always recommend taking a snapshot.
- Borrowed
RawEvent - An owned, raw view of event data.
- Event
Number - Represents an event sequence number, starting at 1
- Never
Snapshot - A snapshot strategy that will never recommend taking a snapshot.
- RawEvent
- An owned, raw view of event data.
- Versioned
Aggregate - A structured tuple combining an aggregate and its current version.
- Versioned
Event - A structured tuple combining an event number and an event.
- Versioned
Event With Metadata - A structured tuple combining an event number and an event.
Enums§
- Before
- The starting point when reading a stream of values from an [EventSource].
- Precondition
- A precondition that must be upheld for a command to be executed or for events to be persisted.
- Since
- The starting point when reading a stream of values from an [EventSource].
- Snapshot
Recommendation - A recommendation on whether or not a snapshot should be persisted.
- Version
- An aggregate version.
Traits§
- Aggregate
- A projected state built from a series of events.
- Aggregate
Command - A command that can be executed against an aggregate.
- Aggregate
Event - An event that can be applied to an aggregate.
- Aggregate
Id - An identifier for an aggregate.
- Cqrs
Error - Represents a common trait that all errors handled by CQRS should implement.
- Deserializable
Event - An event that can be deserialized from a buffer.
- Event
- A thing that happened.
- Event
Sink - A sink for writing/persisting events with associated metadata.
- Event
Source - A source for reading/loading events.
- Events
- An iterable and sliceable list of events.
- Serializable
Event - An event that can be serialized to a buffer.
- Snapshot
Sink - A sink for writing/persisting snapshots of aggregates.
- Snapshot
Source - A source for reading/loading snapshots of aggregates.
- Snapshot
Strategy - A strategy determining when to recommend a snapshot be taken.
Type Aliases§
- Command
Error - The error produced when this command cannot be executed against an aggregate.
- Produced
Event - The event type produced by this command.
- Produced
Events - The event sequence produced by this command.