Skip to main content

Paginatable

Trait Paginatable 

Source
pub trait Paginatable<T: Entity>: Send + Sync {
    // Required method
    fn find_page(
        &self,
        request: PageRequest,
    ) -> BoxFuture<'_, Result<Page<T>, RepoError>>;
}
Expand description

Trait for repositories that support paginated queries over all rows.

Paginates every entity of type T without applying a filter. For filtered pagination, use Queryable::find_page_by.

This trait is object-safe.

Required Methods§

Source

fn find_page( &self, request: PageRequest, ) -> BoxFuture<'_, Result<Page<T>, RepoError>>

Return a page of all entities according to the given request.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§