cfha/conf.rs
1use std::{
2 collections::HashMap,
3 net::{Ipv4Addr, Ipv6Addr},
4};
5
6use aok::Result;
7
8pub struct Host {
9 pub host: String,
10 pub ipv4: Vec<(String, Ipv4Addr)>,
11 pub ipv6: Vec<(String, Ipv6Addr)>,
12}
13
14pub fn yml(conf: &str) -> Result<()> {
15 let conf: HashMap<String, HashMap<String, Vec<String>>> = serde_yaml::from_str(conf)?;
16 println!("{:?}", conf);
17 // for (k, v) in conf {}
18 Ok(())
19}