dump_roblox_api/apis/dumper/
class.rs1use serde::Deserialize;
2
3#[allow(non_snake_case)]
5#[derive(Debug, Deserialize, Clone, PartialEq, Eq)]
6pub struct Class {
7 pub Members: Vec<ClassMember>,
8 pub MemoryCategory: String,
9 pub Name: String,
10 pub Superclass: String,
15 #[serde(default)]
16 pub Tags: Vec<String>,
21}
22
23impl Class {
24 pub fn is_not_browsable(&self) -> bool {
26 self.Tags.contains(&"NotBrowsable".to_string())
27 }
28 pub fn is_not_createable(&self) -> bool {
30 self.Tags.contains(&"NotCreatable".to_string())
31 }
32}
33
34#[allow(non_snake_case)]
36#[derive(Debug, Deserialize, Clone, PartialEq, Eq)]
37pub struct ClassMember {
38 #[serde(default)]
41 pub Category: String,
42 pub MemberType: String,
44 pub Name: String,
45 pub Security: serde_json::Value,
47 #[serde(default)]
49 pub Serialization: Serialization,
50 pub ThreadSafety: String,
51 #[serde(default)]
52 pub ValueType: ValueType,
55}
56
57#[allow(non_snake_case)]
58#[derive(Debug, Deserialize, Clone, PartialEq, Eq)]
59pub struct SecurityInfo {
60 pub Read: String,
61 pub Write: String,
62}
63
64#[allow(non_snake_case)]
65#[derive(Debug, Deserialize, Clone, Default, PartialEq, Eq)]
66pub struct Serialization {
67 pub CanLoad: bool,
68 pub CanSave: bool,
69}
70
71#[allow(non_snake_case)]
72#[derive(Debug, Deserialize, Clone, Default, PartialEq, Eq)]
73pub struct ValueType {
74 pub Category: String,
76 pub Name: String,
79}