pub struct SortedIndex<T> { /* private fields */ }
Expand description
Index of a DataStore.
Implementations§
Source§impl<T> SortedIndex<T>where
T: Ord,
impl<T> SortedIndex<T>where
T: Ord,
Sourcepub fn new<F, U>(data_store: &QueriableDataStore<U>, index_provider: F) -> Self
pub fn new<F, U>(data_store: &QueriableDataStore<U>, index_provider: F) -> Self
Sourcepub fn filter_range<R>(&self, range: R) -> DataFilterwhere
R: RangeBounds<T>,
pub fn filter_range<R>(&self, range: R) -> DataFilterwhere
R: RangeBounds<T>,
Get a new DataFilter for all items in the given range.
Sourcepub fn filter_between(
&self,
lower_inclusive: T,
upper_inclusive: T,
) -> DataFilter
pub fn filter_between( &self, lower_inclusive: T, upper_inclusive: T, ) -> DataFilter
Get a new DataFilter for all items between the given values (including lower and upper value).
Sourcepub fn filter_eq(&self, value: T) -> DataFilter
pub fn filter_eq(&self, value: T) -> DataFilter
Get a new DataFilter for all items that are equivalent to the given value.
Sourcepub fn filter_gt(&self, lower_limit: T) -> DataFilter
pub fn filter_gt(&self, lower_limit: T) -> DataFilter
Get a new DataFilter for all items that are greater than the given value.
Sourcepub fn filter_gte(&self, lower_limit: T) -> DataFilter
pub fn filter_gte(&self, lower_limit: T) -> DataFilter
Get a new DataFilter for all items that are greater than ore equal to the given value.
Sourcepub fn filter_lt(&self, upper_limit: T) -> DataFilter
pub fn filter_lt(&self, upper_limit: T) -> DataFilter
Get a new DataFilter for all items that are less than the given value.
Sourcepub fn filter_lte(&self, upper_limit: T) -> DataFilter
pub fn filter_lte(&self, upper_limit: T) -> DataFilter
Get a new DataFilter for all items that are less than ore equal to the given value.
Sourcepub fn first(&self) -> DataFilter
pub fn first(&self) -> DataFilter
Get the first element in the index
Sourcepub fn first_n(&self, n: usize) -> DataFilter
pub fn first_n(&self, n: usize) -> DataFilter
Get the first n elements of the index (less if the amount of items is smaller then n)
Sourcepub fn last(&self) -> DataFilter
pub fn last(&self) -> DataFilter
Get the last element in the index
Sourcepub fn last_n(&self, n: usize) -> DataFilter
pub fn last_n(&self, n: usize) -> DataFilter
Get the last n elements of the index (less if the amount of items is smaller then n)
Trait Implementations§
Source§impl<T: Clone> Clone for SortedIndex<T>
impl<T: Clone> Clone for SortedIndex<T>
Source§fn clone(&self) -> SortedIndex<T>
fn clone(&self) -> SortedIndex<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T: PartialEq> PartialEq for SortedIndex<T>
impl<T: PartialEq> PartialEq for SortedIndex<T>
impl<T: Eq> Eq for SortedIndex<T>
impl<T> StructuralPartialEq for SortedIndex<T>
Auto Trait Implementations§
impl<T> Freeze for SortedIndex<T>
impl<T> RefUnwindSafe for SortedIndex<T>where
T: RefUnwindSafe,
impl<T> Send for SortedIndex<T>where
T: Send,
impl<T> Sync for SortedIndex<T>where
T: Sync,
impl<T> Unpin for SortedIndex<T>
impl<T> UnwindSafe for SortedIndex<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)