Function write

Source
pub fn write<T: Writeable>(path: impl AsRef<Path>, value: T) -> Result<()>
Expand description

Writes a STAC value to a path.

The format will be inferred from the href’s extension. If you want to specify the format, use Format::write.

§Examples

use stac::Item;

let item = Item::new("an-id");
stac_io::write("an-id.json", item).unwrap();