pub struct GetItemsOptions { /* private fields */ }
Expand description
Options for requests to endpoints that return multiple items.
Implementations§
source§impl GetItemsOptions
impl GetItemsOptions
sourcepub fn filter_eq(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_eq( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is equal to the given
value
.
field
can be a simple or dotted field name, like author
or
author.name
. value
can be a bare number or string (like
2
or Ben
), or a stringified JSON value ("2.0"
, [1, 2]
,
{"checked": true}
).
sourcepub fn filter_not(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_not( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is not equal to the
given value
.
sourcepub fn filter_contains(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_contains( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is an array that
contains the given value
. If value
is a stringified JSON array, the
field must contain all its elements.
sourcepub fn filter_lt(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_lt( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is strictly less
than the given value
.
sourcepub fn filter_gt(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_gt( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is strictly greater
than the given value
.
sourcepub fn filter_max(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_max( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is less than or equal
to the given value
.
sourcepub fn filter_min(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_min( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is greater than or
equal to the given value
.
sourcepub fn filter_like(
&mut self,
field: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn filter_like( &mut self, field: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Sets an option to only return items whose field
is a string that
contains the substring value
. value
can contain *
wildcards.
sourcepub fn filter_has(&mut self, field: impl Into<String>) -> &mut Self
pub fn filter_has(&mut self, field: impl Into<String>) -> &mut Self
Sets an option to only return items that have the given field
.
sourcepub fn filter_has_not(&mut self, field: impl Into<String>) -> &mut Self
pub fn filter_has_not(&mut self, field: impl Into<String>) -> &mut Self
Sets an option to only return items that do not have the given field
.
sourcepub fn sort(&mut self, field: impl Into<String>, order: SortOrder) -> &mut Self
pub fn sort(&mut self, field: impl Into<String>, order: SortOrder) -> &mut Self
Sets an option to return items in order
for the given field
.
sourcepub fn field(&mut self, field: impl Into<String>) -> &mut Self
pub fn field(&mut self, field: impl Into<String>) -> &mut Self
Sets an option to only return the given field
of each item.
The special id
and last_modified
fields are always returned.
Trait Implementations§
source§impl Clone for GetItemsOptions
impl Clone for GetItemsOptions
source§fn clone(&self) -> GetItemsOptions
fn clone(&self) -> GetItemsOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GetItemsOptions
impl Debug for GetItemsOptions
source§impl Default for GetItemsOptions
impl Default for GetItemsOptions
source§fn default() -> GetItemsOptions
fn default() -> GetItemsOptions
source§impl Hash for GetItemsOptions
impl Hash for GetItemsOptions
source§impl Ord for GetItemsOptions
impl Ord for GetItemsOptions
source§fn cmp(&self, other: &GetItemsOptions) -> Ordering
fn cmp(&self, other: &GetItemsOptions) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for GetItemsOptions
impl PartialEq for GetItemsOptions
source§impl PartialOrd for GetItemsOptions
impl PartialOrd for GetItemsOptions
impl Eq for GetItemsOptions
impl StructuralPartialEq for GetItemsOptions
Auto Trait Implementations§
impl Freeze for GetItemsOptions
impl RefUnwindSafe for GetItemsOptions
impl Send for GetItemsOptions
impl Sync for GetItemsOptions
impl Unpin for GetItemsOptions
impl UnwindSafe for GetItemsOptions
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more