Struct stac::Collection
source · [−]pub struct Collection {Show 14 fields
pub type: String,
pub version: String,
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: Option<HashMap<String, Asset>>,
pub additional_fields: Map<String, Value>,
}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
type: StringMust be set to "Collection" to be a valid Collection.
version: StringThe STAC version the Collection implements.
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: Option<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
sourceimpl Collection
impl Collection
sourcepub fn new(id: impl ToString) -> Collection
pub fn new(id: impl ToString) -> Collection
Creates a new Collection with the given id.
Examples
use stac::Collection;
let collection = Collection::new("an-id");
assert_eq!(collection.id, "an-id");Trait Implementations
sourceimpl Clone for Collection
impl Clone for Collection
sourcefn clone(&self) -> Collection
fn clone(&self) -> Collection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Collection
impl Debug for Collection
sourceimpl<'de> Deserialize<'de> for Collection
impl<'de> Deserialize<'de> for Collection
sourcefn 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
sourceimpl From<Collection> for Object
impl From<Collection> for Object
sourcefn from(collection: Collection) -> Object
fn from(collection: Collection) -> Object
Performs the conversion.
sourceimpl From<Collection> for ObjectHrefTuple
impl From<Collection> for ObjectHrefTuple
sourcefn from(collection: Collection) -> ObjectHrefTuple
fn from(collection: Collection) -> ObjectHrefTuple
Performs the conversion.
sourceimpl PartialEq<Collection> for Collection
impl PartialEq<Collection> for Collection
sourcefn eq(&self, other: &Collection) -> bool
fn eq(&self, other: &Collection) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Collection) -> bool
fn ne(&self, other: &Collection) -> bool
This method tests for !=.
sourceimpl Serialize for Collection
impl Serialize for Collection
sourceimpl TryFrom<Object> for Collection
impl TryFrom<Object> for Collection
impl StructuralPartialEq for Collection
Auto Trait Implementations
impl RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl UnwindSafe for Collection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more