Trait LoadTexture

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

Method extensions for creating Textures from a TextureCreator

Required Methods§

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

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§