Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to write a rust function accepting Vec as paramater #198

Open
surajprak opened this issue Aug 8, 2018 · 1 comment
Open

not able to write a rust function accepting Vec as paramater #198

surajprak opened this issue Aug 8, 2018 · 1 comment

Comments

@surajprak
Copy link

I want to write a rust function which accepts Vec as an input and should be callable from lua.
fn get_data_sql(query: String, param_value: Vec){
println!("Inside get_data_sql");
let (txi, rxi) = futures::sync::mpsc::channel::(1);
............
}

error[E0277]: the trait bound for<'a, 'p> std::vec::Vec<i32>: hlua::LuaRead<&'a mut &'p mut hlua::InsideCallback> is not satisfied
--> src/main.rs:2021:9
|
2021 | lua.set("get_data_sql", hlua::function2(get_data_sql));
| ^^^ the trait for<'a, 'p> hlua::LuaRead<&'a mut &'p mut hlua::InsideCallback> is not implemented for std::vec::Vec<i32>
|

@tpdickso
Copy link

#183 solves this issue; you can use that branch locally if it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants