pub struct CollectionQuery<'a, Root, Item> { /* private fields */ }Expand description
Query builder for collection keypaths (KpType where value is Vec<Item>).
Implementations§
Source§impl<'a, Root, Item> CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> CollectionQuery<'a, Root, Item>
pub fn new(keypath: &'a KpType<'a, Root, Vec<Item>>) -> Self
pub fn filter<F>(self, predicate: F) -> Self
pub fn limit(self, n: usize) -> Self
pub fn offset(self, n: usize) -> Self
pub fn execute(&self, root: &'a Root) -> Vec<&'a Item>
pub fn count(&self, root: &'a Root) -> usize
pub fn exists(&self, root: &'a Root) -> bool
pub fn first(&self, root: &'a Root) -> Option<&'a Item>
Auto Trait Implementations§
impl<'a, Root, Item> Freeze for CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> !RefUnwindSafe for CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> !Send for CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> !Sync for CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> Unpin for CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> UnsafeUnpin for CollectionQuery<'a, Root, Item>
impl<'a, Root, Item> !UnwindSafe for CollectionQuery<'a, Root, Item>
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