Crates.io | ini_lib |
lib.rs | ini_lib |
version | 0.1.4 |
source | src |
created_at | 2022-11-07 10:21:15.009643 |
updated_at | 2023-02-23 12:54:27.410568 |
description | 一个简单解析ini的库,允许重名[Section] |
homepage | https://github.com/Rehtt/ini_lib_rust |
repository | https://github.com/Rehtt/ini_lib_rust |
max_upload_size | |
id | 707146 |
size | 19,256 |
一个允许重名 [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"));
0.1.4 fix
0.1.3 fix
0.1.2 fix
0.1.1 fix
0.1.0 init