pub trait LoadResource {
// Required method
fn load_resource(
&self,
location: &ResourceLocation<'_>,
) -> Result<Vec<u8>, Error>;
}Expand description
Indicates that a type can load provide the raw data of resources.
Required Methods§
Sourcefn load_resource(
&self,
location: &ResourceLocation<'_>,
) -> Result<Vec<u8>, Error>
fn load_resource( &self, location: &ResourceLocation<'_>, ) -> Result<Vec<u8>, Error>
Returns the raw bytes of the resource referenced by the given
ResourceLocation.