Macro libre_pvz_resources::asset_ext

source ·
macro_rules! asset_ext {
    ($ext:literal) => { ... };
}
Expand description

Generate proper values for AssetExtensions. Always prefer this macro instead of manually constructing AssetExtensions values so that the program behaviour is consistent.

use libre_pvz_resources::loader::AssetExtensions;
assert_eq!(asset_ext!("anim"), AssetExtensions {
    yaml: &["anim.yaml", "anim.yml"],
    json: &["anim.json"],
    bin: &["anim.bin"],
});