Returns the element at index `i` Note: This method does not check for nulls and the value is arbitrary (but still well-defined) if [`is_null`](Self::is_null) returns true for the index. # Panics Panics if index `i` is out of bounds.
(&self, i: usize)
| 314 | /// # Panics |
| 315 | /// Panics if index `i` is out of bounds. |
| 316 | pub fn value(&self, i: usize) -> &T::Native { |
| 317 | assert!( |
| 318 | i < self.len(), |
| 319 | "Trying to access an element at index {} from a {}ViewArray of length {}", |
| 320 | i, |
| 321 | T::PREFIX, |
| 322 | self.len() |
| 323 | ); |
| 324 | |
| 325 | unsafe { self.value_unchecked(i) } |
| 326 | } |
| 327 | |
| 328 | /// Returns the element at index `i` without bounds checking |
| 329 | /// |