- Rust Part7
293 :デフォルトの名無しさん[sage]:2019/09/09(月) 11:53:41.02 ID:elDbcwTD - Trait std::ops::Index
container[index] is actually syntactic sugar for *container.index(index), but only when used as an immutable value. If a mutable value is requested, IndexMut is used instead. This allows nice things such as let value = v[index] if the type of value implements Copy.
|