Struct stac::Collection
source · pub struct Collection {
pub extensions: Option<Vec<String>>,
pub id: String,
pub title: Option<String>,
pub description: String,
pub keywords: Option<Vec<String>>,
pub license: String,
pub providers: Option<Vec<Provider>>,
pub extent: Extent,
pub summaries: Option<Map<String, Value>>,
pub links: Vec<Link>,
pub assets: HashMap<String, Asset>,
pub additional_fields: Map<String, Value>,
/* private fields */
}Expand description
The STAC Collection Specification defines a set of common fields to describe
a group of Items that share properties and metadata.
The Collection Specification shares all fields with the STAC
Catalog Specification (with different allowed values for
type and extensions) and adds fields to describe the whole dataset and
the included set of Items. Collections can have both parent Catalogs and
Collections and child Items, Catalogs and Collections.
A STAC Collection is represented in JSON format. Any JSON object that
contains all the required fields is a valid STAC Collection and also a valid
STAC Catalog.
Fields§
§extensions: Option<Vec<String>>A list of extension identifiers the Collection implements.
id: StringIdentifier for the Collection that is unique across the provider.
title: Option<String>A short descriptive one-line title for the Collection.
description: StringDetailed multi-line description to fully explain the Collection.
CommonMark 0.29 syntax MAY be used for rich text representation.
keywords: Option<Vec<String>>List of keywords describing the Collection.
license: StringCollection’s license(s), either a SPDX License
identifier, "various" if multiple licenses
apply or "proprietary" for all other cases.
providers: Option<Vec<Provider>>A list of providers, which may include all organizations capturing or processing the data or the hosting provider.
Providers should be listed in chronological order with the most recent provider being the last element of the list.
extent: ExtentSpatial and temporal extents.
summaries: Option<Map<String, Value>>A map of property summaries, either a set of values, a range of values or a JSON Schema.
links: Vec<Link>A list of references to other documents.
assets: HashMap<String, Asset>Dictionary of asset objects that can be downloaded, each with a unique key.
additional_fields: Map<String, Value>Additional fields not part of the Collection specification.
Implementations§
source§impl Collection
impl Collection
sourcepub fn new(id: impl ToString, description: impl ToString) -> Collection
pub fn new(id: impl ToString, description: impl ToString) -> Collection
Creates a new Collection with the given id.
Examples
use stac::Collection;
let collection = Collection::new("an-id", "a description");
assert_eq!(collection.id, "an-id");
assert_eq!(collection.description, "a description");Trait Implementations§
source§impl Assets for Collection
impl Assets for Collection
source§impl Clone for Collection
impl Clone for Collection
source§fn clone(&self) -> Collection
fn clone(&self) -> Collection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Collection
impl Debug for Collection
source§impl<'de> Deserialize<'de> for Collection
impl<'de> Deserialize<'de> for Collection
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 Extensions for Collection
impl Extensions for Collection
source§impl Href for Collection
impl Href for Collection
source§impl Links for Collection
impl Links for Collection
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§impl PartialEq<Collection> for Collection
impl PartialEq<Collection> for Collection
source§fn eq(&self, other: &Collection) -> bool
fn eq(&self, other: &Collection) -> bool
self and other values to be equal, and is used
by ==.source§impl Serialize for Collection
impl Serialize for Collection
source§impl Validate for Collection
Available on crate feature jsonschema only.
impl Validate for Collection
jsonschema only.