feat: add TreeItem::children()
returns all the current children
This commit is contained in:
@@ -180,6 +180,10 @@ impl<'a> TreeItem<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn children(&self) -> &[TreeItem] {
|
||||||
|
&self.children
|
||||||
|
}
|
||||||
|
|
||||||
pub fn child(&self, index: usize) -> Option<&Self> {
|
pub fn child(&self, index: usize) -> Option<&Self> {
|
||||||
self.children.get(index)
|
self.children.get(index)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user