Skip to content

Instantly share code, notes, and snippets.

@Enigo
Created February 2, 2023 03:27
Show Gist options
  • Save Enigo/d55be0c476c4bba8ebd258fb48335853 to your computer and use it in GitHub Desktop.
Save Enigo/d55be0c476c4bba8ebd258fb48335853 to your computer and use it in GitHub Desktop.
#[derive(Deserialize, Debug)]
pub struct Asset {
pub result: Vec<TheResult>,
pub cursor: String,
}
impl PaginatedApi for Asset {
fn get_cursor(&self) -> String {
self.cursor.clone()
}
fn has_results(&self) -> bool {
!self.result.is_empty()
}
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment