Trait CreateTexture

Source
pub trait CreateTexture<F>: Sized + ImageSize {
    type Error;

    // Required method
    fn create<S>(
        factory: &mut F,
        format: Format,
        memory: &[u8],
        size: S,
        settings: &TextureSettings,
    ) -> Result<Self, Self::Error>
       where S: Into<[u32; 2]>;
}
Expand description

Implemented by textures for creation.

Required Associated Types§

Source

type Error

The error when creating texture.

Required Methods§

Source

fn create<S>( factory: &mut F, format: Format, memory: &[u8], size: S, settings: &TextureSettings, ) -> Result<Self, Self::Error>
where S: Into<[u32; 2]>,

Create texture from memory.

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§