Trait TypedModuleFields

Source
pub trait TypedModuleFields<'lua> {
    // Required methods
    fn document<V: AsRef<str>>(&mut self, doc: V) -> &mut Self;
    fn add_field<K, V>(&mut self, name: K, value: V) -> Result<()>
       where K: AsRef<str>,
             V: IntoLua<'lua> + Typed;
    fn add_meta_field<K, V>(&mut self, name: K, value: V) -> Result<()>
       where K: AsRef<str>,
             V: IntoLua<'lua> + Typed;
    fn add_module<V>(&mut self, name: impl AsRef<str>) -> Result<()>
       where V: TypedModule;
}
Expand description

Typed variant of ModuleFields

Required Methods§

Source

fn document<V: AsRef<str>>(&mut self, doc: V) -> &mut Self

Queue a doc comment to be used with the nest add call

Source

fn add_field<K, V>(&mut self, name: K, value: V) -> Result<()>
where K: AsRef<str>, V: IntoLua<'lua> + Typed,

Typed variant of add_field only collecting the type information

Source

fn add_meta_field<K, V>(&mut self, name: K, value: V) -> Result<()>
where K: AsRef<str>, V: IntoLua<'lua> + Typed,

Typed variant of add_meta_field only collecting the type information

Source

fn add_module<V>(&mut self, name: impl AsRef<str>) -> Result<()>
where V: TypedModule,

Typed variant of add_module only collecting the type information

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§