Struct meilisearch_sdk::key::KeysQuery
source · pub struct KeysQuery {
pub offset: Option<usize>,
pub limit: Option<usize>,
}Fields§
§offset: Option<usize>The number of documents to skip.
If the value of the parameter offset is n, the n first documents (ordered by relevance) will not be returned.
This is helpful for pagination.
Example: If you want to skip the first document, set offset to 1.
limit: Option<usize>The maximum number of documents returned.
If the value of the parameter limit is n, there will never be more than n documents in the response.
This is helpful for pagination.
Example: If you don’t want to get more than two documents, set limit to 2.
Default: 20
Implementations§
source§impl KeysQuery
impl KeysQuery
sourcepub fn with_offset(&mut self, offset: usize) -> &mut KeysQuery
pub fn with_offset(&mut self, offset: usize) -> &mut KeysQuery
Specify the offset.
Example
let mut keys = KeysQuery::new()
.with_offset(1)
.execute(&client).await.unwrap();
assert_eq!(keys.offset, 1);sourcepub fn with_limit(&mut self, limit: usize) -> &mut KeysQuery
pub fn with_limit(&mut self, limit: usize) -> &mut KeysQuery
Specify the maximum number of keys to return.
Example
let mut keys = KeysQuery::new()
.with_limit(1)
.execute(&client).await.unwrap();
assert_eq!(keys.results.len(), 1);Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for KeysQuery
impl Send for KeysQuery
impl Sync for KeysQuery
impl Unpin for KeysQuery
impl UnwindSafe for KeysQuery
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