easy_gpu/assets_manager/handle.rs
1#[derive(Debug, Hash,Eq)]
2pub struct Handle<T> {
3 pub index: u32,
4 pub generation: u32,
5 pub _marker: std::marker::PhantomData<T>,
6}
7
8impl<T> Copy for Handle<T> {}
9
10impl<T> Clone for Handle<T> {
11 fn clone(&self) -> Self {
12 *self
13 }
14}
15
16impl<T> PartialEq for Handle<T> {
17 fn eq(&self, other: &Self) -> bool {
18 self.index == other.index &&
19 self.generation == other.generation
20 }
21}
22