nitinol-inmemory-adaptor

Crates.ionitinol-inmemory-adaptor
lib.rsnitinol-inmemory-adaptor
version0.1.0
created_at2025-03-25 06:04:37.906958+00
updated_at2025-03-25 06:04:37.906958+00
descriptionIn-memory storage adapter for `nitinol-persistence`.
homepage
repositoryhttps://github.com/HalsekiRaika/nitinol-inmemory-adaptor
max_upload_size
id1604814
size49,798
RechellaTek (HalsekiRaika)

documentation

README

nitinol-inmemory-adaptor

This is a simple adaptor to use Nitinol with inmemory database.

[!CAUTION]
This in-memory adapter loses data when the program is terminated. (of course)
It should only be used to test the library and do not be used into production.

Usage

#[tokio::main]
async fn main() {
    let eventstore = InMemoryEventStore::default();
    let writer = EventWriter::new(eventstore).set_retry(5);
    
    // Install as global writer.
    nitinol::setup::set_writer(writer);
}
Commit count: 14

cargo fmt