pub trait Nodes<T, const N: usize, Id> {
// Required methods
fn iter_nodes<'a>(&'a self) -> impl Iterator<Item = &'a Node<T, N>>
where T: 'a;
fn iter_nodes_mut<'a>(
&'a mut self,
) -> impl Iterator<Item = &'a mut Node<T, N>>
where T: 'a;
fn par_iter_nodes_mut<'a>(
&'a mut self,
) -> impl ParallelIterator<Item = &'a mut Node<T, N>>
where T: 'a + Send,
Id: Sync;
fn get_2_mut(
&mut self,
i1: Id,
i2: Id,
) -> (&mut Node<T, N>, &mut Node<T, N>);
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Collection of nodes for the layout
Required Methods§
Sourcefn iter_nodes<'a>(&'a self) -> impl Iterator<Item = &'a Node<T, N>>where
T: 'a,
fn iter_nodes<'a>(&'a self) -> impl Iterator<Item = &'a Node<T, N>>where
T: 'a,
Create an iterator through the nodes
Sourcefn iter_nodes_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut Node<T, N>>where
T: 'a,
fn iter_nodes_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut Node<T, N>>where
T: 'a,
Create a mutable iterator through the nodes
Sourcefn par_iter_nodes_mut<'a>(
&'a mut self,
) -> impl ParallelIterator<Item = &'a mut Node<T, N>>
fn par_iter_nodes_mut<'a>( &'a mut self, ) -> impl ParallelIterator<Item = &'a mut Node<T, N>>
Create a mutable parallel iterator through the nodes
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.