pub struct PaginatedResponse<T> {
pub success: bool,
pub items: Vec<T>,
pub cursor: CursorObject,
}Expand description
Standard API response wrapper for paginated items.
Used by endpoints that support cursor-based pagination, such as transaction listings.
The cursor object contains a next field that can be used to fetch the next page.
§Example JSON
{
"success": true,
"items": [...],
"cursor": {
"next": "cursor_token..."
}
}Fields§
§success: boolIndicates if the request was successful.
items: Vec<T>The list of resources for this page.
cursor: CursorObjectCursor information for pagination.
Trait Implementations§
Source§impl<T: Clone> Clone for PaginatedResponse<T>
impl<T: Clone> Clone for PaginatedResponse<T>
Source§fn clone(&self) -> PaginatedResponse<T>
fn clone(&self) -> PaginatedResponse<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for PaginatedResponse<T>
impl<T: Debug> Debug for PaginatedResponse<T>
Source§impl<'de, T> Deserialize<'de> for PaginatedResponse<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PaginatedResponse<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
Source§impl<T: PartialEq> PartialEq for PaginatedResponse<T>
impl<T: PartialEq> PartialEq for PaginatedResponse<T>
Source§impl<T> Serialize for PaginatedResponse<T>where
T: Serialize,
impl<T> Serialize for PaginatedResponse<T>where
T: Serialize,
impl<T: Eq> Eq for PaginatedResponse<T>
impl<T> StructuralPartialEq 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> 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