Skip to main content

Module store

Module store 

Source
Expand description

The persistent-storage / filesystem seam — the ONE platform exception in the engine-native UI. Settings, dock layout, and model documents all use the same ModelStore::read / ModelStore::write API. Only its backend differs: desktop writes files; the browser mirrors an ASYNC, swappable [mirror_store::StoreBackend] — IndexedDB today, a remote server next — into memory and writes behind it, which is what keeps this whole API synchronous.

Structs§

BrowserEntry
One entry exposed to the common in-application filesystem browser.
BrowserPlace
A quick-access destination for the explorer’s left sidebar.
ImportedFile
A file selected outside the model store. Keeping bytes verbatim allows the same upload channel to carry binary STL as well as text CAD formats.

Enums§

PlaceKind
The category of a BrowserPlace, so the widget owns the icon styling.

Constants§

DOCK_LAYOUT_KEY
FEATURE_PALETTE_DISPLAY_KEY
MODEL_EXT
The document extension for a model recipe (<name>.BREP.json).
PINNED_KEY
Pinned explorer locations (a JSON array of navigable location strings), persisted through the ordinary read/write CRUD like the other reserved keys so the sidebar needs no dedicated trait surface.
RECOVERY_KEY
The AUTOSAVE blob: every open document that had unsaved changes the last time the shell’s autosave fired (see crate::recovery), so a crash, a closed tab or a reload can offer that work back. Written debounced, removed the moment nothing is dirty; never listed as a document.
SESSION_KEY
The open-document SESSION (which models are in tabs and which one is active — see crate::document), so a reload comes back to the desk you left.
SETTINGS_KEY
Reserved persistent-object names used internally for application state.

Traits§

ModelStore
The application’s single persistent-storage abstraction. Reserved application keys and named model documents are read and written through the same methods. All methods take &self; mutable backend state lives behind interior mutability.

Functions§

default_model_store
native_store_at
Construct the platform’s one persistent store for application state and models. A native file store rooted at dir — the seam an automation host uses to keep a session’s settings, autosave and recovery blob out of the user’s own config directory (spec §8).