macro_rules! pack_items {
(
$(
$path:expr => $bytes:expr
$(; ext=$ext:expr)?
$(; type=$type_path:expr)?
),* $(,)?
) => { ... };
}Expand description
Builds a Vec<PackItem> from a list of entries. Each entry specifies a
path and its raw contents; optional query-style suffixes allow specifying an
explicit original extension or a type path as well.
Examples:
ⓘ
use bevy_dlc::pack_items;
let items = pack_items![
"note.txt" => b"hello",
// override the extension that would otherwise be inferred
"other" => b"data"; ext="bin",
// supply a type path to help the runtime choose a loader (optional)
"model" => b"objdata"; type="bevy::gltf::Gltf",
];