pub trait PaginatedResponse: Response {
type Item;
// Required methods
fn items(&self) -> &[Self::Item];
fn next_page(&self) -> Option<Pagination>;
}
Expand description
A sub-trait of Response
for paginated responses.
Required Associated Types§
Required Methods§
Sourcefn items(&self) -> &[Self::Item]
fn items(&self) -> &[Self::Item]
Returns a slice of the items in the current page of the paginated response.
Sourcefn next_page(&self) -> Option<Pagination>
fn next_page(&self) -> Option<Pagination>
Returns the pagination of the next page of the paginated response.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.