assets
;
pub type JSONAssetManager<P> = ;
pub struct JSONAsset(serde_json::Value);
impl Asset for JSONAsset {
type Data = JSONAsset;
}
impl AssetFormat for JSONAsset {
type Input = Vec<u8>;
type Output = JSONAsset;
type Error = serde_json::Error;
type Options = ();
#[inline]
fn format(bytes: Self::Input, _: Self::Options) -> Result<Self::Output, Self::Error> {
let data: serde_json::Value = serde_json::from_slice(&*bytes)?;
Ok(JSONAsset(data))
}
}
pub type JSONAssetManager<P> = AssetManager<JSONAsset, FileLoader<P>, CpuPool>;