Expand description
Traits for accessing elements by usize
indexes.
There are several traits, with a core distinction being whether the returned reference depends on the lifetime of &self
.
For one trait Index
the result does not depend on this lifetime.
There is a third trait IndexMut
that allows mutable access, that may be less commonly implemented.