yaml-path 0.1.0

Pure Rust implementation of YAML Path
Documentation
  • Coverage
  • 0%
    0 out of 10 items documented0 out of 0 items with examples
  • Size
  • Source code size: 22.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 281.66 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ejrh/yaml-path
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ejrh

Rust build Rust tests Rust Clippy

yaml-path is a Rust implementation of the YAML Path specification. It builds on the YAML implementation provided by the Pure-rust yaml-rust crate.

Example usage

    let docs = YamlLoader::load_from_str("hello: there").unwrap();
    let first_doc = &docs[0];
    let hello_path = Path::new("hello").unwrap();
    let results = hello_path.get_all(&first_doc).unwrap();
    assert_eq!(results.len(), 1);
    let mut results = results.into_iter();
    let first = results.next().unwrap();
    assert_eq!(*first, Yaml::String(String::from("there")));

Compatibility

yaml-path aims to follow the Python reference implementation of YAML Path. In particular, it aims to support the same path format with the same behaviour.

The library API will differ, of course, particularly as Rust imposes particular ownership and mutability constraints on data.

Internal details may echo the Python implementation in places, but will not necessarily aim to do so.

As of this writing, yaml-path is in a very nascent state and supports barely any of YAML Path. The journey is just beginning. :)