Skip to content
Snippets Groups Projects
Commit b5efb993 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon: Committed by Georgy Moshkin
Browse files

feat: add tarantool::eval that returns a value

parent 0c13d2e2
No related branches found
No related tags found
1 merge request!244attempt at topology governor
......@@ -168,6 +168,15 @@ pub fn exec(code: &str) -> Result<(), LuaError> {
l.exec(code)
}
#[track_caller]
pub fn eval<T>(code: &str) -> Result<T, LuaError>
where
T: for<'l> LuaRead<PushGuard<LuaFunction<PushGuard<&'l LuaThread>>>>,
{
let l = lua_state();
l.eval(code)
}
// fn net_box_repeat_call_until_succeed<Args, Res, Addr>(
pub fn net_box_call<Args, Res, Addr>(
address: Addr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment