pub struct Query {
pub filters: Vec<Filter>,
pub sort: Option<Sort>,
pub skip: Option<usize>,
pub limit: Option<usize>,
pub projection: Option<Vec<String>>,
}Expand description
A query for filtering documents.
Fields§
§filters: Vec<Filter>§sort: Option<Sort>§skip: Option<usize>§limit: Option<usize>§projection: Option<Vec<String>>Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
Sourcepub fn with_filter(self, filter: Filter) -> Self
pub fn with_filter(self, filter: Filter) -> Self
Add a filter.
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Add limit.
Sourcepub fn with_projection(self, fields: Vec<String>) -> Self
pub fn with_projection(self, fields: Vec<String>) -> Self
Add projection.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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