pub trait SimpleFormat<A: Asset> {
    type Options: Clone + Send + Sync + 'static;

    const NAME: &'static str;

    fn import(&self, bytes: Vec<u8>, options: Self::Options) -> Result<A::Data>;
}
Expand description

This is a simplified version of Format, which doesn’t give you as much freedom, but in return is simpler to implement. All SimpleFormat types automatically implement Format. This format assumes that the asset name is the full path and the asset is only contained in one file.

Required Associated Types

Options specific to the format, which are passed to import. E.g. for textures this would be stuff like mipmap levels and sampler info.

Required Associated Constants

A unique identifier for this format.

Required Methods

Produces asset data from given bytes.

Implementors