flash_lso/types/
class_definition.rs1use super::Attribute;
2use enumset::EnumSet;
3
4#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
7pub struct ClassDefinition {
8 pub name: String,
10
11 pub attributes: EnumSet<Attribute>,
13
14 pub static_properties: Vec<String>,
16}
17
18impl Default for ClassDefinition {
19 fn default() -> Self {
20 Self {
21 name: "Object".to_string(),
22 attributes: EnumSet::empty(),
23 static_properties: Vec::new(),
24 }
25 }
26}
27
28impl ClassDefinition {
29 pub fn default_with_name(name: String) -> Self {
31 Self {
32 name,
33 attributes: EnumSet::empty(),
34 static_properties: Vec::new(),
35 }
36 }
37}