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§

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§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.