pub struct LuaClass {
pub name: String,
pub methods: Vec<LuaFunction>,
pub index: Option<LuaExpr>,
pub newindex: Option<LuaExpr>,
pub tostring_body: Option<Vec<LuaStmt>>,
}Expand description
A Lua class emulated via metatables.
Fields§
§name: StringClass name
methods: Vec<LuaFunction>Methods (not including new)
index: Option<LuaExpr>__index implementation (default: self-reference)
newindex: Option<LuaExpr>__newindex implementation
tostring_body: Option<Vec<LuaStmt>>__tostring implementation body
Implementations§
Trait Implementations§
impl StructuralPartialEq for LuaClass
Auto Trait Implementations§
impl Freeze for LuaClass
impl RefUnwindSafe for LuaClass
impl Send for LuaClass
impl Sync for LuaClass
impl Unpin for LuaClass
impl UnsafeUnpin for LuaClass
impl UnwindSafe for LuaClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more