Replies: 3 comments 1 reply
-
Yes. Simply serialize your config structure, or the entire Figment itself, to your desired format and write it out. |
Beta Was this translation helpful? Give feedback.
-
@SergioBenitez , Basically std::fs::write ..etc, after dealing with string struct/serialization. I thought the crate might have a way say state.set / state.override ('path', value). |
Beta Was this translation helpful? Give feedback.
-
It's really rather straightforward: let toml_string = toml::to_string_pretty(&figment)?;
std::fs::write("path.toml", &toml_string)?;
What is |
Beta Was this translation helpful? Give feedback.
-
been using configrs for multiple project, and now with a new project writing back to the config file is required.
configs.toml
Was wondering if this crate is able of doing so.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions