pub struct ListItem<T> { /* private fields */ }Expand description
One owned typed value and its recursive nested list items.
ListItem is deliberately independent of the Tree component’s public node
model, so either public API can evolve without changing the other.
Implementations§
Source§impl<T> ListItem<T>
impl<T> ListItem<T>
Sourcepub fn items<I, N>(self, items: I) -> Selfwhere
I: IntoIterator<Item = N>,
N: Into<Self>,
pub fn items<I, N>(self, items: I) -> Selfwhere
I: IntoIterator<Item = N>,
N: Into<Self>,
Appends nested items in iteration order.
Includes or excludes this item and all of its descendants.
Sourcepub const fn offset(self, start: usize, end: usize) -> Self
pub const fn offset(self, start: usize, end: usize) -> Self
Omits start nested items from the front and end from the back.
Sourcepub fn item_nodes(&self) -> &[Self]
pub fn item_nodes(&self) -> &[Self]
Returns all nested items before visibility and offset are applied.
Returns whether this item and its descendants are excluded.
Trait Implementations§
Source§impl<T: PartialEq> PartialEq for ListItem<T>
impl<T: PartialEq> PartialEq for ListItem<T>
impl<T: Eq> Eq for ListItem<T>
impl<T> StructuralPartialEq for ListItem<T>
Auto Trait Implementations§
impl<T> Freeze for ListItem<T>where
T: Freeze,
impl<T> RefUnwindSafe for ListItem<T>where
T: RefUnwindSafe,
impl<T> Send for ListItem<T>where
T: Send,
impl<T> Sync for ListItem<T>where
T: Sync,
impl<T> Unpin for ListItem<T>where
T: Unpin,
impl<T> UnsafeUnpin for ListItem<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ListItem<T>where
T: UnwindSafe,
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