Struct ironstorm_lookup::LookupTable [] [src]

pub struct LookupTable<'a, V: 'a> where V: Lookup {
    // some fields omitted
}

This is the actual LookupTable that creates the in memory data structure and uses it to perform the lookups. It implements the FromIterator trait and its from_iter(..) method. To create a new LookupTable instance, you first have to create an Iterator over some Lookup items. Having that iterator, you can call LookupTable::from_iter(myLookupItemIterator)`.

Methods

impl<'a, V> LookupTable<'a, V> where V: Lookup
[src]

fn find(&'a self, search_text: &'a str) -> Box<Iterator<Item=&V> + 'a>

Searches for Lookup entries with a serachable_text that contains the given search_text. If the search_text is found multiple times for the same entry, the entry will also be returned multiple times. If no matches are found, the Iterator will immediately start returning None. Entries in lower buckets will be returned before entries in higher buckets. The method is case sensitive.

fn len(&self) -> usize

Returns the number of values for this LookupTable

fn bucket_count(&self) -> usize

Returns the number of buckets for this LookupTable

Trait Implementations

impl<'a, A: Lookup> FromIterator<A> for LookupTable<'a, A>
[src]

fn from_iter<T>(iterator: T) -> Self where T: IntoIterator<Item=A>

Creates a LookupTable from the given Iterator