pub struct Page<T> {
pub offset: i64,
pub limit: i32,
pub count: i32,
pub total_count: i64,
pub data: Vec<T>,
}Expand description
Generic pagination wrapper returned by all list endpoints.
Items are decoded individually: a record the model cannot parse is dropped with a warning instead of failing the whole page, so one unexpected payload shape cannot blank an entire collection.
Fields§
§offset: i64§limit: i32§count: i32§total_count: i64§data: Vec<T>Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Page<T>where
T: DeserializeOwned,
impl<'de, T> Deserialize<'de> for Page<T>where
T: DeserializeOwned,
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>where
T: RefUnwindSafe,
impl<T> Send for Page<T>where
T: Send,
impl<T> Sync for Page<T>where
T: Sync,
impl<T> Unpin for Page<T>where
T: Unpin,
impl<T> UnsafeUnpin for Page<T>
impl<T> UnwindSafe for Page<T>where
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