Expand description
SchemaSource — a storage backend’s schema-storage location.
Each open storage backend owns a place its authored schema packages
live: the folder backend’s <workspace>/.memstead/schemas/, the
git-branch backend’s __MEMSTEAD:schemas/ ref, an archive’s sealed
schemas/ directory inside the zip. A SchemaSource abstracts read
(and, for open backends, write) of that location behind one trait, so
the resolution layer (crate::engine::SchemaResolver) and the
authoring layer (memstead schema install) work against a uniform
surface regardless of where “local storage” physically is.
The folder source lives here in memstead-base. The git-branch
source implements this trait in memstead-git-branch (where the
gix read/write of the __MEMSTEAD ref lives); the archive source
is read-only (sealed).
Structs§
- Archive
Schema Source - The archive backend’s read-only schema source — schemas are
embedded in a sealed
.memarchive at.memstead/schema/. The archive is frozen at seal time, sowrite_schemaalways refuses. - Folder
Schema Source - The folder backend’s schema source: schemas live under
<workspace>/.memstead/schemas/<name>@<version>/.
Enums§
- Schema
Source Error - Failure reading or writing a schema source.
Traits§
- Schema
Source - A storage backend’s schema-storage location.