first commit
This commit is contained in:
parent
2c766354f6
commit
582aefa54a
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# What is this ?
|
||||
|
||||
Contient un bon exemple réutilisable d'implémentation d'un fichier de conf en yaml à l'aide de Serde.
|
||||
|
||||
Il y'a juste à adapter le struct AppConf aux besoins et sa fonction default().
|
@ -48,15 +48,10 @@ impl AppConf {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fn main() {
|
||||
let myconf = AppConf::default();
|
||||
myconf.to_file(&Path::new("./settings.yml"));
|
||||
//myconf == Ok(AppConf)
|
||||
let myconf = AppConf::from_file(Path::new("./settings.yml"));//.unwrap()
|
||||
dbg!(myconf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user