pub struct Query<'a, B>where
B: CsvSerde + InnerElement,{ /* private fields */ }
Expand description
An object similar to QueryMut to run Read-only queries
Implementations§
source§impl<'a, B: InnerElement + CsvSerde> Query<'a, B>
impl<'a, B: InnerElement + CsvSerde> Query<'a, B>
pub fn new(db: &'a AironeDb<B>) -> Query<'a, B>
sourcepub fn filter<F>(&mut self, f: F) -> &Selfwhere
F: Fn(&B) -> bool,
pub fn filter<F>(&mut self, f: F) -> &Selfwhere F: Fn(&B) -> bool,
Filter the data by using the given closure
sourcepub fn get_matching(&self) -> Vec<&B>
pub fn get_matching(&self) -> Vec<&B>
Get a reference to the matching elements
sourcepub fn matching_indices(&self) -> &Vec<usize>
pub fn matching_indices(&self) -> &Vec<usize>
The matching indices of the result, useful for other external bulk operations
Auto Trait Implementations§
impl<'a, B> RefUnwindSafe for Query<'a, B>where B: RefUnwindSafe,
impl<'a, B> Send for Query<'a, B>where B: Send + Sync,
impl<'a, B> Sync for Query<'a, B>where B: Sync,
impl<'a, B> Unpin for Query<'a, B>where B: Unpin,
impl<'a, B> UnwindSafe for Query<'a, B>where B: UnwindSafe + 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
Mutably borrows from an owned value. Read more