torigen_mounter/generated/
results.rs1use serde::{Deserialize, Serialize};
2
3
4#[derive(Deserialize, Serialize, Debug, Clone)]
5pub enum LoadingPattern {
6 Continuous,
7 Pagination,
8 InfiniteScroll,
9}
10
11#[derive(Deserialize, Serialize, Debug, Clone)]
12pub struct ResultMetadata {
13 pub loading_pattern: Option<LoadingPattern>,
14 pub next_offset: Option<u32>,
15 pub next_page: Option<u32>,
16}
17
18#[derive(Deserialize, Serialize, Debug, Clone)]
19pub struct PagedResults<T> {
20 pub results: Vec<T>,
21
22 pub total: u32,
23 pub has_next_page: bool,
24 pub has_previous_page: bool,
25
26 pub current_page: u32,
27 pub total_pages: u32,
28
29 pub limit: u32,
30 pub offset: Option<u32>,
31 pub metadata: Option<ResultMetadata>,
32}