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
30
31
32
33
use super::*;
pub struct EntityInfo {
id: Entity,
}
impl std::fmt::Debug for EntityInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("EntityInfo")
.field("name", &self.name())
.finish()
}
}
impl EntityInfo {
impl_world_accessor!(
EntityInfo,
Name,
WorldData,
name_data,
ValueAccessorDataReadWrite
);
pub fn name(&self) -> String {
self.name_data().get().get_data_handle().read_str()
}
}
impl_world_component!(EntityInfo);