Maybe this problem is a PEBKAC, but maybe things could be simpler.
rstar has iterators.rs module that's publicly reexported in lib.rs. But Nearest Neighbors iterators are defined in private mod algorithm::nearest_neighbors and can't be reached.
I want to create an iterator that consumes iterator that is returned by rtree, do something with the data and in general create abstraction that hides rtree as implementation detail. Currently I'm trying (unsuccessfully so far) to do a iterator that's generic over anything implementing Iterator trait that has specific Item. But is that required? (is that even possible?)
Are those iterators hidden for purpose, or just forgotten?
edit: Being generic over Iterator works, just feels too complicated for what I need. ;)
My generic over Iterator struct also fails later; It compiles as long as I don't return it further. I probably must Box it and use dyn. Still feels rather complicated.
Maybe this problem is a PEBKAC, but maybe things could be simpler.
rstar has iterators.rs module that's publicly reexported in lib.rs. But Nearest Neighbors iterators are defined in private mod algorithm::nearest_neighbors and can't be reached.
I want to create an iterator that consumes iterator that is returned by rtree, do something with the data and in general create abstraction that hides rtree as implementation detail. Currently I'm trying (unsuccessfully so far) to do a iterator that's generic over anything implementing Iterator trait that has specific Item. But is that required? (
is that even possible?)Are those iterators hidden for purpose, or just forgotten?
edit: Being generic over Iterator works, just feels too complicated for what I need. ;)