[][src]Struct contest_algorithms::string_proc::Trie

pub struct Trie<K: Hash + Eq> { /* fields omitted */ }

Prefix trie

Methods

impl<K: Hash + Eq + Default> Trie<K>[src]

pub fn insert(&mut self, word: impl IntoIterator<Item = K>)[src]

Inserts a word into the trie.

pub fn get(&self, prefix: impl IntoIterator<Item = K>) -> usize[src]

Computes the number of inserted words that start with the given prefix.

Trait Implementations

impl<K: Default + Hash + Eq> Default for Trie<K>[src]

Auto Trait Implementations

impl<K> Send for Trie<K> where
    K: Send

impl<K> Unpin for Trie<K> where
    K: Unpin

impl<K> Sync for Trie<K> where
    K: Sync

impl<K> UnwindSafe for Trie<K> where
    K: RefUnwindSafe + UnwindSafe

impl<K> RefUnwindSafe for Trie<K> where
    K: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]