[go: up one dir, main page]

Page

Trait Page 

Source
pub trait Page {
    type Item;
    type IntoIter: Iterator<Item = Self::Item>;

    // Required method
    fn into_items<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::IntoIter>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Represents a single page of items returned by a collection request to a service.

Required Associated Types§

Source

type Item

The type of items in the collection.

Source

type IntoIter: Iterator<Item = Self::Item>

The type containing items in the collection e.g., Vec<Self::Item>.

Required Methods§

Source

fn into_items<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Self::IntoIter>> + Send + 'async_trait>>
where Self: 'async_trait,

Gets a single page of items returned by a collection request to a service.

Implementors§

Source§

impl<P, F> Page for Response<P, F>
where P: DeserializeWith<F> + Page + Send, F: Format + Send,

Source§

type Item = <P as Page>::Item

Source§

type IntoIter = <P as Page>::IntoIter