Struct tealr::mlu::TypedFunction [−][src]
pub struct TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue, { /* fields omitted */ }
Expand description
A typed wrapper around mlua::Function
Implementations
impl<'lua, Params, Response> TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]
impl<'lua, Params, Response> TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]pub fn call(&self, params: Params) -> Result<Response>
[src]
pub fn call(&self, params: Params) -> Result<Response>
[src]Same as mlua::Function::call. Calls the function with the given parameters.
pub fn force_call(&self, params: Params) -> Response
[src]
pub fn force_call(&self, params: Params) -> Response
[src]Calls the function with the given parameters. Panics if something has gone wrong.
Trait Implementations
impl<'lua, Params, Response> Clone for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]
impl<'lua, Params, Response> Clone for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]impl<'lua, Params: Debug, Response: Debug> Debug for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]
impl<'lua, Params: Debug, Response: Debug> Debug for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]impl<'lua, Params, Response> FromLua<'lua> for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]
impl<'lua, Params, Response> FromLua<'lua> for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]impl<'lua, Params, Response> ToLua<'lua> for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]
impl<'lua, Params, Response> ToLua<'lua> for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]impl<'lua, Params, Response> TypeName for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]
impl<'lua, Params, Response> TypeName for TypedFunction<'lua, Params, Response> where
Params: ToLuaMulti<'lua> + TealMultiValue,
Response: FromLuaMulti<'lua> + TealMultiValue,
[src]fn get_type_name(_: Direction) -> Cow<'static, str>
[src]
fn get_type_name(_: Direction) -> Cow<'static, str>
[src]returns the type name as how it should show up in the generated .d.tl
file
fn is_external() -> bool
[src]
fn is_external() -> bool
[src]This method tells the generator that the type will always be available
This is pretty much only the case for native lua/teal types like number
Read more
Auto Trait Implementations
impl<'lua, Params, Response> !RefUnwindSafe for TypedFunction<'lua, Params, Response>
impl<'lua, Params, Response> !Send for TypedFunction<'lua, Params, Response>
impl<'lua, Params, Response> !Sync for TypedFunction<'lua, Params, Response>
impl<'lua, Params, Response> Unpin for TypedFunction<'lua, Params, Response> where
Params: Unpin,
Response: Unpin,
Params: Unpin,
Response: Unpin,
impl<'lua, Params, Response> !UnwindSafe for TypedFunction<'lua, Params, Response>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<'lua, T> FromLuaMulti<'lua> for T where
T: FromLua<'lua>,
[src]
impl<'lua, T> FromLuaMulti<'lua> for T where
T: FromLua<'lua>,
[src]pub fn from_lua_multi(
values: MultiValue<'lua>,
lua: &'lua Lua
) -> Result<T, Error>
[src]
pub fn from_lua_multi(
values: MultiValue<'lua>,
lua: &'lua Lua
) -> Result<T, Error>
[src]Performs the conversion. Read more
impl<'lua, T> ToLuaMulti<'lua> for T where
T: ToLua<'lua>,
[src]
impl<'lua, T> ToLuaMulti<'lua> for T where
T: ToLua<'lua>,
[src]pub fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
[src]
pub fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
[src]Performs the conversion.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more