mongo_data/document/pageable.rs
1use crate::document::document::BaseDocument;
2
3/// Utility struct to represent pageable response from the database
4#[derive(Clone)]
5pub struct PageableResponse<T: BaseDocument> {
6 pub data: Vec<T>,
7 pub number_per_page: i64,
8 pub last_item_id: Option<String>,
9 pub total: u64,
10 pub no_of_items_in_batch: usize,
11}
12
13/// Utility struct to represent pageable requests to the database
14#[derive(Debug)]
15pub struct PageableRequest {
16 pub number_per_page: i64,
17 pub last_item_id: Option<String>,
18}