pub struct ManifestRepository {
root: PathBuf,
}Expand description
Canonical filesystem-backed source for spec, shared, and item manifests.
Fields§
§root: PathBufImplementations§
Source§impl ManifestRepository
impl ManifestRepository
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
Creates a repository rooted at the directory containing specs and items.toml.
Sourcepub fn toml_paths(&self) -> Result<Vec<PathBuf>, ManifestLoadError>
pub fn toml_paths(&self) -> Result<Vec<PathBuf>, ManifestLoadError>
Discovers every TOML document in the repository, sorted by path.
§Errors
Returns an error when the repository tree cannot be read.
Sourcepub fn spec_paths(&self) -> Result<Vec<PathBuf>, ManifestLoadError>
pub fn spec_paths(&self) -> Result<Vec<PathBuf>, ManifestLoadError>
Discovers every spec entry recursively, sorted by path.
§Errors
Returns an error when the repository tree cannot be read or contains no spec entries.
Sourcepub fn spec_slug(&self, path: &Path) -> Result<String, ManifestLoadError>
pub fn spec_slug(&self, path: &Path) -> Result<String, ManifestLoadError>
Derives the public <specialization>_<class> slug from an entry path.
§Errors
Returns an error when path is outside the repository or is not a spec entry path.
Discovers every class-shared manifest recursively, sorted by path.
§Errors
Returns an error when the repository tree cannot be read or a path cannot be normalized.
Sourcepub fn load_spec(&self, path: &Path) -> Result<Manifest, ManifestLoadError>
pub fn load_spec(&self, path: &Path) -> Result<Manifest, ManifestLoadError>
Loads a spec entry, its ordered private parts, and its class-shared includes.
§Errors
Returns an error when any manifest cannot be read, composed, validated, or deserialized.
Sourcepub fn load_items(&self) -> Result<ItemsManifest, ManifestLoadError>
pub fn load_items(&self) -> Result<ItemsManifest, ManifestLoadError>
Loads the repository’s item manifest.
§Errors
Returns an error when the item manifest cannot be read, validated, or deserialized.
Loads effect and reported-spell bindings from a discovered shared manifest.
§Errors
Returns an error when the shared manifest cannot be read or its sections are invalid.
Trait Implementations§
Source§impl Clone for ManifestRepository
impl Clone for ManifestRepository
Source§fn clone(&self) -> ManifestRepository
fn clone(&self) -> ManifestRepository
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more