pub trait Page {
type Item;
// Required methods
fn next(&self, client: &dyn Client) -> Result<Option<Self>, Error>
where Self: Sized;
fn prev(&self, client: &dyn Client) -> Result<Option<Self>, Error>
where Self: Sized;
fn start(&self) -> usize;
fn total_size(&self) -> Option<usize>;
fn entries(&self) -> Vec<Self::Item>;
}Expand description
A page of items.
Required Associated Types§
Required Methods§
sourcefn next(&self, client: &dyn Client) -> Result<Option<Self>, Error>where
Self: Sized,
fn next(&self, client: &dyn Client) -> Result<Option<Self>, Error>where
Self: Sized,
Return the next page, if any.
sourcefn prev(&self, client: &dyn Client) -> Result<Option<Self>, Error>where
Self: Sized,
fn prev(&self, client: &dyn Client) -> Result<Option<Self>, Error>where
Self: Sized,
Return the previous page, if any.
sourcefn total_size(&self) -> Option<usize>
fn total_size(&self) -> Option<usize>
Return the total number of entries in the page collection