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§
Sourcefn document<V: AsRef<str>>(&mut self, doc: V) -> &mut Self
fn document<V: AsRef<str>>(&mut self, doc: V) -> &mut Self
Queue a doc comment to be used with the nest add
call
Sourcefn add_field<K, V>(&mut self, name: K, value: V) -> Result<()>
fn add_field<K, V>(&mut self, name: K, value: V) -> Result<()>
Typed variant of add_field
only collecting the type information
Sourcefn add_meta_field<K, V>(&mut self, name: K, value: V) -> Result<()>
fn add_meta_field<K, V>(&mut self, name: K, value: V) -> Result<()>
Typed variant of add_meta_field
only collecting the type information
Sourcefn add_module<V>(&mut self, name: impl AsRef<str>) -> Result<()>where
V: TypedModule,
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.