use-yaml 0.1.0

Lightweight YAML marker and key-value helpers for RustUse
Documentation
  • Coverage
  • 73.33%
    11 out of 15 items documented1 out of 11 items with examples
  • Size
  • Source code size: 10.28 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 363.54 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-yaml

Practical YAML utility primitives for lightweight document markers, indentation, and key-value handling.

Warning: versions below 0.3.0 are experimental and may change as the crate matures.

Example Usage

use use_yaml::{extract_yaml_key_values, is_yaml_document_start, quote_yaml_string, yaml_indent};

let values = extract_yaml_key_values("---\nname: RustUse\n  enabled: true\n...\n");

assert!(is_yaml_document_start("---"));
assert_eq!(values[0].key, "name");
assert_eq!(values[1].indent, 2);
assert_eq!(yaml_indent("    key: value"), 4);
assert_eq!(quote_yaml_string("it's ready"), "'it''s ready'");

Scope

  • document marker detection and stripping
  • list-item and indentation helpers
  • conservative mapping-style key-value splitting and extraction

Non-Goals

  • a full YAML parser
  • anchor or alias resolution
  • schema validation

License

Licensed under either of the following, at your option:

  • MIT License
  • Apache License, Version 2.0