Skip to main content

Module storage

Module storage 

Source
Expand description

Re-export shim over memstead_base::storage (the MemWriter trait and MemWriterError) plus the git-tree adapter that stays in this crate.

The git-tree adapter (git_tree::GitTreeMemWriter) buffers mutations and applies them via gix::object::tree::Editor against a multi-root mem-repo-git repository, one branch per mem.

Modules§

git_tree
Git-tree-backed MemWriter — the second storage adapter. Buffers mutations in memory and applies them to a tree built via gix::object::tree::Editor, then advances the target ref via gix::Repository::commit_as.

Enums§

MemWriterError
Errors surfaced by MemWriter.

Constants§

FULL_GIT_BRANCH_OPS
The git-branch ops bundle installed on memstead_base::Engine by full boot. Wraps crate::ops::changes::changes_since and crate::ops::export::export_mem_from_branch so the engine can dispatch from a [MountStorage::GitBranch] mount without an extra trait or downcast.

Traits§

MemWriter
Write-side abstraction for mem content. Implementations are Send + Sync so the engine can hold a Box<dyn MemWriter> on each MemState and reach it from any caller.

Functions§

git_tree_mem_writer
Construct a Box<dyn MemWriter> for the git-object-backed path. gitdir points at the multi-root mem-repo-git repo; ref_name is the per-mem branch (fully-qualified, e.g. refs/heads/<mem>). The first commit creates the ref if it does not yet exist.
instantiate_full_backend
Full counterpart of memstead_base::instantiate_lean_backend: turns any memstead_base::Mount into a Box<dyn MemBackend>, including the git-branch variant that the lean flavour cannot construct.

Type Aliases§

CommitId
Opaque commit identifier returned by MemWriter::commit. Backend-defined string — the git-tree adapter formats it as a hex-encoded object id (40 chars for sha-1, 64 for sha-256), but the trait surface treats it as opaque. Callers carry it back into the engine’s HashMismatch.current envelope when the adapter detects a CAS conflict.