pub struct PageQuery {
pub page: u64,
pub per_page: u64,
}Expand description
?page=&per_page= (defaults 1 and 15; per_page is clamped to 100).
As an extractor it ignores other query parameters and rejects a page
or per_page that is not a positive integer with a 400.
Fields§
§page: u64The 1-based page number.
per_page: u64The page size.
Implementations§
Trait Implementations§
impl Copy for PageQuery
Source§impl<'de> Deserialize<'de> for PageQuery
impl<'de> Deserialize<'de> for PageQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PageQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PageQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PageQuery
Source§impl From<PageQuery> for PageRequest
impl From<PageQuery> for PageRequest
Source§impl FromRequestParts for PageQuery
impl FromRequestParts for PageQuery
Source§impl Serialize for PageQuery
impl Serialize for PageQuery
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PageQuery
Auto Trait Implementations§
impl Forget for PageQuery
impl Freeze for PageQuery
impl Move for PageQuery
impl RefUnwindSafe for PageQuery
impl Send for PageQuery
impl Sync for PageQuery
impl Unpin for PageQuery
impl UnsafeUnpin for PageQuery
impl UnwindSafe for PageQuery
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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<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§impl<T> FromRequest<ViaParts> for Twhere
T: FromRequestParts,
impl<T> FromRequest<ViaParts> for Twhere
T: FromRequestParts,
Source§type Rejection = <T as FromRequestParts>::Rejection
type Rejection = <T as FromRequestParts>::Rejection
What a failed extraction answers.
Source§async fn from_request(
request: Request<Body>,
) -> Result<T, <T as FromRequest<ViaParts>>::Rejection>
async fn from_request( request: Request<Body>, ) -> Result<T, <T as FromRequest<ViaParts>>::Rejection>
Reads the extractor from the request.
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 moreSource§impl<T> ValueFor<Option<T>> for T
impl<T> ValueFor<Option<T>> for T
Source§fn into_value_for(self) -> Option<T>
fn into_value_for(self) -> Option<T>
The value as the column’s type.