rlua 0.19.8

High level bindings to Lua 5.x
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate rlua;

use rlua::{Function, Lua, Result};

fn main() {
    struct Test(i32);

    Lua::new().context(|lua| {
        let test = Test(0);

        let func = lua.create_function(|_, ()| -> Result<i32> {
            //~^ error: closure may outlive the current function, but it borrows `test`, which is owned by the current function
            Ok(test.0)
        });
    });
}