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
use crate::BigMapKey;
use naia_serde::{BitReader, BitWrite, Serde, SerdeErr};
#[derive(PartialEq, Eq, Hash, Clone, Copy)]
pub struct EntityHandle(u64);
impl BigMapKey for EntityHandle {
fn to_u64(&self) -> u64 {
self.0
}
fn from_u64(value: u64) -> Self {
EntityHandle(value)
}
}
impl Serde for EntityHandle {
fn ser(&self, _: &mut dyn BitWrite) {
panic!("shouldn't call this");
}
fn de(_: &mut BitReader) -> Result<Self, SerdeErr> {
panic!("shouldn't call this");
}
}