Trait PaginatedResponse

Source
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§

Source

type Item

The type of item that the paginated response contains.

Required Methods§

Source

fn items(&self) -> &[Self::Item]

Returns a slice of the items in the current page of the paginated response.

Source

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.

Implementors§