mabel-eno 0.4.4

Eno parsing library for Rust
Documentation
  • Coverage
  • 4.35%
    3 out of 69 items documented0 out of 4 items with examples
  • Size
  • Source code size: 165.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 8.49 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fawni

enolib

A feature-complete, pure rust parser for Eno.

Note on packaging: Not yet released as a crate, but can be pulled in via git regardless.

Note on stability: The parsing itself is quite stable, the API is currently still in flux though.

Getting started

Add the library to the dependencies in your Cargo.toml:

[dependencies]
...
enolib = { git = "https://codeberg.org/simonrepp/enolib-rs" }

Some example code to get you started:

use enolib;

fn main() {
    let result = my_parse("greeting: hello");
    
    dbg!(result); // Ok("hello")
}

fn my_parse(input: &str) -> Result<String, enolib::Error> {
    enolib::parse(input)?
      .field("greeting")?
      .required_value()
}

Until there is more documentation, I recommend you clone the repository and in its root run this to generate and access the documentation in your browser:

cargo doc --no-deps --open

From there go to the documentation for parse and traverse the documentation for what it returns downwards, until you are at the bottom of the tree, where you have everything you need to parse any eno document!