Trait sdl2::image::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>

Object Safety§

This trait is not object safe.

Implementors§