Skip to main content

TypedUserData

Trait TypedUserData 

Source
pub trait TypedUserData: Sized {
    // Provided methods
    fn add_documentation<F: TypedDataDocumentation<Self>>(docs: &mut F) { ... }
    fn add_methods<T: TypedDataMethods<Self>>(methods: &mut T) { ... }
    fn add_fields<F: TypedDataFields<Self>>(fields: &mut F) { ... }
}
Expand description

Typed variant of mlua::UserData

Provided Methods§

Source

fn add_documentation<F: TypedDataDocumentation<Self>>(docs: &mut F)

Add documentation to the type itself

Source

fn add_methods<T: TypedDataMethods<Self>>(methods: &mut T)

same as mlua::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 mlua::UserDataMethods

Source

fn add_fields<F: TypedDataFields<Self>>(fields: &mut F)

same as mlua::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 mlua::UserDataFields

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§