Expand description
§jsonnet bindings for Rust
This library contains bindings to the jsonnet C library, a template language that generates JSON and YAML.
Almost all interaction with this module will be via the
JsonnetVm
type.
§Examples
use jsonnet::JsonnetVm;
let mut vm = JsonnetVm::new();
let output = vm.evaluate_snippet("example", "'Hello ' + 'World'").unwrap();
assert_eq!(output.to_string(), "\"Hello World\"\n");
Structs§
- Error
- Error returned from jsonnet routines on failure.
- Eval
List - Result from “stream” eval methods.
- Eval
List Iter - Iterator returned from “stream” eval methods.
- EvalMap
- Result from “multi” eval methods.
- Eval
MapIter - Iterator returned from “multi” eval methods.
- JsonVal
- Rust wrapper for borrowed libjsonnet JSON values.
- Json
Value - Rust wrapper for owned libjsonnet JSON values.
- Jsonnet
String - Rust wrapper for libjsonnet string values.
- Jsonnet
Vm - Jsonnet virtual machine context.
Enums§
- FmtComment
- Comment style
- FmtString
- String literal style
Functions§
- jsonnet_
version - Return the version string of the Jsonnet interpreter. Conforms to semantic versioning.