pub fn main() {
// There should be either:
// - a file named `config.toml` in the current directory;
// - a path passed to `std::env::args().nth(1)`.
let config: Config = get_config().unwrap();
println!("{:?}", config);
}
// `Deserialize` is required by `cargo add serde --features derive`
#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
struct Config {
hello: String,
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Banyc/get_config
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
crate
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published