pub struct PackGraph { /* private fields */ }Expand description
Fully-walked pack graph. Immutable post-construction.
Nodes are owned; callers borrow via PackGraph::nodes or the dedicated
lookup helpers.
Implementations§
Source§impl PackGraph
impl PackGraph
Sourcepub fn validate(&self) -> Result<(), Vec<PackValidationError>>
pub fn validate(&self) -> Result<(), Vec<PackValidationError>>
Run the default graph-validator set over self.
Mirrors PackManifest::validate_plan at the graph surface. Kept
here (rather than in tree::graph) so the tree module does not
depend on pack::validate; the dependency direction stays
validate -> tree only.
§Errors
Returns the aggregated error list when any graph validator flags a problem.
Source§impl PackGraph
impl PackGraph
Sourcepub fn children_of(&self, id: usize) -> impl Iterator<Item = &PackNode>
pub fn children_of(&self, id: usize) -> impl Iterator<Item = &PackNode>
Iterate the Child-kind neighbours of id (in insertion order).
Sourcepub fn depends_on_of(&self, id: usize) -> impl Iterator<Item = &PackNode>
pub fn depends_on_of(&self, id: usize) -> impl Iterator<Item = &PackNode>
Iterate the DependsOn-kind neighbours of id.
Sourcepub fn find_by_name(&self, name: &str) -> Option<&PackNode>
pub fn find_by_name(&self, name: &str) -> Option<&PackNode>
Find a node by its manifest name. Returns the first match in insertion order; names are not guaranteed unique across a graph, though per-pack validators may reject duplicates in future slices.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PackGraph
impl RefUnwindSafe for PackGraph
impl Send for PackGraph
impl Sync for PackGraph
impl Unpin for PackGraph
impl UnsafeUnpin for PackGraph
impl UnwindSafe for PackGraph
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> 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