pub struct StackNode {
pub name: String,
pub children: Vec<StackNode>,
}Expand description
One node in a stack tree. name matches ThreadRecord::thread;
children are the immediate descendants in the same stack, sorted
by name for stable rendering.
Fields§
§name: String§children: Vec<StackNode>Implementations§
Source§impl StackNode
impl StackNode
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Total number of threads in this subtree, including the node itself.
Sourcepub fn depth(&self) -> usize
pub fn depth(&self) -> usize
Depth of the deepest leaf below this node. A root with no children has depth 0.
Sourcepub fn iter_names(&self) -> impl Iterator<Item = &str>
pub fn iter_names(&self) -> impl Iterator<Item = &str>
Yield every thread name in the subtree, root first, depth-first.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StackNode
impl<'de> Deserialize<'de> for StackNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StackNode
impl StructuralPartialEq for StackNode
Auto Trait Implementations§
impl Freeze for StackNode
impl RefUnwindSafe for StackNode
impl Send for StackNode
impl Sync for StackNode
impl Unpin for StackNode
impl UnsafeUnpin for StackNode
impl UnwindSafe for StackNode
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