Struct tealr::TypeGenerator [−][src]
pub struct TypeGenerator { pub is_user_data: bool, pub type_name: Cow<'static, str>, pub fields: Vec<(Cow<'static, str>, Cow<'static, str>)>, pub methods: Vec<ExportedFunction>, pub mut_methods: Vec<ExportedFunction>, pub functions: Vec<ExportedFunction>, pub mut_functions: Vec<ExportedFunction>, pub meta_method: Vec<ExportedFunction>, pub meta_method_mut: Vec<ExportedFunction>, pub meta_function: Vec<ExportedFunction>, pub meta_function_mut: Vec<ExportedFunction>, }
Expand description
This struct collects all the information needed to create the .d.tl file for your type.
Fields
is_user_data: bool
Represents if the type is UserData
type_name: Cow<'static, str>
The name of the type in teal
fields: Vec<(Cow<'static, str>, Cow<'static, str>)>
The exposed fields and their types
methods: Vec<ExportedFunction>
exported methods
mut_methods: Vec<ExportedFunction>
exported methods that mutate something
functions: Vec<ExportedFunction>
exported functions
mut_functions: Vec<ExportedFunction>
exported functions that mutate something
meta_method: Vec<ExportedFunction>
exported meta_methods
meta_method_mut: Vec<ExportedFunction>
exported meta_methods that mutate something
meta_function: Vec<ExportedFunction>
exported meta functions
meta_function_mut: Vec<ExportedFunction>
exported meta functions that mutate something
Trait Implementations
impl<'lua, T> TealDataMethods<'lua, T> for TypeGenerator where
T: 'static + TealDataR + UserDataR,
[src]
impl<'lua, T> TealDataMethods<'lua, T> for TypeGenerator where
T: 'static + TealDataR + UserDataR,
[src]fn add_method<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + Fn(Context<'lua>, &T, A) -> ResultR<R>,
[src]
fn add_method<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + Fn(Context<'lua>, &T, A) -> ResultR<R>,
[src]Exposes a method to lua
fn add_method_mut<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + FnMut(Context<'lua>, &mut T, A) -> ResultR<R>,
[src]
fn add_method_mut<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + FnMut(Context<'lua>, &mut T, A) -> ResultR<R>,
[src]Exposes a method to lua that has a mutable reference to Self
fn add_function<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + Fn(Context<'lua>, A) -> ResultR<R>,
[src]
fn add_function<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + Fn(Context<'lua>, A) -> ResultR<R>,
[src]Exposes a function to lua (its a method that does not take Self)
fn add_function_mut<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + FnMut(Context<'lua>, A) -> ResultR<R>,
[src]
fn add_function_mut<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + FnMut(Context<'lua>, A) -> ResultR<R>,
[src]Exposes a mutable function to lua
fn add_meta_method<A, R, M>(&mut self, name: MetaMethodR, _: M) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + Fn(Context<'lua>, &T, A) -> ResultR<R>,
[src]
fn add_meta_method<A, R, M>(&mut self, name: MetaMethodR, _: M) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + Fn(Context<'lua>, &T, A) -> ResultR<R>,
[src]Exposes a meta method to lua http://lua-users.org/wiki/MetatableEvents
fn add_meta_method_mut<A, R, M>(&mut self, name: MetaMethodR, _: M) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + FnMut(Context<'lua>, &mut T, A) -> ResultR<R>,
[src]
fn add_meta_method_mut<A, R, M>(&mut self, name: MetaMethodR, _: M) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
M: 'static + Send + FnMut(Context<'lua>, &mut T, A) -> ResultR<R>,
[src]Exposes a meta and mutable method to lua http://lua-users.org/wiki/MetatableEvents
fn add_meta_function<A, R, F>(&mut self, name: MetaMethodR, _: F) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + Fn(Context<'lua>, A) -> ResultR<R>,
[src]
fn add_meta_function<A, R, F>(&mut self, name: MetaMethodR, _: F) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + Fn(Context<'lua>, A) -> ResultR<R>,
[src]Exposes a meta function to lua http://lua-users.org/wiki/MetatableEvents
fn add_meta_function_mut<A, R, F>(&mut self, name: MetaMethodR, _: F) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + FnMut(Context<'lua>, A) -> ResultR<R>,
[src]
fn add_meta_function_mut<A, R, F>(&mut self, name: MetaMethodR, _: F) where
A: FromLuaMultiR<'lua> + TealMultiValue,
R: ToLuaMultiR<'lua> + TealMultiValue,
F: 'static + Send + FnMut(Context<'lua>, A) -> ResultR<R>,
[src]Exposes a meta and mutable function to lua http://lua-users.org/wiki/MetatableEvents
impl<'lua, T> TealDataMethods<'lua, T> for TypeGenerator where
T: 'static + TealDataM + UserDataM,
[src]
impl<'lua, T> TealDataMethods<'lua, T> for TypeGenerator where
T: 'static + TealDataM + UserDataM,
[src]fn add_method<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + Fn(&'lua Lua, &T, A) -> ResultM<R>,
[src]
fn add_method<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + Fn(&'lua Lua, &T, A) -> ResultM<R>,
[src]Exposes a method to lua
fn add_method_mut<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + FnMut(&'lua Lua, &mut T, A) -> ResultM<R>,
[src]
fn add_method_mut<S: ?Sized, A, R, M>(&mut self, name: &S, _: M) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + FnMut(&'lua Lua, &mut T, A) -> ResultM<R>,
[src]Exposes a method to lua that has a mutable reference to Self
fn add_function<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + Fn(&'lua Lua, A) -> ResultM<R>,
[src]
fn add_function<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + Fn(&'lua Lua, A) -> ResultM<R>,
[src]Exposes a function to lua (its a method that does not take Self)
fn add_function_mut<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + FnMut(&'lua Lua, A) -> ResultM<R>,
[src]
fn add_function_mut<S: ?Sized, A, R, F>(&mut self, name: &S, _: F) where
S: AsRef<[u8]>,
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + FnMut(&'lua Lua, A) -> ResultM<R>,
[src]Exposes a mutable function to lua
fn add_meta_method<A, R, M>(&mut self, name: MetaMethodM, _: M) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + Fn(&'lua Lua, &T, A) -> ResultM<R>,
[src]
fn add_meta_method<A, R, M>(&mut self, name: MetaMethodM, _: M) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + Fn(&'lua Lua, &T, A) -> ResultM<R>,
[src]Exposes a meta method to lua http://lua-users.org/wiki/MetatableEvents
fn add_meta_method_mut<A, R, M>(&mut self, name: MetaMethodM, _: M) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + FnMut(&'lua Lua, &mut T, A) -> ResultM<R>,
[src]
fn add_meta_method_mut<A, R, M>(&mut self, name: MetaMethodM, _: M) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
M: 'static + Send + FnMut(&'lua Lua, &mut T, A) -> ResultM<R>,
[src]Exposes a meta and mutable method to lua http://lua-users.org/wiki/MetatableEvents
fn add_meta_function<A, R, F>(&mut self, name: MetaMethodM, _: F) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + Fn(&'lua Lua, A) -> ResultM<R>,
[src]
fn add_meta_function<A, R, F>(&mut self, name: MetaMethodM, _: F) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + Fn(&'lua Lua, A) -> ResultM<R>,
[src]Exposes a meta function to lua http://lua-users.org/wiki/MetatableEvents
fn add_meta_function_mut<A, R, F>(&mut self, name: MetaMethodM, _: F) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + FnMut(&'lua Lua, A) -> ResultM<R>,
[src]
fn add_meta_function_mut<A, R, F>(&mut self, name: MetaMethodM, _: F) where
A: FromLuaMultiM<'lua> + TealMultiValue,
R: ToLuaMultiM<'lua> + TealMultiValue,
F: 'static + Send + FnMut(&'lua Lua, A) -> ResultM<R>,
[src]Exposes a meta and mutable function to lua http://lua-users.org/wiki/MetatableEvents