Skip to main content

ProjectManifest

Struct ProjectManifest 

Source
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: Uuid

Stable project identity (UUIDv7, generated at creation).

§name: String

Human-readable project name.

§version: String

Manifest schema version.

§created_at: String

RFC 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: String

IR schema version the project was created with.

§graphforge_version: String

GraphForge version the project was created with.

§capabilities: Option<Capabilities>

Capability flags; absent block defaults to the baseline.

Implementations§

Source§

impl ProjectManifest

Source

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.

Source

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.

Source

pub fn effective_ontology_mode(&self, dir: &Path) -> OntologyMode

Determine the effective OntologyMode, applying default-mode logic.

ConditionMode
ontology_mode set in manifestthat value
unset, configured ontology path exists in dirAdvisory
unset, no configured path, ontology.yaml present in dirAdvisory
unset, no ontology file presentExploratory

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.

Source

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

Source§

fn clone(&self) -> ProjectManifest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProjectManifest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProjectManifest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ProjectManifest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.