Skip to main content

Module store

Module store 

Source
Expand description

Storage backends and abstractions.

This module provides the storage layer abstraction for Nitrite. The storage system is pluggable, allowing different implementations (in-memory, file-based, etc.).

§Storage Providers

Storage providers implement NitriteStoreProvider and are loaded as plugins. Nitrite includes:

  • In-Memory Store: InMemoryStoreModule for testing and temporary data
  • Fjall Store: nitrite-fjall-adapter for persistent, LSM-based storage

§Key-Value Abstraction

The storage layer provides a key-value map interface through NitriteMapProvider. Maps support:

  • Basic operations: get, put, remove
  • Iteration: keys, values, entries
  • Metadata: size, attributes

§Persistence

Storage is abstracted behind the NitriteStoreProvider trait, allowing:

  • Multiple store implementations
  • Custom storage backends
  • Testing with in-memory stores

§Events

The store layer supports event listeners for monitoring store state changes, useful for debugging and metrics collection.

Modules§

memory

Structs§

EntryIterator
A unified facade for bidirectional iteration over (Key, Value) entries.
KeyIterator
A unified facade for bidirectional iteration over keys.
NitriteMap
NitriteStore
High-level wrapper for accessing a Nitrite database store.
SingleMapEntryProvider
Built-in provider for iterating entries from a single NitriteMap.
SingleMapKeyProvider
Built-in provider for iterating keys from a single NitriteMap.
SingleMapValueProvider
Built-in provider for iterating values from a single NitriteMap.
StoreCatalog
Manages the catalog of collections, repositories, and keyed repositories in a Nitrite store.
StoreCatalogInner
StoreConfig
StoreEventInfo
Context information provided with each store event.
StoreEventListener
A listener for store-level events that wraps a callback function.
ValueIterator
A unified facade for bidirectional iteration over values.

Enums§

StoreEvents
Enumeration of lifecycle events that occur at the store level.

Traits§

EntryIteratorProvider
Trait for implementing entry iteration over (Key, Value) pairs.
KeyIteratorProvider
Trait for implementing key iteration.
Metadata
NitriteMapProvider
Low-level interface for key-value store implementations in Nitrite.
NitriteStoreProvider
Low-level interface for managing a Nitrite database store.
StoreConfigProvider
StoreEventCallback
A trait for closures that handle store events.
StoreModule
ValueIteratorProvider
Trait for implementing value iteration.

Type Aliases§

NitriteMapEntryIterator
Type alias for EntryIterator for backward compatibility.
NitriteMapKeyIterator
Type alias for KeyIterator for backward compatibility.
NitriteMapValueIterator
Type alias for ValueIterator for backward compatibility.