Trait ToJsonPath

Source
pub trait ToJsonPath: ToJson {
    // Provided method
    fn to_json_path(&self, path: impl AsRef<Path>, pretty: bool) -> Result<()> { ... }
}

Provided Methods§

Source

fn to_json_path(&self, path: impl AsRef<Path>, pretty: bool) -> Result<()>

Writes a value to a path as JSON.

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

Item::new("an-id").to_json_path("an-id.json", true).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§