pub trait ToNdjsonPath: ToNdjson {
// Provided method
fn to_ndjson_path(&self, path: impl AsRef<Path>) -> Result<()> { ... }
}
Expand description
Write a STAC object to newline-delimited JSON.
Provided Methods§
Sourcefn to_ndjson_path(&self, path: impl AsRef<Path>) -> Result<()>
fn to_ndjson_path(&self, path: impl AsRef<Path>) -> Result<()>
Writes a value to a path as newline-delimited JSON.
§Examples
use stac::{ItemCollection, Item};
use stac_io::ToNdjsonPath;
let item_collection: ItemCollection = vec![Item::new("a"), Item::new("b")].into();
item_collection.to_ndjson_path("items.ndjson").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.