Struct ironstorm_lookup::LookupTable
[−]
[src]
pub struct LookupTable<'a, V: 'a> where
V: Lookup, { /* 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]
V: Lookup,
pub fn find(
&'a self,
search_text: &'a str
) -> Box<Iterator<Item = &V> + Send + 'a>
[src]
&'a self,
search_text: &'a str
) -> Box<Iterator<Item = &V> + Send + '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.
pub fn len(&self) -> usize
[src]
Returns the number of values for this LookupTable
pub fn bucket_count(&self) -> usize
[src]
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>,
[src]
T: IntoIterator<Item = A>,
Creates a LookupTable
from the given Iterator
Auto Trait Implementations
impl<'a, V> Send for LookupTable<'a, V> where
V: Send,
V: Send,