Trait tantivy_columnar::column_index::Set
source · pub trait Set<T> {
type SelectCursor<'b>: SelectCursor<T>
where Self: 'b;
// Required methods
fn contains(&self, el: T) -> bool;
fn rank(&self, el: T) -> T;
fn rank_if_exists(&self, el: T) -> Option<T>;
fn select(&self, rank: T) -> T;
fn select_cursor(&self) -> Self::SelectCursor<'_>;
}
Required Associated Types§
type SelectCursor<'b>: SelectCursor<T> where Self: 'b
Required Methods§
sourcefn rank_if_exists(&self, el: T) -> Option<T>
fn rank_if_exists(&self, el: T) -> Option<T>
If the set contains el
returns the element rank.
If the set does not contain the element, it returns None
.
sourcefn select(&self, rank: T) -> T
fn select(&self, rank: T) -> T
Return the rank-th value stored in this bitmap.
§Panics
May panic if rank is greater or equal to the number of elements in the Set.
sourcefn select_cursor(&self) -> Self::SelectCursor<'_>
fn select_cursor(&self) -> Self::SelectCursor<'_>
Creates a brand new select cursor.
Object Safety§
This trait is not object safe.