Macro implementation for RSCONFIG
```rust
struct TestConfig {
test: bool
}
impl YamlConfig for TestConfig {
fn fromyaml(yaml: Vec
Ok(())
}
} impl JsonConfig for TestConfig { fn fromjson(val: Value) -> Self { Self { test: val["test"].asbool().unwrap() } } fn savejson(&self, path: &str) -> io::Result<()> { // convert to json pretty format and save let mut m: HashMap<&str, Value> = HashMap::new(); m.insert("test", Value::from(self.test)); let data = serdejson::tostringpretty(&m).unwrap(); fs::write(path, data).unwrap();
Ok(())
}
} ```