Skip to main content

Module storage

Module storage 

Source
Expand description

Reusable storage layer: traits, a doublets-backed implementation and advisory locking helpers.

See LinksStorage for the abstraction the transactions layer is written against, and DoubletsStorage for the file-mapped doublets implementation.

Re-exports§

pub use lock::lock_file_path;
pub use lock::FileLock;
pub use lock::LockMode;

Modules§

decorators
The upstream doublets decorator layer, re-exported so downstream crates can stack decorators onto a DoubletsStorage through DoubletsStorage::map_store without depending on doublets directly (and without risking a version mismatch). Zero-cost decorators that add policy to any Doublets store.
lock
Advisory file locking for multi-process access to a links database.

Structs§

DoubletsStorage
A LinksStorage over any doublets store.
PersistentFileMapped
A FileMapped region that does not wipe pre-existing file contents when doublets grows it.
StorageRevision
Cheap fingerprint of a database file, used to answer “has anyone else written since I last looked?” without reparsing.

Traits§

LinksStorage
A store of links addressed by T, expressed in terms of owned GenericLink<T> values so that both in-memory maps and memory-mapped doublets stores can implement it.
LinksStorageRef
Extension implemented by stores that keep links resident in memory and can therefore lend out references instead of copies.

Type Aliases§

FileMappedUnitStore
The file-mapped doublets store used by DoubletsStorage::open.
ResolvedFileMappedUnitStore
The file-mapped store wrapped in the upstream decorator stack that C# applies by default, produced by DoubletsStorage::with_automatic_uniqueness_and_usages_resolution.