nondestructive

github crates.io docs.rs build status

Nondestructive editing over various file formats.

This project is as of yet, incomplete!


Examples

```rust use nondestructive::yaml;

let mut doc = yaml::from_bytes(r#" number1: 10 number2: 20 table: inner: 400 string3: "I am a quoted string!" "#)?;

let mut root = doc.rootmut(); let mut root = root.astablemut().okor("missing root table")?; root.getmut("number2").okor("missing inner table")?.setu32(30); root.getmut("string3").okor("missing inner table")?.setstring("i-am-a-bare-string");

asserteq! { doc.tostring(), r#" number1: 10 number2: 30 table: inner: 400 string3: i-am-a-bare-string "# };

```