I think I'm missing something. I'm using the lua54 feature, I have user data, and I would like to implement custom pairs and ipairs.
I can do that for pairs with MetaMethod::Pairs, but MetaMethod::IPairs is only enabled for the lua52 and luajit52 features.
Here is an example I would like to create:
methods.add_meta_method(MetaMethod::IPairs, |_, _, ()| -> Result<()> {
Err(Error::RuntimeError("attempt to iterate over ...".into()))
});
What am I missing?