#[non_exhaustive]pub struct Pagination {
pub current_page: u32,
pub page_size: u32,
pub total_pages: u32,
pub total_records: u32,
pub next_page: Option<u32>,
pub prev_page: Option<u32>,
}
Expand description
Pagination information.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.current_page: u32
§page_size: u32
§total_pages: u32
§total_records: u32
§next_page: Option<u32>
§prev_page: Option<u32>
Implementations§
Source§impl Pagination
impl Pagination
pub fn current_page(&self) -> &u32
pub fn with_current_page(self, val: u32) -> Self
pub fn page_size(&self) -> &u32
pub fn with_page_size(self, val: u32) -> Self
pub fn total_pages(&self) -> &u32
pub fn with_total_pages(self, val: u32) -> Self
pub fn total_records(&self) -> &u32
pub fn with_total_records(self, val: u32) -> Self
pub fn next_page(&self) -> &Option<u32>
pub fn with_next_page(self, val: Option<u32>) -> Self
pub fn prev_page(&self) -> &Option<u32>
pub fn with_prev_page(self, val: Option<u32>) -> Self
Trait Implementations§
Source§impl Debug for Pagination
impl Debug for Pagination
Source§impl Default for Pagination
impl Default for Pagination
Source§fn default() -> Pagination
fn default() -> Pagination
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Pagination
impl<'de> Deserialize<'de> for Pagination
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 Pagination
impl RefUnwindSafe for Pagination
impl Send for Pagination
impl Sync for Pagination
impl Unpin for Pagination
impl UnwindSafe for Pagination
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_response<Meta>(self, meta: Option<Meta>) -> ApiResponse<Self, Meta>
fn api_response_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_response_with_meta<Meta>(self, meta: Meta) -> ApiResponse<Self, Meta>
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