In the current version of my crate rtrb I am providing an iterator-based API for reading &T and writing to &mut T (and also to &mut MaybeUninit<T>).
However, I think it would be better to move those items instead of working with references. Changing the "reading" iterator from producing &T to producing T is kinda straightforward, but for the "writing" side I've changed the &mut T producing iterator into a method that takes an iterator that itself produces T items.
I've implemented this in a PR:
For now, I've named the method populate(), but maybe there is a better name?
Is there a precedent for such a function?
If the underlying container would be able to grow, I would of course implement the Extend trait, but that's not the case.
Currently, the function signature looks like this: