Struct stac_api::ItemCollection
source · pub struct ItemCollection {
pub type: String,
pub features: 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>,
}
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§
§type: String
Always “FeatureCollection” to provide compatibility with GeoJSON.
features: 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.
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();
Trait Implementations§
source§impl Debug for ItemCollection
impl Debug for ItemCollection
source§impl<'de> Deserialize<'de> for ItemCollection
impl<'de> Deserialize<'de> for ItemCollection
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