luaur_analysis/records/
missing_properties.rs1use crate::type_aliases::type_id::TypeId;
2
3#[allow(non_camel_case_types)]
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5pub enum Context {
6 Missing,
7 Extra,
8}
9
10#[derive(Debug, Clone, PartialEq, Eq, Hash)]
11pub struct MissingProperties {
12 pub(crate) super_type: TypeId,
13 pub(crate) sub_type: TypeId,
14 pub(crate) properties: alloc::vec::Vec<alloc::string::String>,
15 pub(crate) context: Context,
16}
17
18#[allow(non_snake_case)]
19impl MissingProperties {
20 pub fn superType(&self) -> TypeId {
21 self.super_type
22 }
23
24 pub fn subType(&self) -> TypeId {
25 self.sub_type
26 }
27
28 pub fn properties(&self) -> &[alloc::string::String] {
29 &self.properties
30 }
31
32 pub fn context(&self) -> Context {
33 self.context
34 }
35}
36
37pub use Context as MissingProperties_Context;