Trait libre_pvz_resources::loader::AssetFormat

source ·
pub trait AssetFormat: Copy + Send + Sync + 'static {
    // Required methods
    fn get_extension(self, extensions: AssetExtensions) -> StrList;
    fn load_raw<T: Decode + DeserializeOwned>(self, src: &[u8]) -> Result<T>;
}
Expand description

Frontend asset format.

Required Methods§

source

fn get_extension(self, extensions: AssetExtensions) -> StrList

Get the extensions list.

source

fn load_raw<T: Decode + DeserializeOwned>(self, src: &[u8]) -> Result<T>

Load from raw bytes to intermediate representation.

Object Safety§

This trait is not object safe.

Implementors§