Trait PageList

Source
pub trait PageList:
    Send
    + Sync
    + Unpin
    + 'static {
    // Required method
    fn next_page(
        &self,
        ctx: &mut PageContext,
    ) -> impl Future<Output = Result<()>> + MaybeSend;
}
Expand description

PageList is used to implement oio::List based on API supporting pagination. By implementing PageList, services don’t need to care about the details of page list.

§Architecture

The architecture after adopting PageList:

  • Services impl PageList
  • PageLister impl List
  • Expose PageLister as Accessor::Lister

Required Methods§

Source

fn next_page( &self, ctx: &mut PageContext, ) -> impl Future<Output = Result<()>> + MaybeSend

Available on non-WebAssembly only.

next_page is used to fetch next page of entries from underlying storage.

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§