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

Method push_unchecked

arrow-buffer/src/buffer/mutable.rs:635–641  ·  view source on GitHub ↗
(&mut self, item: T)

Source from the content-addressed store, hash-verified

633 /// Caller must ensure that the capacity()-len()>=`size_of<T>`()
634 #[inline]
635 pub unsafe fn push_unchecked<T: ToByteSlice>(&mut self, item: T) {
636 let additional = std::mem::size_of::<T>();
637 let src = item.to_byte_slice().as_ptr();
638 let dst = unsafe { self.data.as_ptr().add(self.len) };
639 unsafe { std::ptr::copy_nonoverlapping(src, dst, additional) };
640 self.len += additional;
641 }
642
643 /// Extends the buffer by `additional` bytes equal to `0u8`, incrementing its capacity if needed.
644 ///

Callers 3

from_iterMethod · 0.80
try_binary_no_nullsFunction · 0.80

Calls 3

to_byte_sliceMethod · 0.80
as_ptrMethod · 0.45
addMethod · 0.45

Tested by 1