pub struct TreeNode {
pub name: String,
pub version: String,
pub edge_kind: Option<&'static str>,
pub source: SourceProvenance,
pub repeated: bool,
pub children: Vec<TreeNode>,
}Expand description
One node in a dependency tree rooted at a selected primary
package. Children are deduplicated per traversal: the first
occurrence of a (name, version) carries the full subtree;
subsequent occurrences are marked with TreeNode::repeated.
Fields§
§name: StringWorkspacePackage name.
version: StringResolved package version.
edge_kind: Option<&'static str>How the parent reached this node. None for the tree’s
roots.
source: SourceProvenanceProvenance of this package’s source bytes.
repeated: booltrue when this node was already expanded earlier in
the traversal — children were pruned to keep the tree
finite.
children: Vec<TreeNode>Children, sorted by (dependency_kind, name, version).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeNode
impl RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin for TreeNode
impl UnwindSafe for TreeNode
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
Mutably borrows from an owned value. Read more