pub struct TreeNode { /* private fields */ }Expand description
One item of a TreeView, with the items under it.
Implementations§
Source§impl TreeNode
impl TreeNode
Sourcepub fn new(key: impl Into<String>, label: impl Into<String>) -> Self
pub fn new(key: impl Into<String>, label: impl Into<String>) -> Self
An item the app knows by key, showing label.
Sourcepub fn children(self, children: impl IntoIterator<Item = TreeNode>) -> Self
pub fn children(self, children: impl IntoIterator<Item = TreeNode>) -> Self
Appends items under this one.
Sourcepub fn lazy(self) -> Self
pub fn lazy(self) -> Self
It can open although its items are not here yet; TreeView::on_expand brings them.
Trait Implementations§
impl StructuralPartialEq for TreeNode
Auto Trait Implementations§
impl Freeze for TreeNode
impl RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin for TreeNode
impl UnwindSafe for TreeNode
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