Struct radix_tree::Node
source · [−]pub struct Node<K, V> {
pub path: Vec<K>,
pub data: Option<V>,
pub indices: Vec<K>,
pub nodes: Vec<Node<K, V>>,
}
Fields
path: Vec<K>
data: Option<V>
indices: Vec<K>
nodes: Vec<Node<K, V>>
Implementations
sourceimpl<K, V> Node<K, V> where
K: Copy + PartialEq + PartialOrd,
V: Clone,
impl<K, V> Node<K, V> where
K: Copy + PartialEq + PartialOrd,
V: Clone,
pub fn new<P: Vectorable<K>>(path: P, data: Option<V>) -> Self
pub fn insert_with<F>(
&mut self,
path: &mut Vec<K>,
data: Option<V>,
force_update: bool,
pos: F
) -> &mut Self where
F: Fn(&usize, &K, &Vec<K>) -> usize,
pub fn add_node_with<F>(
&mut self,
path: &mut Vec<K>,
data: Option<V>,
i: usize,
force_update: bool,
pos: F
) -> &mut Self where
F: Fn(&usize, &K, &Vec<K>) -> usize,
pub fn find_with(&self, path: &mut Vec<K>) -> Option<&Self>
pub fn find_node_with(&self, path: &mut Vec<K>, i: usize) -> Option<&Self>
Trait Implementations
sourceimpl<K: PartialEq, V: PartialEq> PartialEq<Node<K, V>> for Node<K, V>
impl<K: PartialEq, V: PartialEq> PartialEq<Node<K, V>> for Node<K, V>
sourceimpl<K, V, P: Vectorable<K>> Radix<K, V, P> for Node<K, V> where
K: Copy + PartialEq + PartialOrd,
V: Clone,
impl<K, V, P: Vectorable<K>> Radix<K, V, P> for Node<K, V> where
K: Copy + PartialEq + PartialOrd,
V: Clone,
impl<K, V> StructuralPartialEq for Node<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Node<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Node<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for Node<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for Node<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for Node<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more