hlua
hlua copied to clipboard
Add a FromIterator wrapper to push a table
Allow pushing a whole table at once by building it from an iterator.
I'm not sure how FromIterator would work, as it needs to create table in Lua end and it needs reference to interpreter for that. However, its' signature is
impl<T, L> FromIterator<T> for LuaTable<L> {
fn from_iter<I: IntoIterator<Item=T>>(iter: I) -> Self {
// where do we take Lua from?
}
}