pub struct TreeNode<'a> {
pub concept_name: &'a str,
pub labels: &'a [Label],
pub depth: usize,
pub fact_indices: Vec<usize>,
pub children: Vec<TreeNode<'a>>,
}Expand description
A single node in the presentation hierarchy.
Fields§
§concept_name: &'a strConcept name (e.g. bs.ass).
labels: &'a [Label]All labels for this concept. The caller selects the desired language
and role (e.g. terseLabel, label).
depth: usizeDepth in the tree; root nodes have depth 0.
fact_indices: Vec<usize>Indices into the InstanceDocument::facts() slice for facts whose concept
maps to this concept name.
Storing indices rather than references means the view’s lifetime is tied only to the taxonomy, leaving the instance free to be mutably borrowed while the view is alive.
children: Vec<TreeNode<'a>>Child nodes, ordered by the presentation arc order attribute.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TreeNode<'a>
impl<'a> RefUnwindSafe for TreeNode<'a>
impl<'a> Send for TreeNode<'a>
impl<'a> Sync for TreeNode<'a>
impl<'a> Unpin for TreeNode<'a>
impl<'a> UnsafeUnpin for TreeNode<'a>
impl<'a> UnwindSafe for TreeNode<'a>
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