pub struct Page {
pub features: Vec<Item>,
pub next: Option<String>,
pub prev: Option<String>,
pub context: Context,
}
Expand description
A page of search results.
Fields§
§features: Vec<Item>
These are the out features, usually STAC items, but maybe not legal STAC items if fields are excluded.
next: Option<String>
The next id.
prev: Option<String>
The previous id.
context: Context
The search context.
Implementations§
source§impl Page
impl Page
sourcepub fn next_token(&self) -> Option<String>
pub fn next_token(&self) -> Option<String>
Returns this page’s next token, if it has one.
§Examples
use pgstac::Client;
use tokio_postgres::NoTls;
let config = "postgresql://username:password@localhost:5432/postgis";
let (client, connection) = tokio_postgres::connect(config, NoTls).await.unwrap();
let client = Client::new(&client);
let page = client.search(Default::default()).await.unwrap();
let next_token = page.next_token().unwrap();
sourcepub fn prev_token(&self) -> Option<String>
pub fn prev_token(&self) -> Option<String>
Returns this page’s prev token, if it has one.
§Examples
use pgstac::Client;
use tokio_postgres::NoTls;
let config = "postgresql://username:password@localhost:5432/postgis";
let (client, connection) = tokio_postgres::connect(config, NoTls).await.unwrap();
let client = Client::new(&client);
let page = client.search(Default::default()).await.unwrap();
let prev_token = page.prev_token().unwrap();
Trait Implementations§
source§impl<'de> Deserialize<'de> for Page
impl<'de> Deserialize<'de> for Page
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more