Skip to main content

RaylibMaterial

Trait RaylibMaterial 

Source
pub trait RaylibMaterial: AsRef<Material> + AsMut<Material> {
    // Provided methods
    fn shader(&self) -> &WeakShader { ... }
    fn shader_mut(&mut self) -> &mut WeakShader { ... }
    fn maps(&self) -> &[MaterialMap] { ... }
    fn maps_mut(&mut self) -> &mut [MaterialMap] { ... }
    fn set_material_texture(
        &mut self,
        map_type: MaterialMapIndex,
        texture: impl AsRef<Texture>,
    ) { ... }
    fn is_material_valid(&mut self) -> bool { ... }
}

Provided Methods§

Source

fn shader(&self) -> &WeakShader

Source

fn shader_mut(&mut self) -> &mut WeakShader

Source

fn maps(&self) -> &[MaterialMap]

Source

fn maps_mut(&mut self) -> &mut [MaterialMap]

Source

fn set_material_texture( &mut self, map_type: MaterialMapIndex, texture: impl AsRef<Texture>, )

Source

fn is_material_valid(&mut self) -> bool

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§