Expand description
Building blocks for DDD-based applications with CQRS and event sourcing, on top of EventSourcingDB.
Structs§
- Domain
Error - A business rule that refused a command, with a message for the caller.
- Failure
- What failed, as in
reading "/books/42", and the error that caused it, if there is one, such as the error of the client SDK. - NotA
Revision - A value that was meant to be a revision, but is not one.
- Precondition
- A condition that must hold for the events of a command to be written.
- Subject
Scheme - How a subject is composed: literal segments and placeholders in braces, as
in
/tenant/{tenant}/workshop/{workshop}. - Subject
Values Error - The values that
SubjectScheme::checkrefuses, with a message that may reach the caller of an API.
Enums§
- Category
- What a failure means for its caller, on two axes: whether it is a matter of the domain or of the machinery, and whether trying again unchanged could help.
- Permanent
- A failure of the category
Category::Permanent: trying again will not help. - Preconditions
Error - Why a command declares its preconditions in a way they can not be honored
(see
check_preconditions). - Transient
- A failure of the category
Category::Transient: trying again later, unchanged, may succeed.
Traits§
- Categorized
- An error that names its
Category. - Command
- A command, which knows the subject it acts on, and the conditions under which its events may be written.
- Event
- The data of an event, which describes what has happened.
- Schema
- The JSON schema of a type, which describes exactly what serde writes for it.
Functions§
- check_
preconditions - Checks that a command declares its preconditions in a way they can be honored, before anything is read, as executing a command does.
- compare_
revisions - Compares two revisions as numbers, since event IDs are decimal strings, and “10” sorts before “9” as text.
- parse_
revision - Reads a revision, which is an event ID of EventSourcingDB, as a number.