pub struct NodeList<BackendT, ContextT, ErrorT, IdT, DataT>(pub Vec<Node<BackendT, ContextT, ErrorT, IdT, DataT>>);Expand description
Tree node list.
Tuple Fields§
§0: Vec<Node<BackendT, ContextT, ErrorT, IdT, DataT>>Implementations§
Source§impl<BackendT, ContextT, ErrorT, IdT, DataT> NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
Sourcepub fn iter(
&self,
only_expanded: bool,
) -> NodeIterator<'_, BackendT, ContextT, ErrorT, IdT, DataT> ⓘ
pub fn iter( &self, only_expanded: bool, ) -> NodeIterator<'_, BackendT, ContextT, ErrorT, IdT, DataT> ⓘ
Iterate nodes in visual order from top to bottom.
When only_expanded is true will skip the children of collapsed branches.
Sourcepub fn at_path(
&self,
path: NodePath,
) -> Option<&Node<BackendT, ContextT, ErrorT, IdT, DataT>>where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
pub fn at_path(
&self,
path: NodePath,
) -> Option<&Node<BackendT, ContextT, ErrorT, IdT, DataT>>where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
Get node at path.
Sourcepub fn at_path_mut(
&mut self,
path: NodePath,
) -> Option<&mut Node<BackendT, ContextT, ErrorT, IdT, DataT>>where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
pub fn at_path_mut(
&mut self,
path: NodePath,
) -> Option<&mut Node<BackendT, ContextT, ErrorT, IdT, DataT>>where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
Get node at path.
Sourcepub fn fill_path(
&self,
path: &mut NodePath,
node: &Node<BackendT, ContextT, ErrorT, IdT, DataT>,
) -> boolwhere
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
pub fn fill_path(
&self,
path: &mut NodePath,
node: &Node<BackendT, ContextT, ErrorT, IdT, DataT>,
) -> boolwhere
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
Fill path to node.
Returns true if found.
Sourcepub fn add(
&mut self,
depth: usize,
kind: NodeKind,
id: IdT,
representation: Representation,
)where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
pub fn add(
&mut self,
depth: usize,
kind: NodeKind,
id: IdT,
representation: Representation,
)where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
Add a node.
Sourcepub fn insert(
&mut self,
index: usize,
depth: usize,
kind: NodeKind,
id: IdT,
representation: Representation,
)where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
pub fn insert(
&mut self,
index: usize,
depth: usize,
kind: NodeKind,
id: IdT,
representation: Representation,
)where
BackendT: TreeBackend<ContextT, ErrorT, IdT, DataT>,
Insert a node.
Trait Implementations§
Source§impl<BackendT, ContextT, ErrorT, IdT, DataT> Default for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> Default for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
Source§impl<BackendT, ContextT, ErrorT, IdT, DataT> From<Vec<Node<BackendT, ContextT, ErrorT, IdT, DataT>>> for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> From<Vec<Node<BackendT, ContextT, ErrorT, IdT, DataT>>> for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
Source§impl<BackendT, ContextT, ErrorT, IdT, DataT> FromIterator<Node<BackendT, ContextT, ErrorT, IdT, DataT>> for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> FromIterator<Node<BackendT, ContextT, ErrorT, IdT, DataT>> for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
Source§impl<'this, BackendT, ContextT, ErrorT, IdT, DataT> IntoIterator for &'this NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<'this, BackendT, ContextT, ErrorT, IdT, DataT> IntoIterator for &'this NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
Source§impl<'this, BackendT, ContextT, ErrorT, IdT, DataT> IntoIterator for &'this mut NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<'this, BackendT, ContextT, ErrorT, IdT, DataT> IntoIterator for &'this mut NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
Auto Trait Implementations§
impl<BackendT, ContextT, ErrorT, IdT, DataT> Freeze for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> RefUnwindSafe for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>where
IdT: RefUnwindSafe,
DataT: RefUnwindSafe,
BackendT: RefUnwindSafe,
ContextT: RefUnwindSafe,
ErrorT: RefUnwindSafe,
impl<BackendT, ContextT, ErrorT, IdT, DataT> Send for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> Sync for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> Unpin for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> UnsafeUnpin for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>
impl<BackendT, ContextT, ErrorT, IdT, DataT> UnwindSafe for NodeList<BackendT, ContextT, ErrorT, IdT, DataT>where
IdT: UnwindSafe,
DataT: UnwindSafe,
BackendT: UnwindSafe,
ContextT: UnwindSafe,
ErrorT: 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