pub struct PaginatedResponse<T: Serialize> {
pub data: Vec<T>,
pub meta: PaginationMeta,
}Expand description
JSON API response envelope for paginated list endpoints.
Returns { "data": [...], "meta": { page, per_page, total, total_pages } }.
Used by paged read action handlers instead of the plain Response envelope.
Fields§
§data: Vec<T>§meta: PaginationMetaTrait Implementations§
Source§impl<T> PartialSchema for PaginatedResponse<T>where
T: Serialize + PartialSchema,
impl<T> PartialSchema for PaginatedResponse<T>where
T: Serialize + PartialSchema,
Source§impl<T> Serialize for PaginatedResponse<T>
impl<T> Serialize for PaginatedResponse<T>
Auto Trait Implementations§
impl<T> Freeze for PaginatedResponse<T>
impl<T> RefUnwindSafe for PaginatedResponse<T>where
T: RefUnwindSafe,
impl<T> Send for PaginatedResponse<T>where
T: Send,
impl<T> Sync for PaginatedResponse<T>where
T: Sync,
impl<T> Unpin for PaginatedResponse<T>where
T: Unpin,
impl<T> UnsafeUnpin for PaginatedResponse<T>
impl<T> UnwindSafe for PaginatedResponse<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