In C++ there are
random_access_iterator who can skip N elements (forward and backward) in constant time. I tried to search for similar concept in Rust without success.
For a type like
vec.iter.skip(N) should be
O(1). Is this guaranteed? If I create a user-defined type, can I get such guarantee? How do I get it? Do I need to implement some traits?