tanzim-parse
Second stage of the tanzim pipeline: deserializes raw bytes into typed, source-located value trees.
The Deserialize trait
Implement [Deserialize] to add a new configuration format. Every node in the returned
[LocatedValue] tree should carry a Location pointing to the source file and line for
accurate error messages.
Built-in parsers
| Type | Feature | Formats |
|---|---|---|
Env |
env |
env |
Json |
json |
json |
Yaml |
yaml |
yml, yaml |
Toml |
toml |
toml |
closure::Closure |
— | custom |
Example
use ;
Features
| Feature | Enables |
|---|---|
env |
env format parser (KEY=VALUE lines) |
json |
JSON parser with source spans |
yaml |
YAML parser with line numbers |
toml |
TOML parser with source spans |
logging |
emit log messages via the log crate |
tracing |
emit trace spans via the tracing crate |
full |
env + json + yaml + toml |
Default features: logging, env.
Relations
- Consumes
Payloadfromtanzim-load. - Depends on
tanzim-valueforLocatedValue,Value,Map,Error. - Produces
LocatedValuetrees consumed bytanzim-merge. - Full pipeline wired in
tanzim.