Struct stac_api::ItemCollection
source · pub struct ItemCollection {
pub items: Vec<Item>,
pub links: Vec<Link>,
pub number_matched: Option<u64>,
pub number_returned: Option<u64>,
pub context: Option<Context>,
pub additional_fields: Map<String, Value>,
pub next: Option<Map<String, Value>>,
pub prev: Option<Map<String, Value>>,
pub first: Option<Map<String, Value>>,
pub last: Option<Map<String, Value>>,
/* private fields */
}
Expand description
The return value of the /items
and /search
endpoints.
This might be a stac::ItemCollection, but if the fields extension is used, it might not be. Defined by the itemcollection fragment.
Fields§
§items: Vec<Item>
A possibly-empty array of Item objects.
links: Vec<Link>
An array of Links related to this ItemCollection.
number_matched: Option<u64>
The number of Items that meet the selection parameters, possibly estimated.
number_returned: Option<u64>
The number of Items in the features array.
context: Option<Context>
The search-related metadata for the ItemCollection.
Part of the context extension.
additional_fields: Map<String, Value>
Additional fields.
next: Option<Map<String, Value>>
Optional pagination information for the next page.
This is not part of the specification, but can be used to hold arbitrary pagination information (tokens) to later be turned into links.
prev: Option<Map<String, Value>>
Optional pagination information for the previous page.
This is not part of the specification, but can be used to hold arbitrary pagination information (tokens) to later be turned into links.
first: Option<Map<String, Value>>
Optional pagination information for the first page.
This is not part of the specification, but can be used to hold arbitrary pagination information (tokens) to later be turned into links.
last: Option<Map<String, Value>>
Optional pagination information for the last page.
This is not part of the specification, but can be used to hold arbitrary pagination information (tokens) to later be turned into links.
Implementations§
source§impl ItemCollection
impl ItemCollection
sourcepub fn new(items: Vec<Item>) -> Result<ItemCollection>
pub fn new(items: Vec<Item>) -> Result<ItemCollection>
Creates a new ItemCollection from a vector of items.
§Examples
let item: stac_api::Item = stac::Item::new("an-id").try_into().unwrap();
let item_collection = stac_api::ItemCollection::new(vec![item]).unwrap();