Trait ironstorm_lookup::Lookup
[−]
[src]
pub trait Lookup: Sync { fn searchable_text(&self) -> String; fn bucket(&self) -> Bucket; }
Implement this trait for types that are going be put into a LookupTable
Required Methods
fn searchable_text(&self) -> String
The text that will be looked at when a lookup is executed.
fn bucket(&self) -> Bucket
The bucket in which this item will be put.
Entries in lower buckets will be returned before entries in higher buckets.
Don't introduce too many buckets per LookupTable
.
The worst case would be to have one Bucket per LookupTable entry.
Bucket
is just a type alias for an unsigned integer aka usize.