pub struct FileTree<'a, Identifier> { /* private fields */ }
Expand description
A wrapper around tui_tree_widget::Tree
that adds click-to-select functionality
Implementations§
Source§impl<'a, Identifier> FileTree<'a, Identifier>
impl<'a, Identifier> FileTree<'a, Identifier>
pub fn new(items: &'a [TreeItem<'a, Identifier>]) -> Result<Self>
Sourcepub fn block(self, block: Block<'a>) -> Self
pub fn block(self, block: Block<'a>) -> Self
Delegate all method calls to the inner Tree widget
pub fn style(self, style: Style) -> Self
pub fn highlight_style(self, style: Style) -> Self
pub fn highlight_symbol(self, symbol: &'a str) -> Self
pub fn experimental_scrollbar(self, scrollbar: Option<Scrollbar<'a>>) -> Self
pub fn handle_mouse_event( &self, state: &mut TreeState<Identifier>, mouse_event: MouseEvent, area: Rect, ) -> Result<bool>
Trait Implementations§
Source§impl<Identifier> StatefulWidget for FileTree<'_, Identifier>
impl<Identifier> StatefulWidget for FileTree<'_, Identifier>
Auto Trait Implementations§
impl<'a, Identifier> Freeze for FileTree<'a, Identifier>
impl<'a, Identifier> RefUnwindSafe for FileTree<'a, Identifier>where
Identifier: RefUnwindSafe,
impl<'a, Identifier> Send for FileTree<'a, Identifier>where
Identifier: Sync,
impl<'a, Identifier> Sync for FileTree<'a, Identifier>where
Identifier: Sync,
impl<'a, Identifier> Unpin for FileTree<'a, Identifier>
impl<'a, Identifier> UnwindSafe for FileTree<'a, Identifier>where
Identifier: RefUnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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