pub struct TreeNodeProps {
pub depth: usize,
pub last: bool,
pub expandable: bool,
pub open: bool,
pub selected: bool,
pub stop: bool,
pub title: Option<String>,
pub on_press: Option<EventHandler<()>>,
pub row: Element,
pub children: Element,
}Expand description
Properties for the TreeNode component.
Fields§
§depth: usizeHow many levels below the top it sits.
last: boolThe last of its siblings: its line stops at its own branch.
expandable: boolWhether it has parts to open; its row then leads with the chevron.
open: boolWhether its parts are shown.
selected: bool§stop: boolThe row the tree’s one tab stop falls on when no row is selected: its first.
title: Option<String>The row’s tooltip.
on_press: Option<EventHandler<()>>What pressing the row does; a row with none is not pressable.
row: ElementThe row’s content after its chevron.
children: ElementImplementations§
Source§impl TreeNodeProps
impl TreeNodeProps
Sourcepub fn builder() -> TreeNodePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TreeNodePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building TreeNodeProps.
On the builder, call .depth(...), .last(...), .expandable(...)(optional), .open(...)(optional), .selected(...)(optional), .stop(...)(optional), .title(...)(optional), .on_press(...)(optional), .row(...), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TreeNodeProps.
Trait Implementations§
Source§impl Clone for TreeNodeProps
impl Clone for TreeNodeProps
Source§impl PartialEq for TreeNodeProps
impl PartialEq for TreeNodeProps
Source§impl Properties for TreeNodePropswhere
Self: Clone,
impl Properties for TreeNodePropswhere
Self: Clone,
Source§type Builder = TreeNodePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
type Builder = TreeNodePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Auto Trait Implementations§
impl !Freeze for TreeNodeProps
impl !RefUnwindSafe for TreeNodeProps
impl !Send for TreeNodeProps
impl !Sync for TreeNodeProps
impl Unpin for TreeNodeProps
impl UnsafeUnpin for TreeNodeProps
impl !UnwindSafe for TreeNodeProps
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.