pub trait Extension: Serialize + DeserializeOwned {
const IDENTIFIER: &'static str;
const PREFIX: &'static str;
// Provided method
fn identifier_prefix() -> &'static str { ... }
}
Expand description
A trait implemented by extensions.
So far, all extensions are assumed to live in under https://stac-extensions.github.io domain.
Required Associated Constants§
Sourceconst IDENTIFIER: &'static str
const IDENTIFIER: &'static str
The schema URI.
Provided Methods§
Sourcefn identifier_prefix() -> &'static str
fn identifier_prefix() -> &'static str
Returns everything from the identifier up until the version.
§Examples
use stac_extensions::{Raster, Extension};
assert_eq!(Raster::identifier_prefix(), "https://stac-extensions.github.io/raster/");
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.