Skip to main content

ResolvedProjectGeneration

Struct ResolvedProjectGeneration 

Source
pub struct ResolvedProjectGeneration { /* private fields */ }
Expand description

A validated, lifetime-pinned view of one committed project generation.

The retained lease handle gives publication/cleanup work a stable file identity to lock. The lock protocol itself lands with atomic publication and recovery; resolution never follows CURRENT again after construction.

Implementations§

Source§

impl ResolvedProjectGeneration

Source

pub fn container_root(&self) -> &Path

Canonical project container root used for this resolution.

Source

pub const fn generation_uuid(&self) -> Uuid

UUID named by the validated CURRENT record.

Source

pub fn generation_root(&self) -> &Path

Immutable selected generation root.

Source

pub fn participants_root(&self) -> PathBuf

Root beneath which every generation participant is resolved.

Source

pub const fn manifest_sha256(&self) -> [u8; 32]

SHA-256 over the exact selected manifest.json bytes.

Source

pub fn capabilities(&self) -> Vec<ProjectCapabilityDescriptor>

Return the manifest-declared capabilities in canonical ID order.

This reads no participant files and does not infer capabilities from directory contents.

Source

pub fn capability( &self, capability_id: &str, ) -> Result<Option<ProjectCapabilityDescriptor>, GfError>

Look up one manifest-declared capability without opening participants.

§Errors

Returns GF_PROJECT_CORRUPT for an invalid machine identifier.

Source

pub fn require_capability( &self, capability_id: &str, supported_version: u32, ) -> Result<ProjectCapabilityDescriptor, GfError>

Require one exact capability version before a domain opens its files.

This consults only the committed manifest. Domain APIs call it before resolving or decoding any capability participant.

§Errors

Returns GF_CAPABILITY_DISABLED when absent and GF_UNSUPPORTED_CAPABILITY_VERSION for any other declared version.

Source

pub fn parent_generation_uuid(&self) -> Option<Uuid>

UUID of the selected generation’s verified parent, when present.

Source

pub fn participant_path( &self, capability_id: &str, record_family_id: &str, ) -> Result<PathBuf, GfError>

Resolve a requested participant path without accepting caller path components or parsing any participant bytes.

§Errors

Returns GF_PROJECT_CORRUPT if the manifest path is not a normalized, contained, non-link path or if the requested descriptor is absent.

Source

pub fn participant_snapshots( &self, ) -> Result<Vec<ProjectParticipantSnapshot>, GfError>

Read and verify every participant in canonical manifest order.

This is an explicit write-orchestration operation used to carry unchanged participants into a complete replacement generation. Normal graph opens and capability inspection never call it.

§Errors

Returns GF_PROJECT_CORRUPT when a participant is missing, linked, oversized relative to its manifest, or fails its exact content digest.

Source

pub fn participant_descriptors( &self, ) -> Result<Vec<ProjectParticipantDescriptor>, GfError>

Return the canonical manifest inventory without opening participant bytes.

§Errors

Returns GF_PROJECT_CORRUPT if a committed digest is malformed.

Source

pub fn participant_snapshot( &self, capability_id: &str, record_family_id: &str, ) -> Result<Option<ProjectParticipantSnapshot>, GfError>

Read and verify one requested participant without opening any sibling capability or record family.

§Errors

Returns GF_PROJECT_CORRUPT when the requested participant exists but is missing, linked, oversized, or fails its exact content digest.

Source

pub fn validate_complete_participant_inventory(&self) -> Result<(), GfError>

Prove that the physical participant tree exactly matches the manifest.

Capability transitions call this before copying a complete generation, so untracked graph files can never be silently dropped. This bounded scan is an explicit write precondition; normal opens and capability reads remain manifest-only.

§Errors

Returns GF_TRANSACTION_FAILED for an untracked, missing, linked, non-UTF-8, or excessively large inventory.

Trait Implementations§

Source§

impl Clone for ResolvedProjectGeneration

Source§

fn clone(&self) -> Self

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 ResolvedProjectGeneration

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V