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

Method buffer

arrow-data/src/data.rs:635–637  ·  view source on GitHub ↗

Returns the `buffer` as a slice of type `T` starting at self.offset # Panics This function panics if: the buffer is not byte-aligned with type T, or the datatype is `Boolean` (it corresponds to a bit-packed buffer where the offset is not applicable)

(&self, buffer: usize)

Source from the content-addressed store, hash-verified

633 /// * the buffer is not byte-aligned with type T, or
634 /// * the datatype is `Boolean` (it corresponds to a bit-packed buffer where the offset is not applicable)
635 pub fn buffer<T: ArrowNativeType>(&self, buffer: usize) -> &[T] {
636 &self.buffers()[buffer].typed_data()[self.offset..]
637 }
638
639 /// Returns a new [`ArrayData`] valid for `data_type` containing `len` null values
640 ///

Callers 3

count_nullsFunction · 0.45
get_array_memory_sizeMethod · 0.45

Calls 2

typed_dataMethod · 0.45
buffersMethod · 0.45

Tested by

no test coverage detected