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();
Trait Implementations§
Source§impl Debug for ItemCollection
impl Debug for ItemCollection
Source§impl Default for ItemCollection
impl Default for ItemCollection
Source§fn default() -> ItemCollection
fn default() -> 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>,
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>
Source§fn link(&self, rel: &str) -> Option<&Link>
fn link(&self, rel: &str) -> Option<&Link>
Source§fn iter_child_links(&self) -> Box<dyn Iterator<Item = &Link> + '_>
fn iter_child_links(&self) -> Box<dyn Iterator<Item = &Link> + '_>
Source§fn iter_item_links(&self) -> Box<dyn Iterator<Item = &Link> + '_>
fn iter_item_links(&self) -> Box<dyn Iterator<Item = &Link> + '_>
Source§fn make_links_absolute(&mut self) -> Result<(), Error>
fn make_links_absolute(&mut self) -> Result<(), Error>
Source§fn make_links_relative(&mut self) -> Result<(), Error>
fn make_links_relative(&mut self) -> Result<(), Error>
Source§fn remove_relative_links(&mut self)
fn remove_relative_links(&mut self)
Source§fn remove_structural_links(&mut self)
fn remove_structural_links(&mut self)
Source§impl SelfHref for ItemCollection
impl SelfHref for ItemCollection
Auto Trait Implementations§
impl Freeze for ItemCollection
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
Source§impl<T> FromJson for Twhere
T: DeserializeOwned + SelfHref,
impl<T> FromJson for Twhere
T: DeserializeOwned + SelfHref,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more