pub struct OwnedTreeNode {
pub label: String,
pub status: Option<NodeStatus>,
pub metadata: Vec<(String, String)>,
pub children: Vec<OwnedTreeNode>,
}Expand description
A self-contained tree node that owns its children. Implements TreeNode
so it can be handed directly to tree::render.
Constructed by SnapshotAccumulator::to_tree; also usable standalone.
Fields§
§label: String§status: Option<NodeStatus>§metadata: Vec<(String, String)>§children: Vec<OwnedTreeNode>Trait Implementations§
Source§impl TreeNode for OwnedTreeNode
impl TreeNode for OwnedTreeNode
fn label(&self) -> String
fn status(&self) -> Option<NodeStatus>
Source§fn metadata(&self) -> Vec<(String, String)>
fn metadata(&self) -> Vec<(String, String)>
Extra
(key, value) pairs rendered inline after the label
(e.g. "r0", "12ms" → [r0=12ms]). Useful for round IDs,
durations, sizes — anything that helps reading the tree.fn children(&self) -> Vec<&dyn TreeNode>
Auto Trait Implementations§
impl Freeze for OwnedTreeNode
impl RefUnwindSafe for OwnedTreeNode
impl Send for OwnedTreeNode
impl Sync for OwnedTreeNode
impl Unpin for OwnedTreeNode
impl UnsafeUnpin for OwnedTreeNode
impl UnwindSafe for OwnedTreeNode
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