Open Sytten opened 1 month ago
I am using a lot of them in https://github.com/DelSkayn/rquickjs/pull/319
Hmm, I am not sure what the right API for this is.
Could you maybe elaborate a bit more on what functionality you expect? Do you want a method for easy conversion between rust iterators and JavaScript iterators? Or something else?
I would say check what I did in #320, it is pretty much done. It allows both essentially
Some things are tricky when you want to avoid a clone of the data, you need to take a This
reference of the parent into the children iterator like I did here: https://github.com/DelSkayn/rquickjs/pull/319/files#diff-653c6889323b6067b2be818f8ff00f785927ae3beaaeaba4a034feb5ea154d4eR116-R148
There might be a better way though.
Creating iterators is a pain right now. A basic example:
I tried creating a wrapper, but I can't get it to play nice: