pub struct IndexesQuery<'a, Http: HttpClient> {
pub client: &'a Client<Http>,
pub offset: Option<usize>,
pub limit: Option<usize>,
}
Expand description
An IndexesQuery
containing filter and pagination parameters when searching for Indexes.
§Example
let mut indexes = IndexesQuery::new(&client)
.with_limit(1)
.execute().await.unwrap();
assert_eq!(indexes.results.len(), 1);
Fields§
§client: &'a Client<Http>
§offset: Option<usize>
The number of Indexes to skip.
If the value of the parameter offset
is n
, the n
first indexes will not be returned.
This is helpful for pagination.
Example: If you want to skip the first index, set offset to 1
.
limit: Option<usize>
The maximum number of Indexes returned.
If the value of the parameter limit
is n
, there will never be more than n
indexes in the response.
This is helpful for pagination.
Example: If you don’t want to get more than two indexes, set limit to 2
.
Default: 20
Implementations§
Source§impl<'a, Http: HttpClient> IndexesQuery<'a, Http>
impl<'a, Http: HttpClient> IndexesQuery<'a, Http>
pub fn new(client: &Client<Http>) -> IndexesQuery<'_, Http>
Sourcepub fn with_offset(&mut self, offset: usize) -> &mut IndexesQuery<'a, Http>
pub fn with_offset(&mut self, offset: usize) -> &mut IndexesQuery<'a, Http>
Specify the offset.
§Example
let mut indexes = IndexesQuery::new(&client)
.with_offset(1)
.execute().await.unwrap();
assert_eq!(indexes.offset, 1);
Sourcepub fn with_limit(&mut self, limit: usize) -> &mut IndexesQuery<'a, Http>
pub fn with_limit(&mut self, limit: usize) -> &mut IndexesQuery<'a, Http>
Trait Implementations§
Source§impl<'a, Http: Clone + HttpClient> Clone for IndexesQuery<'a, Http>
impl<'a, Http: Clone + HttpClient> Clone for IndexesQuery<'a, Http>
Source§fn clone(&self) -> IndexesQuery<'a, Http>
fn clone(&self) -> IndexesQuery<'a, Http>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, Http: Debug + HttpClient> Debug for IndexesQuery<'a, Http>
impl<'a, Http: Debug + HttpClient> Debug for IndexesQuery<'a, Http>
Source§impl<'a, Http: HttpClient> Serialize for IndexesQuery<'a, Http>
impl<'a, Http: HttpClient> Serialize for IndexesQuery<'a, Http>
Auto Trait Implementations§
impl<'a, Http> Freeze for IndexesQuery<'a, Http>
impl<'a, Http> RefUnwindSafe for IndexesQuery<'a, Http>where
Http: RefUnwindSafe,
impl<'a, Http> Send for IndexesQuery<'a, Http>
impl<'a, Http> Sync for IndexesQuery<'a, Http>
impl<'a, Http> Unpin for IndexesQuery<'a, Http>
impl<'a, Http> UnwindSafe for IndexesQuery<'a, Http>where
Http: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more