Skip to main content

load_offset_page

Function load_offset_page 

Source
pub async fn load_offset_page<T, F, Fut>(
    limit: u64,
    offset: u64,
    max_limit: u64,
    fetch: F,
) -> Result<OffsetPage<T>>
where T: Serialize + ApiSchema, F: FnOnce(u64, u64) -> Fut, Fut: Future<Output = Result<(Vec<T>, u64)>>,
Expand description

Loads an offset page by clamping limit, invoking fetch, and wrapping the result.