pub trait Part:
Hash
+ Eq
+ Clone
+ Debug {
// Required methods
fn from_name(name: &str) -> Option<Self>;
fn all() -> Vec<Self>;
fn index(&self) -> u32;
}Expand description
A name for one repaintable part of a mesh.
Required if you want to repaint one part of a mesh and leave the rest:
derive it on an enum whose variants are the loaded mesh’s material
names, and name that enum where the mesh implements
Mesh.
Required Methods§
Sourcefn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
The part the material name resolves to, or None to leave that
material as authored, which no draw repaints on its own.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".