pub struct PathGraph<V> { /* private fields */ }Implementations§
Source§impl<V> PathGraph<V>
impl<V> PathGraph<V>
pub fn new() -> Self
pub fn insert(&mut self, path: &[u32], value: V)
pub fn insert_entry(&mut self, path: &[u32], entry: PathGraphEntry<V>)
pub fn remove(&mut self, path: &[u32]) -> Option<PathGraphEntry<V>>
pub fn find_path(&self, finder: impl Fn(Option<&V>) -> bool) -> Option<Vec<u32>>
pub fn find(&self, finder: impl Fn(Option<&V>) -> bool) -> Option<&V>
pub fn reduce<A>( &self, acc: &mut A, reducer: impl Fn(Option<&V>, &[u32], &mut A) -> bool, ) -> bool
pub fn find_child_path( &self, target: &[u32], finder: impl Fn(Option<&V>) -> bool, ) -> Option<Vec<u32>>
pub fn len(&self, path: &[u32]) -> Option<usize>
pub fn get(&self, path: &[u32]) -> Option<&V>
pub fn size(&self) -> usize
pub fn traverse(&self, target: &[u32], traverser: impl FnMut(&[u32], &V))
pub fn traverse_1_level( &self, target: &[u32], traverser: impl FnMut(&[u32], &V), )
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for PathGraph<V>where
V: Freeze,
impl<V> RefUnwindSafe for PathGraph<V>where
V: RefUnwindSafe,
impl<V> Send for PathGraph<V>where
V: Send,
impl<V> Sync for PathGraph<V>where
V: Sync,
impl<V> Unpin for PathGraph<V>where
V: Unpin,
impl<V> UnwindSafe for PathGraph<V>where
V: 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