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

Method buffer

arrow-data/src/ffi.rs:304–310  ·  view source on GitHub ↗
(&self, index: usize)

Source from the content-addressed store, hash-verified

302 /// Panics if index >= self.num_buffers() or the buffer is not correctly aligned
303 #[inline]
304 pub fn buffer(&self, index: usize) -> *const u8 {
305 assert!(!self.buffers.is_null());
306 assert!(index < self.num_buffers());
307 // SAFETY:
308 // If buffers is not null must be valid for reads up to num_buffers
309 unsafe { std::ptr::read_unaligned((self.buffers as *mut *const u8).add(index)) }
310 }
311
312 /// Returns the number of buffers
313 #[inline]

Callers 15

nullifFunction · 0.45
and_kleeneFunction · 0.45
or_kleeneFunction · 0.45
create_bufferFunction · 0.45
buffersMethod · 0.45
buffer_lenMethod · 0.45

Calls 1

addMethod · 0.45

Tested by

no test coverage detected