pub struct ListQueryParams {
pub page: u32,
pub limit: u32,
pub sort_by: Option<String>,
pub sort_order: Option<String>,
pub search: Option<String>,
pub status: Option<String>,
pub filters: HashMap<String, String>,
}Expand description
Generic list query parameters
Fields§
§page: u32§limit: u32§sort_by: Option<String>§sort_order: Option<String>§search: Option<String>§status: Option<String>§filters: HashMap<String, String>Implementations§
Source§impl ListQueryParams
impl ListQueryParams
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
The page request every list route serves: page 0 reads as page 1, and the page size
is held to 1..=MAX_PER_PAGE, as the repositories hold it, so the meta a
response reports is the page actually read.
Trait Implementations§
Source§impl Clone for ListQueryParams
impl Clone for ListQueryParams
Source§impl Debug for ListQueryParams
impl Debug for ListQueryParams
Source§impl Default for ListQueryParams
impl Default for ListQueryParams
Source§impl<'de> Deserialize<'de> for ListQueryParams
impl<'de> Deserialize<'de> for ListQueryParams
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 ListQueryParams
impl RefUnwindSafe for ListQueryParams
impl Send for ListQueryParams
impl Sync for ListQueryParams
impl Unpin for ListQueryParams
impl UnsafeUnpin for ListQueryParams
impl UnwindSafe for ListQueryParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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