pub fn index_len(v: &Value) -> Option<usize>Expand description
The number of elements v exposes as integer-index own properties, for a
typed array (its view length) or a Buffer (@@bytes); None otherwise.
Both index-membership questions — obj.hasOwnProperty(i) and i in obj —
must answer from this one place. They used to disagree: hasOwnProperty
carried a hand-rolled arm that understood @@bytes only, so it was right for
a Buffer and wrong for every other typed array, while the in operator knew
about neither and reported false for every valid index of both.