Trait mlua_extras::typed::TypedUserData
source · pub trait TypedUserData: Sized {
// Provided methods
fn add_documentation<F: TypedDataDocumentation<Self>>(docs: &mut F) { ... }
fn add_methods<'lua, T: TypedDataMethods<'lua, Self>>(methods: &mut T) { ... }
fn add_fields<'lua, F: TypedDataFields<'lua, Self>>(fields: &mut F) { ... }
}
Expand description
Typed variant of UserData
Provided Methods§
sourcefn add_documentation<F: TypedDataDocumentation<Self>>(docs: &mut F)
fn add_documentation<F: TypedDataDocumentation<Self>>(docs: &mut F)
Add documentation to the type itself
sourcefn add_methods<'lua, T: TypedDataMethods<'lua, Self>>(methods: &mut T)
fn add_methods<'lua, T: TypedDataMethods<'lua, Self>>(methods: &mut T)
same as UserData::add_methods. Refer to its documentation on how to use it.
only difference is that it takes a TypedDataMethods, which is the typed version of UserDataMethods
sourcefn add_fields<'lua, F: TypedDataFields<'lua, Self>>(fields: &mut F)
fn add_fields<'lua, F: TypedDataFields<'lua, Self>>(fields: &mut F)
same as UserData::add_fields. Refer to its documentation on how to use it.
only difference is that it takes a TypedDataFields, which is the typed version of UserDataFields
Object Safety§
This trait is not object safe.