pub struct TreeNode {
pub id: String,
pub label: String,
pub icon: Option<String>,
pub badge: Option<String>,
pub is_expanded: Signal<bool>,
pub is_selected: Signal<bool>,
pub children: Vec<TreeNode>,
}Expand description
An individual tree node.
Fields§
§id: String§label: String§icon: Option<String>§badge: Option<String>§is_expanded: Signal<bool>§is_selected: Signal<bool>§children: Vec<TreeNode>Implementations§
Source§impl TreeNode
impl TreeNode
pub fn new(id: impl Into<String>, label: impl Into<String>) -> Self
pub fn with_icon(self, icon: impl Into<String>) -> Self
pub fn with_badge(self, badge: impl Into<String>) -> Self
pub fn with_children(self, children: Vec<TreeNode>) -> Self
pub fn expanded(self, expanded: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TreeNode
impl !Send for TreeNode
impl !Sync for TreeNode
impl !UnwindSafe for TreeNode
impl Freeze for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin 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