#[non_exhaustive]pub struct PackNode {
pub id: usize,
pub name: String,
pub path: PathBuf,
pub source_url: Option<String>,
pub manifest: PackManifest,
pub parent: Option<usize>,
pub commit_sha: Option<String>,
pub synthetic: bool,
}Expand description
A pack in the walked graph.
Every field is pub by design: the graph is a read-only value type, and
exposing the full record here is simpler than hand-curating accessors for
each field.
Marked #[non_exhaustive] so audit fields (resolved ref SHA, hydration
timestamps) can land without breaking library consumers who destructure
the struct.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: usizeStable index inside the graph (equal to the Vec position).
name: Stringname copied from the pack manifest for O(1) lookup.
path: PathBufOn-disk location of the pack’s working tree.
source_url: Option<String>Source URL the walker used to hydrate this node, or None for the
root / nodes that were loaded directly from an on-disk path.
manifest: PackManifestFull parsed manifest.
parent: Option<usize>Parent id; None for the root.
commit_sha: Option<String>Resolved commit SHA of the pack’s working tree, when the walker
could obtain one. None for the root (local path, no clone step)
or when head_sha probing fails. Mixed into
crate::lockfile::compute_actions_hash so ref drift invalidates
the skip-on-hash short-circuit (M4-D spec §M4 req 4a).
synthetic: booltrue when the walker synthesised the manifest in-memory because
the on-disk child had no .grex/pack.yaml but did carry a .git/
(v1.1.1 plain-git children, see
openspec/changes/feat-v1.1.1-plain-git-children/). Threaded
through to the lockfile (LockEntry::synthetic) and downstream
surfaces (doctor, ls). Default false for every declared pack.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PackNode
impl RefUnwindSafe for PackNode
impl Send for PackNode
impl Sync for PackNode
impl Unpin for PackNode
impl UnsafeUnpin for PackNode
impl UnwindSafe for PackNode
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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