Skip to main content

Texture2dDataSource

Trait Texture2dDataSource 

Source
pub trait Texture2dDataSource<'a> {
    type Data: Send + Copy + Clone + 'a;

    // Required method
    fn into_raw(self) -> RawImage2d<'a, Self::Data>;
}
Expand description

Trait that describes data for a two-dimensional texture.

Required Associated Types§

Source

type Data: Send + Copy + Clone + 'a

The type of each pixel.

Required Methods§

Source

fn into_raw(self) -> RawImage2d<'a, Self::Data>

Returns the raw representation of the data.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, P: PixelValue + Clone> Texture2dDataSource<'a> for Vec<Vec<P>>

Source§

type Data = P

Source§

fn into_raw(self) -> RawImage2d<'a, P>

Implementors§