use-toml 0.1.0

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

use-toml

Practical TOML utility primitives for lightweight table, key, and string handling.

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

Example Usage

use use_toml::{extract_toml_key_values, extract_toml_tables, quote_toml_string};

let tables = extract_toml_tables("[package]\nname = \"use-data\"\n");
let values = extract_toml_key_values("name = \"use-data\"\npublish = false\n");

assert_eq!(tables[0].name, "package");
assert_eq!(values[0].key, "name");
assert_eq!(quote_toml_string("line\nbreak"), "\"line\\nbreak\"");

Scope

  • table and array-table detection
  • conservative key-value splitting without a full TOML parser
  • small string quoting and unquoting helpers

Non-Goals

  • a full TOML parser
  • Cargo-specific manifest logic
  • full TOML type-system support

License

Licensed under either of the following, at your option:

  • MIT License
  • Apache License, Version 2.0