Struct PathGraphEntry

Source
pub struct PathGraphEntry<V> { /* private fields */ }

Implementations§

Source§

impl<V> PathGraphEntry<V>

Source

pub fn insert(&mut self, path: &[u32], value: V)

Source

pub fn insert_entry(&mut self, path: &[u32], entry: PathGraphEntry<V>)

Source

pub fn remove(&mut self, path: &[u32]) -> Option<PathGraphEntry<V>>

Source

pub fn find_path( &self, path: Vec<u32>, finder: &impl Fn(Option<&V>) -> bool, ) -> Option<Vec<u32>>

Source

pub fn find( &self, path: Vec<u32>, finder: &impl Fn(Option<&V>) -> bool, ) -> Option<&V>

Source

pub fn reduce<A>( &self, acc: &mut A, path: Vec<u32>, reducer: &impl Fn(Option<&V>, &[u32], &mut A) -> bool, ) -> bool

Source

pub fn find_child_path( &self, path: Vec<u32>, target: &[u32], finder: &impl Fn(Option<&V>) -> bool, ) -> Option<Vec<u32>>

Source

pub fn get(&self, path: &[u32]) -> Option<&V>

Source

pub fn len(&self, path: &[u32]) -> Option<usize>

Source

pub fn size(&self, size: &mut usize)

Source

pub fn traverse( &self, target: &[u32], path: Vec<u32>, traverser: &mut impl FnMut(&[u32], &V), )

Source

pub fn traverse_1_level( &self, target: &[u32], path: Vec<u32>, traverser: &mut impl FnMut(&[u32], &V), )

Trait Implementations§

Source§

impl<V: Debug> Debug for PathGraphEntry<V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<V> Freeze for PathGraphEntry<V>
where V: Freeze,

§

impl<V> RefUnwindSafe for PathGraphEntry<V>
where V: RefUnwindSafe,

§

impl<V> Send for PathGraphEntry<V>
where V: Send,

§

impl<V> Sync for PathGraphEntry<V>
where V: Sync,

§

impl<V> Unpin for PathGraphEntry<V>
where V: Unpin,

§

impl<V> UnwindSafe for PathGraphEntry<V>
where V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.