luaur_analysis/records/
cannot_extend_table.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 Property,
7 Indexer,
8 Metatable,
9}
10
11#[derive(Debug, Clone, PartialEq, Eq, Hash)]
12pub struct CannotExtendTable {
13 pub(crate) table_type: TypeId,
14 pub(crate) context: Context,
15 pub(crate) prop: alloc::string::String,
16}
17
18#[allow(non_snake_case)]
19impl CannotExtendTable {
20 pub fn tableType(&self) -> TypeId {
21 self.table_type
22 }
23
24 pub fn context(&self) -> Context {
25 self.context
26 }
27
28 pub fn prop(&self) -> &str {
29 &self.prop
30 }
31}
32
33pub use Context as CannotExtendTable_Context;