neco-ast 0.1.0

zero dependency structured data access traits
Documentation
  • Coverage
  • 3.03%
    1 out of 33 items documented1 out of 22 items with examples
  • Size
  • Source code size: 8.28 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 335.95 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
  • barineco/neco-parser
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • barineco

neco-ast

日本語

zero dependency structured data access traits.

Usage

use neco_ast::{StructuredField, StructuredValue};
use std::borrow::Cow;

let value = StructuredValue::Mapping(vec![StructuredField {
    key: Cow::Borrowed("name"),
    value: StructuredValue::String(Cow::Borrowed("neco")),
}]);

assert_eq!(value.as_mapping().unwrap()[0].key, "name");

API

Type Description
StructuredValue<'a> Borrowed structured data value
StructuredNumber<'a> Number value with raw text and parsed f64 access
StructuredField<'a> Mapping field with a key and value
StructuredNode<'a> Borrowed node view over a format-specific value
StructuredDocument<'a> Borrowed document view exposing top-level nodes

License

MIT