pub struct Tree<T> { /* private fields */ }Expand description
Owned tree data independent of presentation policy.
Nodes remain data-only so the model can be reused independently of one component’s presentation policy.
Implementations§
Source§impl<T> Tree<T>
impl<T> Tree<T>
Includes or excludes the complete tree.
Sourcepub const fn child_offset(self, start: usize, end: usize) -> Self
pub const fn child_offset(self, start: usize, end: usize) -> Self
Omits start top-level nodes from the front and end from the back.
Sourcepub const fn root_value(&self) -> Option<&T>
pub const fn root_value(&self) -> Option<&T>
Returns the optional root value.
Sourcepub fn child_nodes(&self) -> &[TreeNode<T>]
pub fn child_nodes(&self) -> &[TreeNode<T>]
Returns all owned top-level nodes before visibility and offset are applied.
Trait Implementations§
impl<T: Eq> Eq for Tree<T>
impl<T> StructuralPartialEq for Tree<T>
Auto Trait Implementations§
impl<T> Freeze for Tree<T>where
T: Freeze,
impl<T> RefUnwindSafe for Tree<T>where
T: RefUnwindSafe,
impl<T> Send for Tree<T>where
T: Send,
impl<T> Sync for Tree<T>where
T: Sync,
impl<T> Unpin for Tree<T>where
T: Unpin,
impl<T> UnsafeUnpin for Tree<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Tree<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