IndexedDB implementation of KeyValueStore for browser WASM
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/kv-store-indexeddb |
| Edition | 2021 |
| Targets | infrastructure_kv_store_indexeddb |
| Public items | 0 across 0 modules |
| Tests | 0 |
What it is for
IndexedDB implementation of KeyValueStore for browser WASM.
This crate provides persistent key-value storage in the browser using IndexedDB. Data survives page reloads and browser restarts.
# Usage
use infrastructure_kv_store_indexeddb::IndexedDbStore;
use infrastructure_kv_store::KeyValueStore;
async fn example() {
// Open (or create) a database named "my-app"
let store = IndexedDbStore::open("my-app").await.unwrap();
// Use standard KeyValueStore interface
store.set("user:123", b"alice").await.unwrap();
let value = store.get("user:123").await.unwrap();
}
# Architecture
- Uses a single
IndexedDBdatabase with one object store ("kv") - Keys are strings (stored as-is)
- Values are stored as
Uint8Array(byte arrays) - All operations are async and non-blocking
Capabilities
No public items.
How to use it
From this crate's own rustdoc:
use infrastructure_kv_store_indexeddb::IndexedDbStore;
use infrastructure_kv_store::KeyValueStore;
async fn example() {
// Open (or create) a database named "my-app"
let store = IndexedDbStore::open("my-app").await.unwrap();
// Use standard KeyValueStore interface
store.set("user:123", b"alice").await.unwrap();
let value = store.get("user:123").await.unwrap();
}
Module structure
No public modules: the crate root is its whole surface.
Public surface
No public items.
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
IndexedDbStore | store::IndexedDbStore |
Boundary
Depends on no other workspace tier.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/kv-store-indexeddb |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `infrastructure-kv-store` | infrastructure | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
async-trait | ^0.1 | — | no | always |
futures-channel | ^0.3 | — | no | always |
js-sys | ^0.3 | — | no | always |
serde | ^1 | derive | no | always |
wasm-bindgen | ^0.2 | — | no | always |
wasm-bindgen-futures | ^0.4 | — | no | always |
web-sys | ^0.3 | Window, Document, Storage, console, HtmlInputElement, FormData, … (27 total) | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
wasm-bindgen-test | ^0.3 | — | no | always |
Build. None.
Depended on by. 2 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_kv_store_indexeddb["application-kv-store-indexeddb"] -->|uses| SELF n_platform_wasm_ui["platform-wasm-ui"] -->|uses| SELF SELF["infrastructure-kv-store-indexeddb"] SELF -->|runtime| n_infrastructure_kv_store["infrastructure-kv-store"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_kv_store_indexeddb | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
2 workspace crates depend on this one: application-kv-store-indexeddb, platform-wasm-ui.
Verification
| Kind | Count |
|---|---|
| Unit tests | 0 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 1 |
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 0 |
Public modules with a //! block | 0 | 0 |
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 274 |
| Code lines | 171 |
| Public API items | 0 |
| Public modules | 0 |
| Tests | 0 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 8 |
| Workspace reverse dependencies | 2 |
pie showData
title Rust source composition
"Code" : 171
"Blank or comment" : 103
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.