[][src]Struct cedarwood::Cedar

pub struct Cedar { /* fields omitted */ }

Cedar holds all of the information about double array trie.

Methods

impl Cedar[src]

pub fn new() -> Self[src]

Initialize the Cedar for further use.

pub fn build(&mut self, key_values: &[(&str, i32)])[src]

Build the double array trie from the given key value pairs

pub fn update(&mut self, key: &str, value: i32)[src]

Update the key for the value, it is public interface that works on &str

pub fn erase(&mut self, key: &str)[src]

Delete the key from the trie, the public interface that works on &str

To check if key is in the dictionary.

Important traits for PrefixIter<'a>
pub fn common_prefix_iter<'a>(&'a self, key: &'a str) -> PrefixIter<'a>[src]

To return an iterator to iterate through the common prefix in the dictionary with the key passed in.

To return the collection of the common prefix in the dictionary with the key passed in.

Important traits for PrefixPredictIter<'a>
pub fn common_prefix_predict_iter<'a>(
    &'a self,
    key: &'a str
) -> PrefixPredictIter<'a>
[src]

To return an iterator to iterate through the list of words in the dictionary that has key as their prefix.

pub fn common_prefix_predict(&self, key: &str) -> Option<Vec<(i32, usize)>>[src]

To return the list of words in the dictionary that has key as their prefix.

Trait Implementations

impl Clone for Cedar[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Cedar[src]

Auto Trait Implementations

impl Unpin for Cedar

impl Sync for Cedar

impl Send for Cedar

impl RefUnwindSafe for Cedar

impl UnwindSafe for Cedar

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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