Hello there, I would like to know how one could receive a callback from a Lua's return value.
fn main() {
let mut lua = hlua::Lua::new();
lua.execute::<()>(r#"
function callback()
return function (a, b)
return a + b
end
end
"#).unwrap();
let mut cb: hlua::LuaFunction<_> = lua.get("callback").unwrap();
let value: hlua::AnyLuaValue = cb.call().unwrap();
println!("{:?}", value);
}
The code above returns a LuaOther type unfortunately.
Hello there, I would like to know how one could receive a callback from a Lua's return value.
The code above returns a
LuaOther
type unfortunately.