Skip to main content

Module schema_source

Module schema_source 

Source
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§

ArchiveSchemaSource
The archive backend’s read-only schema source — schemas are embedded in a sealed .mem archive at .memstead/schema/. The archive is frozen at seal time, so write_schema always refuses.
FolderSchemaSource
The folder backend’s schema source: schemas live under <workspace>/.memstead/schemas/<name>@<version>/.

Enums§

SchemaSourceError
Failure reading or writing a schema source.

Traits§

SchemaSource
A storage backend’s schema-storage location.