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
impl ResolvedProjectGeneration
Sourcepub fn container_root(&self) -> &Path
pub fn container_root(&self) -> &Path
Canonical project container root used for this resolution.
Sourcepub const fn generation_uuid(&self) -> Uuid
pub const fn generation_uuid(&self) -> Uuid
UUID named by the validated CURRENT record.
Sourcepub fn generation_root(&self) -> &Path
pub fn generation_root(&self) -> &Path
Immutable selected generation root.
Sourcepub fn participants_root(&self) -> PathBuf
pub fn participants_root(&self) -> PathBuf
Root beneath which every generation participant is resolved.
Sourcepub const fn manifest_sha256(&self) -> [u8; 32]
pub const fn manifest_sha256(&self) -> [u8; 32]
SHA-256 over the exact selected manifest.json bytes.
Sourcepub fn capabilities(&self) -> Vec<ProjectCapabilityDescriptor>
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.
Sourcepub fn capability(
&self,
capability_id: &str,
) -> Result<Option<ProjectCapabilityDescriptor>, GfError>
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.
Sourcepub fn require_capability(
&self,
capability_id: &str,
supported_version: u32,
) -> Result<ProjectCapabilityDescriptor, GfError>
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.
Sourcepub fn parent_generation_uuid(&self) -> Option<Uuid>
pub fn parent_generation_uuid(&self) -> Option<Uuid>
UUID of the selected generation’s verified parent, when present.
Sourcepub fn participant_path(
&self,
capability_id: &str,
record_family_id: &str,
) -> Result<PathBuf, GfError>
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.
Sourcepub fn participant_snapshots(
&self,
) -> Result<Vec<ProjectParticipantSnapshot>, GfError>
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.
Sourcepub fn participant_descriptors(
&self,
) -> Result<Vec<ProjectParticipantDescriptor>, GfError>
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.
Sourcepub fn participant_snapshot(
&self,
capability_id: &str,
record_family_id: &str,
) -> Result<Option<ProjectParticipantSnapshot>, GfError>
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.
Sourcepub fn validate_complete_participant_inventory(&self) -> Result<(), GfError>
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
impl Clone for ResolvedProjectGeneration
Auto Trait Implementations§
impl Freeze for ResolvedProjectGeneration
impl RefUnwindSafe for ResolvedProjectGeneration
impl Send for ResolvedProjectGeneration
impl Sync for ResolvedProjectGeneration
impl Unpin for ResolvedProjectGeneration
impl UnsafeUnpin for ResolvedProjectGeneration
impl UnwindSafe for ResolvedProjectGeneration
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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