KFL
- Nominal Typing
- Trait-Based
- Two-Level
- Decode-Encode Dual
- Literal
A KDL file format parser with great error reporting and convenient derive macros.
About KDL
To give you some background on the KDL format. Here is a small example:
foo 1 "three" key="val" {
bar
(role)baz 1 2
}
Here is what are annotations for all the datum as described by the specification and this guide:
foo 1 "three" key="val" { ╮
─┬─ ┬ ───┬─── ────┬──── │
│ │ │ ╰───── property (can be multiple) │
│ │ │ │
│ ╰────┴────────────── arguments │
│ │
╰── node name ├─ node "foo", with
│ "bar" and "baz"
bar │ being children
(role)baz 1 2 │
──┬─ │
╰────── type name for node named "baz" │
} ╯
Usage
Most common usage of this library is using derive and [decode] or [decode_children] function:
use ;
use PathBuf;
use Uri;
#
License
Licensed under either of
- Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.