pub enum LuaFunction {
LuaFunc(LuaFunctionLua),
RustFunc(LuaFunctionRust),
}Expand description
lua function object
Variants§
LuaFunc(LuaFunctionLua)
functions written in Lua
RustFunc(LuaFunctionRust)
built-in functions written in Rust
Implementations§
source§impl LuaFunction
impl LuaFunction
pub fn from_func<F: Fn(Vec<LuaValue>) -> Result<Vec<LuaValue>, RuntimeError> + 'static>( func: F, ) -> LuaFunction
Trait Implementations§
source§impl Clone for LuaFunction
impl Clone for LuaFunction
source§fn clone(&self) -> LuaFunction
fn clone(&self) -> LuaFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for LuaFunction
impl Debug for LuaFunction
source§impl Display for LuaFunction
impl Display for LuaFunction
source§impl From<LuaFunction> for LuaValue
impl From<LuaFunction> for LuaValue
source§fn from(f: LuaFunction) -> Self
fn from(f: LuaFunction) -> Self
Converts to this type from the input type.
source§impl From<LuaFunctionLua> for LuaFunction
impl From<LuaFunctionLua> for LuaFunction
source§fn from(func: LuaFunctionLua) -> Self
fn from(func: LuaFunctionLua) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LuaFunction
impl !RefUnwindSafe for LuaFunction
impl !Send for LuaFunction
impl !Sync for LuaFunction
impl Unpin for LuaFunction
impl !UnwindSafe for LuaFunction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)