Skip to main content

ImmutableSortableWeave

Trait ImmutableSortableWeave 

Source
pub trait ImmutableSortableWeave<K, N, T>: ImmutableWeave<K, N, T>
where K: Hash + Copy + Eq + Ord, N: Node<K, T>,
{ // Required methods fn get_ordered_node_identifiers_mirrored(&self, output: &mut Vec<K>); fn get_ordered_node_identifiers_mirrored_from( &self, id: &K, output: &mut Vec<K>, ); }
Expand description

An ImmutableWeave where the ordering of nodes is stable and can be user-defined.

Required Methods§

Source

fn get_ordered_node_identifiers_mirrored(&self, output: &mut Vec<K>)

Builds a list of all node identifiers ordered by their positions in the Weave.

Unlike ImmutableWeave::get_ordered_node_identifiers, this function reverses the ordering of node children.

Source

fn get_ordered_node_identifiers_mirrored_from( &self, id: &K, output: &mut Vec<K>, )

Recursively builds a list of all children of the specified node ordered by their positions in the Weave.

Unlike ImmutableWeave::get_ordered_node_identifiers_from, this function reverses the ordering of node children.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K, T, M, S> ImmutableSortableWeave<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>, <T as Archive>::Archived> for ArchivedDependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

impl<K, T, M, S> ImmutableSortableWeave<<K as Archive>::Archived, ArchivedIndependentNode<K, T, S>, <T as Archive>::Archived> for ArchivedIndependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive + IndependentContents, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.