pub struct ProjectManifest {
pub project_uuid: Uuid,
pub name: String,
pub version: String,
pub created_at: String,
pub ontology: Option<String>,
pub ontology_mode: Option<OntologyMode>,
pub ir_version: String,
pub graphforge_version: String,
pub capabilities: Option<Capabilities>,
}Expand description
Deserialised graphforge.yaml.
Constructed via load (existing project) or
create_default (new project).
Fields§
§project_uuid: UuidStable project identity (UUIDv7, generated at creation).
name: StringHuman-readable project name.
version: StringManifest schema version.
created_at: StringRFC 3339 creation timestamp.
ontology: Option<String>Relative path to the ontology file, or None if the project has none.
ontology_mode: Option<OntologyMode>Explicit ontology mode override, or None to apply default-mode logic.
ir_version: StringIR schema version the project was created with.
graphforge_version: StringGraphForge version the project was created with.
capabilities: Option<Capabilities>Capability flags; absent block defaults to the baseline.
Implementations§
Source§impl ProjectManifest
impl ProjectManifest
Sourcepub fn load(dir: &Path) -> Result<Self, GfError>
pub fn load(dir: &Path) -> Result<Self, GfError>
Read and parse graphforge.yaml from dir.
§Errors
Returns GfError::Storage if the file cannot be read and
GfError::Validation if its contents are not valid manifest YAML.
Sourcepub fn create_default(
dir: &Path,
name: &str,
created_at: impl Into<String>,
) -> Result<Self, GfError>
pub fn create_default( dir: &Path, name: &str, created_at: impl Into<String>, ) -> Result<Self, GfError>
Create a new project: generate a UUIDv7 identity and write
graphforge.yaml into dir.
created_at is supplied by the caller (RFC 3339) so this stays free of
ambient clock access; pass None to omit a timestamp.
§Errors
Returns GfError::Storage if the manifest cannot be written, or
GfError::Validation if it cannot be serialised.
Sourcepub fn effective_ontology_mode(&self, dir: &Path) -> OntologyMode
pub fn effective_ontology_mode(&self, dir: &Path) -> OntologyMode
Determine the effective OntologyMode, applying default-mode logic.
| Condition | Mode |
|---|---|
ontology_mode set in manifest | that value |
unset, configured ontology path exists in dir | Advisory |
unset, no configured path, ontology.yaml present in dir | Advisory |
| unset, no ontology file present | Exploratory |
The configured ontology path is tested for existence (resolved
relative to dir) rather than merely being present in the manifest —
a manifest pointing at a missing file falls back to Exploratory.
Sourcepub fn enabled_capabilities(&self) -> Capabilities
pub fn enabled_capabilities(&self) -> Capabilities
Return the project’s capabilities with baseline defaults applied.
topology and properties are always enabled regardless of what the
manifest declares.
Trait Implementations§
Source§impl Clone for ProjectManifest
impl Clone for ProjectManifest
Source§fn clone(&self) -> ProjectManifest
fn clone(&self) -> ProjectManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more