plist-macro

Crates.ioplist-macro
lib.rsplist-macro
version0.1.3
created_at2026-01-01 04:19:42.440761+00
updated_at2026-01-22 22:17:41.555957+00
descriptionMacros and utilities for manipulating plists
homepage
repositoryhttps://github.com/jkcoxson/plist_macro
max_upload_size
id2015730
size33,147
Jackson Coxson (jkcoxson)

documentation

https://docs.rs/idevice

README

plist_macro

Macros and utilities to make plist manipulation easy

General overview/usage

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

License

MIT

Commit count: 7

cargo fmt