pub struct Pagination {
pub size: u32,
pub page: u32,
}Expand description
Page number and page size for the paged REST lists.
This is a helper for your own code: the client methods take size and page as separate
arguments. The broker pages from 0, with size from 1 to 100 (default 50), so
Pagination::default is the first page of 50.
§Examples
use brokapi_bcs_protocol::models::types::Pagination;
let first = Pagination::default();
assert_eq!((first.size, first.page), (50, 0));
let third = Pagination::new(100, 2);
assert_eq!(third.page, 2);Fields§
§size: u32Records per page. The broker accepts 1 to 100.
page: u32Page number, counted from 0.
Implementations§
Trait Implementations§
Source§impl Clone for Pagination
impl Clone for Pagination
Source§fn clone(&self) -> Pagination
fn clone(&self) -> Pagination
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Pagination
Source§impl Debug for Pagination
impl Debug for Pagination
Auto Trait Implementations§
impl Freeze for Pagination
impl RefUnwindSafe for Pagination
impl Send for Pagination
impl Sync for Pagination
impl Unpin for Pagination
impl UnsafeUnpin for Pagination
impl UnwindSafe for Pagination
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