pub fn material<'a>(
        &self,
        materials: &'a [crate::PbrMaterial],
    ) -> Option<&'a crate::PbrMaterial> {
        materials
            .iter()
            .position(|mat| Some(&mat.name) == self.material_name.as_ref())
            .map(|index| &materials[index])
    }
///
/// Returns the material for this mesh in the given list of materials. Returns `None` if no suitable material can be found.
///
Returns the material for this mesh in the given list of materials. Returns `None` if no suitable material can be found.
Returns the material for this mesh in the given list of materials . Returns ` None ` if no suitable material can be found .
pub fn material<'a>(
        &self,
        materials: &'a [crate::PbrMaterial],
    ) -> Option<&'a crate::PbrMaterial> {
        materials
            .iter()
            .position(|mat| Some(&mat.name) == self.material_name.as_ref())
            .map(|index| &materials[index])
    }
pub fn material < ' a > ( & self , materials : & ' a [ crate :: PbrMaterial ] , ) -> Option < & ' a crate :: PbrMaterial > { materials . iter ( ) . position ( | mat | Some ( & mat . name ) == self . material_name . as_ref ( ) ) . map ( | index | & materials [ index ] ) }
Returns the material for this mesh in the given list of materials.
Returns the material for this mesh in the given list of materials .
&self
materials
&'a [crate::PbrMaterial]
&self
materials
&'a [crate::PbrMaterial]