Skip to main content

Trie

Struct Trie 

Source
pub struct Trie { /* private fields */ }
Expand description

A Caching implementation as a trie of items stored in an arena.

Implementations§

Source§

impl Trie

Source

pub fn new() -> Self

An empty trie.

Trait Implementations§

Source§

impl Caching for Trie

Source§

fn init(&mut self) -> Index

Clears the cache and creates the root entry.
Source§

fn root_index(&mut self) -> Index

Index of the root entry.
Source§

fn root(&self) -> Option<&CacheEntry>

The root entry.
Source§

fn insert(&mut self, path: &[usize]) -> Index

Finds the entry of the sorted itemset key, creating it if needed. The index is New for an entry that has not been evaluated yet.
Source§

fn node(&self, key: &CacheKey) -> Option<&CacheEntry>

The entry for key.
Source§

fn contains(&self, key: &CacheKey) -> bool

Whether the cache has an entry for key.
Source§

fn update_root(&mut self) -> Option<CacheEntryUpdater<'_>>

An updater for the root entry.
Source§

fn update_node(&mut self, key: &CacheKey) -> Option<CacheEntryUpdater<'_>>

An updater for the entry of key.
Source§

fn size(&self) -> usize

Number of entries.
Source§

fn is_empty(&self) -> bool

Whether the cache has no entry.
Source§

impl Default for Trie

Source§

fn default() -> Trie

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Trie

§

impl RefUnwindSafe for Trie

§

impl Send for Trie

§

impl Sync for Trie

§

impl Unpin for Trie

§

impl UnsafeUnpin for Trie

§

impl UnwindSafe for Trie

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.