diff --git a/stac-api/CHANGELOG.md b/stac-api/CHANGELOG.md index dabda23c..328fbb9e 100644 --- a/stac-api/CHANGELOG.md +++ b/stac-api/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - `schemars` feature ([#177](https://github.com/gadomski/stac-rs/pull/177)) - `PartialEq` to `Filter` ([#179](https://github.com/gadomski/stac-rs/pull/179)) - `TryFrom` to go between `Items` and `GetItems` ([#179](https://github.com/gadomski/stac-rs/pull/179)) +- `Default` for `ItemCollection` ([#183](https://github.com/gadomski/stac-rs/pull/183)) ### Changed diff --git a/stac-api/src/item_collection.rs b/stac-api/src/item_collection.rs index ccc97265..b82aec9e 100644 --- a/stac-api/src/item_collection.rs +++ b/stac-api/src/item_collection.rs @@ -97,3 +97,17 @@ impl Links for ItemCollection { &mut self.links } } + +impl Default for ItemCollection { + fn default() -> Self { + ItemCollection { + r#type: "FeatureCollection".to_string(), + items: Vec::new(), + links: Vec::new(), + number_matched: None, + number_returned: None, + context: None, + additional_fields: Map::default(), + } + } +}