Skip to main content

LoadResource

Trait LoadResource 

Source
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§

Source

fn load_resource( &self, location: &ResourceLocation<'_>, ) -> Result<Vec<u8>, Error>

Returns the raw bytes of the resource referenced by the given ResourceLocation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§