Struct tui_tree_widget::TreeItem
source · [−]pub struct TreeItem<'a> { /* private fields */ }
Implementations
sourceimpl<'a> TreeItem<'a>
impl<'a> TreeItem<'a>
pub fn new_leaf<T>(text: T) -> Self where
T: Into<Text<'a>>,
pub fn new<T, Children>(text: T, children: Children) -> Self where
T: Into<Text<'a>>,
Children: Into<Vec<TreeItem<'a>>>,
pub fn child(&self, index: usize) -> Option<&Self>
pub fn child_mut(&mut self, index: usize) -> Option<&mut Self>
pub fn height(&self) -> usize
pub const fn style(self, style: Style) -> Self
pub fn add_child(&mut self, child: TreeItem<'a>)
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for TreeItem<'a>
impl<'a> Send for TreeItem<'a>
impl<'a> Sync for TreeItem<'a>
impl<'a> Unpin for TreeItem<'a>
impl<'a> UnwindSafe for TreeItem<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more