MCPcopy Create free account
hub / github.com/apache/arrow-rs / value

Method value

arrow-array/src/array/byte_array.rs:342–354  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

340 /// # Panics
341 /// Panics if index `i` is out of bounds.
342 pub fn value(&self, i: usize) -> &T::Native {
343 assert!(
344 i < self.len(),
345 "Trying to access an element at index {} from a {}{}Array of length {}",
346 i,
347 T::Offset::PREFIX,
348 T::PREFIX,
349 self.len()
350 );
351 // SAFETY:
352 // Verified length above
353 unsafe { self.value_unchecked(i) }
354 }
355
356 /// constructs a new iterator
357 pub fn iter(&self) -> ArrayIter<&Self> {

Callers 1

fmtMethod · 0.45

Calls 1

value_uncheckedMethod · 0.45

Tested by

no test coverage detected