unsafe fn create_buffer(
    owner: Arc<FFI_ArrowArray>,
    array: &FFI_ArrowArray,
    index: usize,
    len: usize,
) -> Option<Buffer> {
    if array.buffers.is_null() {
        return None;
    }
    let buffers = array.buffers as *mut *const u8;

    assert!(index < array.n_buffers as usize);
    let ptr = *buffers.add(index);

    NonNull::new(ptr as *mut u8).map(|ptr| Buffer::from_unowned(ptr, len, owner))
}
/// 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
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)`.
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 ) ` .
unsafe fn create_buffer(
    owner: Arc<FFI_ArrowArray>,
    array: &FFI_ArrowArray,
    index: usize,
    len: usize,
) -> Option<Buffer> {
    if array.buffers.is_null() {
        return None;
    }
    let buffers = array.buffers as *mut *const u8;
    assert!(index < array.n_buffers as usize);
    let ptr = *buffers.add(index);
    NonNull::new(ptr as *mut u8).map(|ptr| Buffer::from_unowned(ptr, len, owner))
}
unsafe fn create_buffer ( owner : Arc < FFI_ArrowArray > , array : & FFI_ArrowArray , index : usize , len : usize , ) -> Option < Buffer > { if array . buffers . is_null ( ) { return None ; } let buffers = array . buffers as * mut * const u8 ; assert ! ( index array n_buffers as usize ) ; let ptr = * buffers . add ( index ) ; NonNull :: new ( ptr as * mut u8 ) . map ( | ptr | Buffer :: from_unowned ( ptr , len , owner ) ) }
returns a new buffer corresponding to the index `i` of the FFI array.
returns a new buffer corresponding to the index ` i ` of the FFI array .
owner
Arc<FFI_ArrowArray>
array
&FFI_ArrowArray
index
usize
len
usize
owner
Arc<FFI_ArrowArray>
array
&FFI_ArrowArray
index
usize
len
usize
panic
This function panics if `i` is larger or equal to `n_buffers`.
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
This function assumes that ` ceil ( self . length * bits 8 ) ` is the size of the buffer