Trait ToNdjsonPath

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl ToNdjsonPath for Value

Source§

fn to_ndjson_path(&self, path: impl AsRef<Path>) -> Result<()>

Source§

impl ToNdjsonPath for Value

Source§

fn to_ndjson_path(&self, path: impl AsRef<Path>) -> Result<()>

Source§

impl ToNdjsonPath for Catalog

Source§

impl ToNdjsonPath for Collection

Source§

impl ToNdjsonPath for Item

Source§

impl ToNdjsonPath for ItemCollection

Source§

fn to_ndjson_path(&self, path: impl AsRef<Path>) -> Result<()>

Implementors§