pub struct Page<T> {
pub items: Option<Vec<T>>,
pub last_page: Option<i64>,
pub total_count: Option<i64>,
pub facets: Option<Vec<Facet>>,
pub page: Option<i64>,
pub page_size: Option<i64>,
pub actions: Option<HashMap<String, Action>>,
}Expand description
A generic type to model any endpoint that supports pagination. These typically start with ‘Page’. For example, ‘PageCountry’ and ‘PageRegion’ in the Headless Admin Address API.
Fields§
§items: Option<Vec<T>>The items returned in the page.
last_page: Option<i64>The page containing the last items available
total_count: Option<i64>The total number of items
facets: Option<Vec<Facet>>The result of requested aggregation terms
page: Option<i64>The current page number
page_size: Option<i64>The number of items per page
actions: Option<HashMap<String, Action>>A map of the available actions
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Page<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Page<T>where
T: Deserialize<'de>,
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
impl<T: PartialEq> StructuralPartialEq for Page<T>
Auto Trait Implementations§
impl<T> Freeze for Page<T>
impl<T> RefUnwindSafe for Page<T>
impl<T> Send for Page<T>
impl<T> Sync for Page<T>
impl<T> Unpin for Page<T>
impl<T> UnsafeUnpin for Page<T>
impl<T> UnwindSafe for Page<T>
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