pub struct PageDto<T> {
pub page: Option<u32>,
pub page_size: Option<u32>,
pub total_pages: Option<u32>,
pub total_items: u32,
pub items: Vec<T>,
}Expand description
A page of items, as returned by a paginated query.
Fields§
§page: Option<u32>The page returned (0 based), as requested.
page_size: Option<u32>The number of items per page, as requested.
total_pages: Option<u32>The number of pages (none without a page size).
total_items: u32The number of items over every page.
items: Vec<T>The items of the page.
Implementations§
Trait Implementations§
Source§impl<T> JsonSchema for PageDto<T>where
T: JsonSchema,
impl<T> JsonSchema for PageDto<T>where
T: JsonSchema,
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl<T> Forget for PageDto<T>
impl<T> Freeze for PageDto<T>
impl<T> Move for PageDto<T>
impl<T> RefUnwindSafe for PageDto<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for PageDto<T>
impl<T> Sync for PageDto<T>
impl<T> Unpin for PageDto<T>
impl<T> UnsafeUnpin for PageDto<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for PageDto<T>where
Vec<T>: UnwindSafe,
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