pub struct QuerySorts(pub Vec<QuerySort>);
Expand description
Filter sorts
Tuple Fields§
§0: Vec<QuerySort>
Trait Implementations§
Source§impl Clone for QuerySorts
impl Clone for QuerySorts
Source§fn clone(&self) -> QuerySorts
fn clone(&self) -> QuerySorts
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 Debug for QuerySorts
impl Debug for QuerySorts
Source§impl Default for QuerySorts
impl Default for QuerySorts
Source§fn default() -> QuerySorts
fn default() -> QuerySorts
Returns the “default value” for a type. Read more
Source§impl From<&str> for QuerySorts
impl From<&str> for QuerySorts
Source§fn from(value: &str) -> Self
fn from(value: &str) -> Self
Create a new query sorting from a string
§Example
use api_tools::value_objects::query_sort::{QuerySort, QuerySortDirection, QuerySorts};
let sorts = QuerySorts::from("+id,-name");
assert_eq!(
sorts.0,
vec![
QuerySort {
field: "id".to_string(),
direction: QuerySortDirection::Asc
},
QuerySort {
field: "name".to_string(),
direction: QuerySortDirection::Desc
},
]
);
Source§impl PartialEq for QuerySorts
impl PartialEq for QuerySorts
impl Eq for QuerySorts
impl StructuralPartialEq for QuerySorts
Auto Trait Implementations§
impl Freeze for QuerySorts
impl RefUnwindSafe for QuerySorts
impl Send for QuerySorts
impl Sync for QuerySorts
impl Unpin for QuerySorts
impl UnwindSafe for QuerySorts
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.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> Pointable for T
impl<T> Pointable for T
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension. Read more
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension, using
x-request-id
as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses. Read more
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses, using
x-request-id
as the header name. Read more