ExtendModule

Trait ExtendModule 

Source
pub trait ExtendModule<'lua> {
    // Required method
    fn extend<M: Module>(&mut self, lua: &'lua Lua) -> Result<()>;
}
Expand description

Extend the contents of a table (module) with the contents of a Module

Instead of creating a new table when initializing and calling Module it will use the given parent as the source to add it’s fields, functions, and methods to.

Required Methods§

Source

fn extend<M: Module>(&mut self, lua: &'lua Lua) -> Result<()>

Extend the current content with the contents of a Module

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.

Implementations on Foreign Types§

Source§

impl<'lua> ExtendModule<'lua> for Table<'lua>

Source§

fn extend<M: Module>(&mut self, lua: &'lua Lua) -> Result<()>

Implementors§