pub trait Migrate:
Sized
+ Serialize
+ DeserializeOwned
+ Debug {
// Provided method
fn migrate(self, to: &Version) -> Result<Self> { ... }
}Expand description
Migrates a STAC object from one version to another.
Provided Methods§
Sourcefn migrate(self, to: &Version) -> Result<Self>
fn migrate(self, to: &Version) -> Result<Self>
Migrates this object to another version.
§Examples
use stac::{Item, Migrate, Version};
let mut item: Item = stac::read("../../spec-examples/v1.0.0/simple-item.json").unwrap();
let item = item.migrate(&Version::v1_1_0).unwrap();
assert_eq!(item.version, Version::v1_1_0);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.