diff options
author | 2021-08-30 08:27:10 -0700 | |
---|---|---|
committer | 2021-08-30 08:27:10 -0700 | |
commit | eab748bf990a304063c476fb7cdeab0ec8c325f7 (patch) | |
tree | 2211af13fff6028e346641aacf3fad2a1fe3c512 /src/models/paging.rs | |
parent | a78a8d9444426a608888755eb1537905b7d1d96a (diff) | |
download | notion-eab748bf990a304063c476fb7cdeab0ec8c325f7.tar.gz notion-eab748bf990a304063c476fb7cdeab0ec8c325f7.tar.zst notion-eab748bf990a304063c476fb7cdeab0ec8c325f7.zip |
Improve ergonomics
Diffstat (limited to 'src/models/paging.rs')
-rw-r--r-- | src/models/paging.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/models/paging.rs b/src/models/paging.rs index 3b97301..481c235 100644 --- a/src/models/paging.rs +++ b/src/models/paging.rs @@ -4,10 +4,14 @@ use serde::{Deserialize, Serialize}; #[serde(transparent)] pub struct PagingCursor(String); -#[derive(Serialize, Debug, Eq, PartialEq, Default)] +#[derive(Serialize, Debug, Eq, PartialEq, Default, Clone)] pub struct Paging { #[serde(skip_serializing_if = "Option::is_none")] pub start_cursor: Option<PagingCursor>, #[serde(skip_serializing_if = "Option::is_none")] pub page_size: Option<u8>, } + +pub trait Pageable { + fn start_from(self, starting_point: Paging) -> Self; +} |