Expand description
MemBackend — uniform trait surface over folder, git-branch,
and archive storage.
Bytes-level: list / read / write / delete / move / commit / append-provenance / read-provenance. The one-engine architecture that the workspace-store rebuild produces sits above this trait; entity-mutation logic, validation, the in-memory store, and the search index live in one place regardless of which backend serves a given mount.
Today’s crate::storage::MemWriter is a write-side subset of
this trait. As each backend gains its MemBackend impl the
MemWriter references in that backend’s call sites collapse
into the unified surface; MemWriter stays in
crate::storage::filesystem for now as the on-disk write helpers
it embodies are reused by the folder-backend MemBackend impl.
§Per-backend write semantics
- Folder — writes go to the workspace’s mem subdirectory; commit is a no-op CAS-token mint (no history).
- Git-branch — writes buffer in memory, commit produces a real git commit on the per-mem branch with the trailer block.
- Archive — writes return
BackendError::Sealedwithout touching disk. Read methods return live content from inside the sealed.memzip.
Enums§
- Backend
Error - Errors surfaced by
MemBackend.
Traits§
- MemBackend
- Mem-backend trait. Implementations live next to the backend’s
other code (folder under
crate::storage::filesystem; git-branch in the renamed-from-memstead-git-branchcrate; archive under the archive read-paths incrate::entityonce that wiring lands).