Trait FromJsonPath

Source
pub trait FromJsonPath: FromJson + SelfHref {
    // Provided method
    fn from_json_path(path: impl AsRef<Path>) -> Result<Self> { ... }
}
Expand description

Create a STAC object from JSON.

Provided Methods§

Source

fn from_json_path(path: impl AsRef<Path>) -> Result<Self>

Reads JSON data from a file.

§Examples
use stac::Item;
use stac_io::FromJsonPath;

let item = Item::from_json_path("examples/simple-item.json").unwrap();

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.

Implementors§