tini
tini copied to clipboard
Add comment to Ini structure
This code (example syntax)
let ini = Ini::new()
.add_comment("This is comment before section")
.section("params")
.add_comment("This is comment before item")
.item("foo", 3.14)
.item_with_comment("bar", 2.71, "inline comment");
generate (after serialization)
; This is comment before section
[params]
; This is comment before item
foo = 3.14
bar = 2.71 ; inline comment