Struct stac_api::ItemCollection
source · pub struct ItemCollection {
pub type: String,
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>,
}
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.
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.
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 Default for ItemCollection
impl Default 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
source§impl Links for ItemCollection
impl Links for ItemCollection
source§fn links_mut(&mut self) -> &mut Vec<Link>
fn links_mut(&mut self) -> &mut Vec<Link>
Returns a mutable reference to this object’s links. Read more
source§fn link(&self, rel: &str) -> Option<&Link>
fn link(&self, rel: &str) -> Option<&Link>
Returns the first link with the given rel type. Read more
source§fn iter_child_links(&self) -> Box<dyn Iterator<Item = &Link> + '_, Global>
fn iter_child_links(&self) -> Box<dyn Iterator<Item = &Link> + '_, Global>
Returns an iterator over this object’s child links. Read more
source§fn iter_item_links(&self) -> Box<dyn Iterator<Item = &Link> + '_, Global>
fn iter_item_links(&self) -> Box<dyn Iterator<Item = &Link> + '_, Global>
Returns an iterator over this object’s item links. Read more
source§fn make_relative_links_absolute(
&mut self,
href: impl ToString
) -> Result<(), Error>
fn make_relative_links_absolute( &mut self, href: impl ToString ) -> Result<(), Error>
Makes all relative links absolute with respect to an href. Read more
source§fn remove_relative_links(&mut self)
fn remove_relative_links(&mut self)
Removes all relative links. Read more
source§fn remove_structural_links(&mut self)
fn remove_structural_links(&mut self)
Removes all structural links. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ItemCollection
impl Send for ItemCollection
impl Sync for ItemCollection
impl Unpin for ItemCollection
impl UnwindSafe for ItemCollection
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