pub struct CheckTree<'a, Identifier> { /* private fields */ }Expand description
A CheckTree which can be rendered.
The generic argument Identifier is used to keep the state like the currently selected or opened CheckTreeItems in the CheckTreeState.
For more information see CheckTreeItem.
This differs from the tui_tree_widget crate’s Tree in that it allows for checkboxes to be rendered next to each leaf item.
This is useful for creating a tree of items that can be selected.
Implementations§
Source§impl<'a, Identifier> CheckTree<'a, Identifier>
impl<'a, Identifier> CheckTree<'a, Identifier>
Sourcepub fn new(items: &'a [CheckTreeItem<'a, Identifier>]) -> Result<Self, Error>
pub fn new(items: &'a [CheckTreeItem<'a, Identifier>]) -> Result<Self, Error>
pub fn block(self, block: Block<'a>) -> Self
Sourcepub const fn experimental_scrollbar(
self,
scrollbar: Option<Scrollbar<'a>>,
) -> Self
pub const fn experimental_scrollbar( self, scrollbar: Option<Scrollbar<'a>>, ) -> Self
Show the scrollbar when rendering this widget.
Experimental: Can change on any release without any additional notice. Its there to test and experiment with whats possible with scrolling widgets. Also see https://github.com/ratatui-org/ratatui/issues/174
pub const fn style(self, style: Style) -> Self
pub const fn highlight_style(self, style: Style) -> Self
pub const fn highlight_symbol(self, highlight_symbol: &'a str) -> Self
pub const fn node_closed_symbol(self, symbol: &'a str) -> Self
pub const fn node_open_symbol(self, symbol: &'a str) -> Self
pub const fn node_checked_symbol(self, symbol: &'a str) -> Self
pub const fn node_unchecked_symbol(self, symbol: &'a str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a, Identifier> Freeze for CheckTree<'a, Identifier>
impl<'a, Identifier> RefUnwindSafe for CheckTree<'a, Identifier>where
Identifier: RefUnwindSafe,
impl<'a, Identifier> Send for CheckTree<'a, Identifier>
impl<'a, Identifier> Sync for CheckTree<'a, Identifier>where
Identifier: Sync,
impl<'a, Identifier> Unpin for CheckTree<'a, Identifier>where
Identifier: Unpin,
impl<'a, Identifier> UnwindSafe for CheckTree<'a, Identifier>where
Identifier: UnwindSafe + 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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