pub trait TreeNode {
// Required methods
fn label(&self) -> String;
fn children(&self) -> Vec<&dyn TreeNode>;
// Provided methods
fn status(&self) -> Option<NodeStatus> { ... }
fn metadata(&self) -> Vec<(String, String)> { ... }
}Expand description
A node in a tree. Implementors provide a label, optional status, optional metadata key/value pairs (rendered as a sub-line under the node label), and a list of children.
Required Methods§
Provided Methods§
fn status(&self) -> Option<NodeStatus>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".