//! Handle to a material in the renderer's material store.
crate::slot_handle!{/// Handle to a material in the store.
////// Returned by `DeviceResources::upload_material` and edited in place with
/// `replace_material`: every item holding the handle draws the new values
/// on the next frame. A handle whose slot was freed carries a stale
/// generation and draws [`MaterialId::DEFAULT`] instead of aliasing a
/// material uploaded later into the slot.
pubstructMaterialId;}implMaterialId{/// The store's default material, `Material::default()`. Always resident and
/// never freed, so an item that names no material still draws.
pubconstDEFAULT: MaterialId = MaterialId {
index:0,
generation:0,};}implDefault forMaterialId{fndefault()->Self{Self::DEFAULT}}