Expand description
Dev-only generic debug browse over registered repositories. Compiled only
under the debug-capabilities feature; never ship in production.
Dev-only generic debug browse over the registry’s repositories.
StateDebug is the exposed handle: a typed
browse over every registered repository, addressed by string type name and
key, for automated tooling that needs to reach state the type-safe public API
does not expose generically. It reads through a parallel index of per-type
get/set/list shims, captured where each type is still known (client-managed
registration and the SDK-managed migration path) and dispatched by the
repository’s string name. Compiled only under the debug-capabilities
feature; never ship in production.
The registration logic is covered by the unit test below (run under
--all-features). CI never builds the feature into a wasm/mobile artifact,
so the generated binding surface is verified by hand:
crates/bitwarden-wasm-internal/build.sh -d, then the integration-tests
debug().state() browse.
Structs§
- Debug
Registry 🔒 - Index of per-type shims, keyed by
TypeId. Held byStateRegistryso the generic debug surface can address any registered repository by its string name and key. - Debug
Repo 🔒 - Monomorphized get/set/list shims for one repository type, so the registry can offer generic string-addressed access without naming the type. Captured at the point where the concrete type is still known.
- State
Debug - Typed debug handle over the SDK’s state registry: a generic browse across every registered repository, both client-managed and SDK-managed.
Traits§
- State
Registry Debug Ext - Yields the debug handle for a state registry.
Functions§
- get_
repo 🔒 - Read one item from the
Trepository by its string key, as JSON. - list_
repo 🔒 - List every item in the
Trepository (client- or SDK-managed) as JSON. - set_
repo 🔒 - Write one item to the
Trepository at its string key. Returnsfalseon a bad key, a value that does not deserialize toT, or a failed write.
Type Aliases§
- Debug
Future 🔒 - A future borrowing the registry, boxed so it can cross a fn pointer.
Sendso the handle’s async methods can run on a multi-threaded runtime (uniffi). - Debug
GetFn 🔒 - Shim: read one item by string key as JSON.
- Debug
List 🔒Fn - Shim: list a repository’s values as JSON.
- Debug
SetFn 🔒 - Shim: write one item by string key. Reports whether the write landed.