1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive( Debug, PartialEq, Eq, Hash)] pub struct Handle<T> { pub index: u32, pub generation: u32, pub _marker: std::marker::PhantomData<T>, } impl<T> Copy for Handle<T> {} impl<T> Clone for Handle<T> { fn clone(&self) -> Self { *self } }