Overloaded slice notation via traits

#1

I learned from the slice-notation RFC that it adds overloaded slice notation via traits Slice and SliceMut. But where can I find these two traits in std? Any updates on this RFC?

0 Likes

#2

This is done by the Index and IndexMut traits, which can be implemented for ranges (the types of objects created by the range syntax).

0 Likes

closed #3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

0 Likes