8 releases
0.1.7 | Mar 15, 2023 |
---|---|
0.1.6 | Mar 4, 2022 |
0.1.0 | Jan 23, 2022 |
#1516 in Parser implementations
29 downloads per month
15KB
245 lines
qua_format
Parse .qua files into structs, based on the .qua format of
Quaver. The .qua file format uses the YAML format, so
serde_yaml
is used for parsing.
Example
use qua_format::Qua;
use std::fs::File;
let path = "123.qua";
let mut qua = Qua::from_file(path).unwrap();
qua.title = "Never Gonna Give You Up".to_string();
let new_file = File::create("test.qua").unwrap();
qua.to_writer(new_file).unwrap();
lib.rs
:
Parse .qua files into structs
The .qua file format uses the YAML format, so serde_yaml is used for parsing.
Examples
use qua_format::Qua;
use std::fs::File;
let path = "123.qua";
let mut qua = Qua::from_file(path).expect("Could not parse qua file");
qua.title = "Never Gonna Give You Up".to_string();
let new_file = File::create("test.qua").expect("Could not create new file");
qua.to_writer(new_file).expect("Could not write to file");
Dependencies
~1.9–2.6MB
~54K SLoC