pub trait Paginated {
type Item: Send + Sync;
// Required methods
fn items(self) -> Vec<Self::Item>;
fn next_cursor(&self) -> Option<&str>;
fn has_more(&self) -> bool;
}Expand description
Trait for paginated API response types.
Implement this trait on your response type to enable automatic pagination
via PageStream. The SDK provides implementations for
all built-in list response types.
§Required methods
items— Extract the items from this page (consumesself)next_cursor— Return the cursor string for fetching the next pagehas_more— Return whether more pages exist
Required Associated Types§
Required Methods§
Sourcefn next_cursor(&self) -> Option<&str>
fn next_cursor(&self) -> Option<&str>
Returns the cursor for the next page, if any.