Trait LoadTexture

Source
pub trait LoadTexture {
    // Required methods
    fn load_texture<P: AsRef<Path>>(
        &self,
        filename: P,
    ) -> Result<Texture<'_>, String>;
    fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture<'_>, String>;
}
Expand description

Method extensions for creating Textures from a TextureCreator

Required Methods§

Source

fn load_texture<P: AsRef<Path>>( &self, filename: P, ) -> Result<Texture<'_>, String>

Source

fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture<'_>, String>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§