| Crates.io | plist-macro |
| lib.rs | plist-macro |
| version | 0.1.3 |
| created_at | 2026-01-01 04:19:42.440761+00 |
| updated_at | 2026-01-22 22:17:41.555957+00 |
| description | Macros and utilities for manipulating plists |
| homepage | |
| repository | https://github.com/jkcoxson/plist_macro |
| max_upload_size | |
| id | 2015730 |
| size | 33,147 |
Macros and utilities to make plist manipulation easy
use plist_macro::{plist, pretty_print_plist};
let hmmm = Some(true);
let flatten_me = plist!({
"a": 1,
"b": 2,
})
let value = plist!({
"code": 200,
"success": true,
"payload": {
"features": [
"serde",
"plist"
],
"homepage": null
},
"optional":? hmmm,
:< flatten_me
});
println!("{:?}", pretty_print_plist(&value));
Force into a dictionary
use plist_macro::{plist, pretty_print_dictionary};
let value = plist!(dict { // <- this makes a dictionary, not a generic value
"wow": true,
});
println!("{:?}", pretty_print_dictionary(&value));
Generic plist values
use plist_macro::{plist};
let value = plist!(1);
let value2 = plist!(true);
let value3 = plist!("hi mom");
Go crazy
MIT