redis-lua 0.4.0

Redis Lua scripting helper
Documentation
1
2
3
4
5
6
7
8
9
10
#[tokio::test]
async fn twovars() {
    let script = redis_lua::lua!(
        return $a + $b + 10;
    );

    let mut cli = redis::Client::open("redis://127.0.0.1").unwrap();
    let res: usize = script.a(20).b(11).invoke(&mut cli).unwrap();
    assert_eq!(res, 41);
}