feat: add TreeItem::children()

returns all the current children
This commit is contained in:
EdJoPaTo
2022-09-01 16:29:56 +02:00
parent 2adcbccab0
commit c8c5a37b28
+4
View File
@@ -180,6 +180,10 @@ impl<'a> TreeItem<'a> {
}
}
pub fn children(&self) -> &[TreeItem] {
&self.children
}
pub fn child(&self, index: usize) -> Option<&Self> {
self.children.get(index)
}