pub struct Tree<'a> { /* private fields */ }Expand description
Tree widget with expandable/collapsible branches.
Internally projects the tree into a flat ScrollList with indentation
and expand/collapse icons. The caller manages TreeState::expanded.
Implementations§
Source§impl<'a> Tree<'a>
impl<'a> Tree<'a>
pub fn new(nodes: Vec<TreeNode<'a>>) -> Self
pub fn indent(self, n: u16) -> Self
pub fn expand_icon(self, icon: &str) -> Self
pub fn collapse_icon(self, icon: &str) -> Self
pub fn leaf_icon(self, icon: &str) -> Self
pub fn highlight_style(self, style: Style) -> Self
pub fn highlight_symbol(self, symbol: &str) -> Self
pub fn borders(self, borders: Borders) -> Self
pub fn border_style(self, style: Style) -> Self
Sourcepub fn visible_count(&self, expanded: &HashSet<usize>) -> usize
pub fn visible_count(&self, expanded: &HashSet<usize>) -> usize
Count of visible items in the projected flat view.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Tree<'a>
impl<'a> RefUnwindSafe for Tree<'a>
impl<'a> Send for Tree<'a>
impl<'a> Sync for Tree<'a>
impl<'a> Unpin for Tree<'a>
impl<'a> UnsafeUnpin for Tree<'a>
impl<'a> UnwindSafe for Tree<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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