pub struct TreeViewRenderProps<'a, Id, T>{
pub nodes: &'a [TreeNode<Id, T>],
pub selected_id: Option<&'a Id>,
pub expanded_ids: &'a HashSet<Id>,
pub is_focused: bool,
pub style: TreeViewStyle,
pub behavior: TreeViewBehavior,
pub measure_node: Option<&'a dyn Fn(&TreeNode<Id, T>) -> usize>,
pub column_padding: usize,
pub render_node: &'a dyn Fn(TreeNodeRender<'_, Id, T>) -> Line<'static>,
}Expand description
Render-only props for TreeView
Fields§
§nodes: &'a [TreeNode<Id, T>]Nodes to render
selected_id: Option<&'a Id>Currently selected node id
expanded_ids: &'a HashSet<Id>Expanded node ids
is_focused: boolWhether this component has focus
style: TreeViewStyleUnified styling
behavior: TreeViewBehaviorBehavior configuration
measure_node: Option<&'a dyn Fn(&TreeNode<Id, T>) -> usize>Optional width override for column sizing
column_padding: usizePadding to add to the widest tree column
render_node: &'a dyn Fn(TreeNodeRender<'_, Id, T>) -> Line<'static>Render a node into a Line
Auto Trait Implementations§
impl<'a, Id, T> Freeze for TreeViewRenderProps<'a, Id, T>
impl<'a, Id, T> !RefUnwindSafe for TreeViewRenderProps<'a, Id, T>
impl<'a, Id, T> !Send for TreeViewRenderProps<'a, Id, T>
impl<'a, Id, T> !Sync for TreeViewRenderProps<'a, Id, T>
impl<'a, Id, T> Unpin for TreeViewRenderProps<'a, Id, T>
impl<'a, Id, T> UnsafeUnpin for TreeViewRenderProps<'a, Id, T>
impl<'a, Id, T> !UnwindSafe for TreeViewRenderProps<'a, Id, T>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more