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
34
35
36
37
38
39
40
41
42
43
use bytes::BytesMut;
use super::{general_appearance_record::GeneralAppearanceRecord, specific_appearance_record::SpecificAppearanceRecord};
#[derive(Copy, Clone, Debug,)]
pub struct EntityAppearanceRecord {
pub general_appearance_record: GeneralAppearanceRecord,
pub specific_appearance_record: SpecificAppearanceRecord
}
impl EntityAppearanceRecord {
pub fn new(general_appearance_record: GeneralAppearanceRecord, specific_appearance_record: SpecificAppearanceRecord) -> Self {
EntityAppearanceRecord {
general_appearance_record,
specific_appearance_record
}
}
pub fn default() -> Self {
EntityAppearanceRecord {
general_appearance_record: GeneralAppearanceRecord::default(),
specific_appearance_record: SpecificAppearanceRecord::default()
}
}
pub fn serialize(&self, buf: &mut BytesMut) {
self.general_appearance_record.serialize(buf);
self.specific_appearance_record.serialize(buf);
}
}