1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
use std::fmt::Debug;
use std::hash::Hash;
/// Collection of traits that make something useful as an id for programs, shaders, uniforms, etc.
pub trait Id: 'static + Hash + PartialEq + Eq + Clone + Debug + Default {}
impl Id for String {}
impl Id for &'static str {}
impl Id for u8 {}
impl Id for u16 {}
impl Id for u32 {}
impl Id for u64 {}
impl Id for u128 {}
impl Id for i8 {}
impl Id for i16 {}
impl Id for i32 {}
impl Id for i64 {}
impl Id for i128 {}