ini_lib

一个简单解析ini的库,允许重名[Section]

2 releases

0.1.4 Feb 23, 2023
0.1.3 Nov 8, 2022
0.1.2 Nov 8, 2022
0.1.1 Nov 8, 2022
0.1.0 Nov 7, 2022


Used in wireguard_tools_rehtt

MIT license

7KB
141 lines

一个允许重名 [Section] 解析ini的简单库

use ini_lib::ini_str;
let a = "[Interface]
Address = 10.1.1.2/24
PrivateKey = keykeykeykey
ListenPort = 51820
DNS = 8.8.8.8
[Peer]
PublicKey = keykeykeykeykeykeykeykey
Endpoint = 1.1.1.1:51820
AllowedIPs = 10.1.1.5/32
[Peer]
PublicKey = keykeykeykeykeykeykeykeykeykeykeykey
PresharedKey = keykeykeykeykeykeykeykeykeykeykeykeykeykeykeykey
Endpoint = 2.2.2.2:51820
AllowedIPs = 10.13.13.0/24
PersistentKeepalive = 25";
println!("{:#?}",ini_str!(a));
 use ini_lib::ini_file;
 println!("{:#?}",ini_file!("test.ini"));

Record

0.1.4 fix

0.1.3 fix

0.1.2 fix

0.1.1 fix

0.1.0 init

No runtime deps