pub struct Collection {Show 14 fields
pub type_: String,
pub stac_version: String,
pub stac_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<HashMap<String, Value>>,
pub links: Vec<Link>,
pub assets: Option<HashMap<String, Asset>>,
pub additional_fields: HashMap<String, Value>,
}Expand description
A STAC Collection provides additional metadata about a set of Items.
Fields§
§type_: StringType must be “Collection”.
stac_version: StringSTAC version.
stac_extensions: Option<Vec<String>>List of extensions used in the collection.
id: StringUnique identifier for the collection.
title: Option<String>Title of the collection.
description: StringDescription of the collection.
keywords: Option<Vec<String>>Keywords describing the collection.
license: StringLicense of the collection (SPDX license identifier or URL).
providers: Option<Vec<Provider>>Providers of the collection.
extent: ExtentExtent of the collection.
summaries: Option<HashMap<String, Value>>Summaries of properties in the collection.
links: Vec<Link>Links to other resources.
assets: Option<HashMap<String, Asset>>Assets associated with this collection.
additional_fields: HashMap<String, Value>Additional fields for extensions.
Implementations§
Source§impl Collection
impl Collection
Sourcepub fn new(
id: impl Into<String>,
description: impl Into<String>,
license: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, description: impl Into<String>, license: impl Into<String>, ) -> Self
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Sourcepub fn with_keywords(self, keywords: Vec<String>) -> Self
pub fn with_keywords(self, keywords: Vec<String>) -> Self
Sourcepub fn add_provider(self, provider: Provider) -> Self
pub fn add_provider(self, provider: Provider) -> Self
Sourcepub fn with_spatial_extent(self, bbox: Vec<f64>) -> Self
pub fn with_spatial_extent(self, bbox: Vec<f64>) -> Self
Sourcepub fn with_temporal_extent(
self,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
) -> Self
pub fn with_temporal_extent( self, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, ) -> Self
Sourcepub fn add_extension(self, extension: impl Into<String>) -> Self
pub fn add_extension(self, extension: impl Into<String>) -> Self
Sourcepub fn add_summary(self, key: impl Into<String>, value: Value) -> Self
pub fn add_summary(self, key: impl Into<String>, value: Value) -> Self
Sourcepub fn find_links(&self, rel: &str) -> impl Iterator<Item = &Link>
pub fn find_links(&self, rel: &str) -> impl Iterator<Item = &Link>
Trait Implementations§
Source§impl Clone for Collection
impl Clone for Collection
Source§fn clone(&self) -> Collection
fn clone(&self) -> Collection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Collection
impl PartialEq for Collection
Source§impl Serialize for Collection
impl Serialize for Collection
impl StructuralPartialEq for Collection
Auto Trait Implementations§
impl Freeze for Collection
impl RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl UnsafeUnpin for Collection
impl UnwindSafe for Collection
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