pub trait InstanceCollector<'lua> {
    // Required methods
    fn add_instance<P, T, F>(
        &mut self,
        global_name: P,
        instance: F
    ) -> Result<&mut Self>
       where P: Into<Cow<'static, str>>,
             T: ToTypename + ToLua<'lua>,
             F: FnOnce(&'lua Lua) -> Result<T>;
    fn document_instance(&mut self, doc: &'static str) -> &mut Self;
}
Expand description

collects every instance that a type has

Required Methods§

source

fn add_instance<P, T, F>( &mut self, global_name: P, instance: F ) -> Result<&mut Self>
where P: Into<Cow<'static, str>>, T: ToTypename + ToLua<'lua>, F: FnOnce(&'lua Lua) -> Result<T>,

adds an instance

source

fn document_instance(&mut self, doc: &'static str) -> &mut Self

Adds documentation to the next global instance

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'lua> InstanceCollector<'lua> for (Table<'lua>, &'lua Lua)

source§

fn add_instance<P, T, F>( &mut self, global_name: P, instance: F ) -> Result<&mut Self>
where P: Into<Cow<'static, str>>, T: ToTypename + ToLua<'lua>, F: FnOnce(&'lua Lua) -> Result<T>,

source§

fn document_instance(&mut self, _: &'static str) -> &mut Self

Implementors§