Expand description
The EventEnvelope — the standard wrapper for every persisted event.
Infrastructure metadata (routing, tracing, auditing) lives in the envelope. The business payload is opaque JSON, allowing each domain crate to own its own schema without leaking it into the engine layer.
§Write / read split
-
NewEventis what the caller submits toEventStore::append. It contains everything the caller knows: context IDs, the typed payload. It intentionally omitsevent_id,stream_id,sequence_number, andtimestamp— the store assigns those atomically during the append. -
EventEnvelopeis what the store returns and persists. It is the complete, immutable record.
Structs§
- Event
Envelope - A single persisted event, wrapped in engine-level metadata.
- NewEvent
- A pending event ready to be appended to a stream.