pub struct List<T> { /* private fields */ }Expand description
Owned typed list data independent of presentation policy.
List owns its public model independently from Tree. Its presentation binds this recursive data without coupling either public data API to the other component.
Offsets are supported with List::offset and ListItem::offset. A
filter callback is intentionally not part of this API: omit items before
construction or mark individual ListItem values hidden instead.
List::new creates the same empty container for every value type. Calls
that append an item infer T from that value; an empty List states its type
explicitly or through its surrounding context.
Implementations§
Source§impl<T> List<T>
impl<T> List<T>
Includes or excludes the complete list.
Sourcepub const fn offset(self, start: usize, end: usize) -> Self
pub const fn offset(self, start: usize, end: usize) -> Self
Omits start top-level items from the front and end from the back.
Sourcepub fn item_nodes(&self) -> &[ListItem<T>]
pub fn item_nodes(&self) -> &[ListItem<T>]
Returns all owned top-level items before visibility and offset are applied.