Expand description
Core event model and async IO traits for the eventuary toolkit.
This crate provides the typed event model (Event, Payload, Topic,
Namespace, OrganizationId), serialization helpers (SerializedEvent),
and async IO traits for backends (io::Reader, io::Writer, io::Handler, io::Acker).
Most consumers should depend on the eventuary umbrella crate and pick
backends via Cargo features, instead of using eventuary-core directly.
Use this crate when you are implementing a new backend or want only the
core types without any backend.
§Example
use eventuary_core::{Event, Payload};
let event = Event::builder(
"acme",
"/billing",
"invoice.created",
"invoice-123",
Payload::from_json(&serde_json::json!({"amount": 100})).unwrap(),
).unwrap()
.build().unwrap();
assert_eq!(event.topic().as_str(), "invoice.created");Re-exports§
pub use partition::HasPartition;pub use partition::Partition;pub use io::filter::NamespacePattern;pub use io::filter::TopicPattern;pub use io::position::PartitionableSubscription;pub use io::position::StartFrom;pub use io::position::StartableSubscription;pub use io::position::StopAt;
Modules§
Structs§
- Context
- Context
Error - Event
- Event
Collector - EventId
- Event
Key - Field
Map - Json
Payload Codec - Metadata
- Namespace
- Organization
Id - Payload
- Payload
Event Codec - Payload
Passthrough Codec - Serialized
Event - Wire-format representation of an
Event. Field order matchesEventso the JSON shape is predictable and self-documenting. - Topic
Enums§
- Content
Type - Context
Value - Error
- Serialized
Payload - Wire-format representation of a
Payload.