Struct tui_tree_widget::TreeState
source · [−]pub struct TreeState { /* private fields */ }Implementations
sourceimpl TreeState
impl TreeState
pub fn selected(&self) -> Vec<usize>
pub fn select<I>(&mut self, identifier: I) where
I: Into<Vec<usize>>,
sourcepub fn open(&mut self, identifier: TreeIdentifierVec) -> bool
pub fn open(&mut self, identifier: TreeIdentifierVec) -> bool
Open a tree node.
Returns true if the node was closed and has been opened.
Returns false if the node was already open.
sourcepub fn close(&mut self, identifier: TreeIdentifier<'_>) -> bool
pub fn close(&mut self, identifier: TreeIdentifier<'_>) -> bool
Close a tree node.
Returns true if the node was open and has been closed.
Returns false if the node was already closed.
sourcepub fn toggle(&mut self)
pub fn toggle(&mut self)
Toggles a tree node.
If the node is in opened then it calls close(). Otherwise it calls open().
pub fn close_all(&mut self)
pub fn get_all_opened(&self) -> Vec<TreeIdentifierVec>
pub const fn get_offset(&self) -> usize
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TreeState
impl Send for TreeState
impl Sync for TreeState
impl Unpin for TreeState
impl UnwindSafe for TreeState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more