Literature.Pagination.Paginater protocol (literature v0.4.7)

The Literature.Pagination.Paginater protocol should be implemented for any type that requires pagination.

Summary

Types

t()

All the types that implement this protocol.

Functions

The paginate function will be invoked with the item to paginate along with an option. It is expected to return a Literature.Pagination.Page.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

paginate(pageable, pagination_params, opts)

@spec paginate(any(), map(), Keyword.t()) :: Literature.Pagination.Page.t()

The paginate function will be invoked with the item to paginate along with an option. It is expected to return a Literature.Pagination.Page.