The std::copy
function in C++ copies elements pointed at by one iterator over the elements pointed at by another iterator. One important aspect of std::copy
in C++ is that good implementations optimize by using std::memmove
if the type of the iterated elements is TriviallyCopyable
in C++ speak (a type that implements the Copy
trait in Rust speak).
Is there currently anything equivalent or similar to C++ std::copy
in the Rust standard library?