pub trait Pagination {
    // Required method
    fn find_paginated<'life0, 'async_trait, T>(
        &'life0 self,
        filter: Option<Document>,
        options: Option<FindOptions>,
        cursor: Option<DirectedCursor>
    ) -> Pin<Box<dyn Future<Output = Result<FindResult<T>, CursorError>> + Send + 'async_trait>>
       where T: DeserializeOwned + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Used to paginate through a collection.

Required Methods§

source

fn find_paginated<'life0, 'async_trait, T>( &'life0 self, filter: Option<Document>, options: Option<FindOptions>, cursor: Option<DirectedCursor> ) -> Pin<Box<dyn Future<Output = Result<FindResult<T>, CursorError>> + Send + 'async_trait>>where T: DeserializeOwned + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Finds the items in the collection matching filter based on the cursor.

Arguments
  • filter: Optional filter to restrict the result set of the query.
  • options: Optional find options that you would like to perform any searches with
  • cursor: An optional existing cursor in base64. This would have come from a previous FindResult<T>

Implementations on Foreign Types§

source§

impl<I: Send + Sync> Pagination for Collection<I>

source§

fn find_paginated<'life0, 'async_trait, T>( &'life0 self, filter: Option<Document>, options: Option<FindOptions>, cursor: Option<DirectedCursor> ) -> Pin<Box<dyn Future<Output = Result<FindResult<T>, CursorError>> + Send + 'async_trait>>where T: DeserializeOwned + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Implementors§