arrow_array::ffi

Function create_buffer

Source
unsafe fn create_buffer(
    owner: Arc<FFI_ArrowArray>,
    array: &FFI_ArrowArray,
    index: usize,
    len: usize,
) -> Option<Buffer>
Expand description

returns a new buffer corresponding to the index i of the FFI array. It may not exist (null pointer). bits is the number of bits that the native type of this buffer has. The size of the buffer will be ceil(self.length * bits, 8).

§Panic

This function panics if i is larger or equal to n_buffers.

§Safety

This function assumes that ceil(self.length * bits, 8) is the size of the buffer