Expand description
§eventsourcingdb
The official Rust client SDK for EventSourcingDB – a purpose-built database for event sourcing. EventSourcingDB enables you to build and operate event-driven applications with native support for writing, reading, and observing events. This client SDK provides convenient access to its capabilities in Rust. For more information on EventSourcingDB, see its official documentation. This client SDK includes support for Testcontainers to spin up EventSourcingDB instances in integration tests. For details, see Using Testcontainers.
§Getting Started
Install the client SDK:
cargo add eventsourcingdbImport the package and create an instance by providing the URL of your EventSourcingDB instance and the API token to use:
use eventsourcingdb::client::Client;
// ...
let base_url: Url = "localhost:3000".parse().unwrap();
let api_token = "secret";
let client = Client::new(base_url, api_token);§Examples
Examples can be found in the examples directory.
Re-exports§
pub use client::Client;pub use client::Precondition;pub use client::request_options;pub use event::Event;pub use event::EventCandidate;pub use event::ManagementEvent;pub use event::TraceInfo;
Modules§
- client
- Client for the EventsourcingDB API.
- container
- This module holds the optional testcontainer utility functions of the SDK.
- error
- This module contains all error types of the SDK.
- event
- This module holds all event types that are send between the client and the database.