Module storage
Available on crate feature
inspect only.Expand description
Streaming record storage. Logical identifiers never expose filesystem offsets.
An append publishes exactly one complete record. Dropping its future may leave backend work in flight, but it must not publish a partial record or damage a previous record. A backend must recover before accepting the next append. These are visibility guarantees, not promises of crash durability.
Structs§
- Collection
- An owned collection. Dropping its last capability or reader releases its storage. Read handles pin their underlying data independently of registry eviction.
- Collection
Reader - Read-only access to a collection, independent of append serialization. Both this handle and its readers retain the underlying storage.
- Collection
Writer - Append access to a collection. Keep this capability behind a lock when publication of application indexes must remain ordered with storage writes.
- Create
Collection - Create a collection with an application-assigned, instance-unique identifier.
- File
Store - Temporary filesystem storage, using Rama’s private-directory and cleanup helpers. Each collection has its own file and append lock. Idle committed collections keep no file descriptor. At most 64 appends perform I/O concurrently; reads pin independent descriptors. Cancelled appends settle and release their descriptor in a background recovery task, retaining their admission permit until then. Dropping an append outside a Tokio runtime can retain its unsettled handle without a permit until the next append or collection drop. Runtime shutdown can likewise interrupt recovery, so the concurrency bound is not a descriptor limit for collections retained across runtime shutdown.
- List
Records - Snapshot the identifiers of currently committed records.
- Memory
Store - Bounded memory storage. Open readers keep evicted data and its budget alive.
- Read
Record - Read a committed record or a range of its logical bytes. The end is exclusive; bounds beyond EOF clamp to the record length, and reversed ranges are rejected. Memory and file storage address ranges directly. Streaming layers such as encryption may need to consume the preceding bytes; see the layer’s contract.
- Record
Id - Logical record identifier within a collection. Never a byte offset.
- Storage
Limits - Storage admission limits, shared across collections. Defaults bound retained bytes to 64 MiB and each record to 8 MiB. Explicit zero fields mean unlimited. Counts logical record bytes, not backing-allocation capacity or index memory; protocol adapters should also bound their retained record count.
Enums§
- Append
Record - Append an owned stream. Success publishes the record; cancellation aborts it.
Functions§
- range_
reader - Select a range from a streaming reader without buffering its contents. A non-zero start consumes the prefix; seekable backends should address it directly. Bounds beyond EOF clamp to the content length; errors while reading the prefix still propagate, including errors from an authenticating storage layer.