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

Method into_buffer

arrow-buffer/src/buffer/mutable.rs:537–546  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

535
536 #[inline]
537 pub(super) fn into_buffer(self) -> Buffer {
538 let bytes = unsafe { Bytes::new(self.data, self.len, Deallocation::Standard(self.layout)) };
539 #[cfg(feature = "pool")]
540 {
541 let reservation = self.reservation.lock().unwrap().take();
542 *bytes.reservation.lock().unwrap() = reservation;
543 }
544 std::mem::forget(self);
545 Buffer::from(bytes)
546 }
547
548 /// View this buffer as a mutable slice of a specific type.
549 ///

Callers 6

new_unsetMethod · 0.45
fromMethod · 0.45
test_vec_interopFunction · 0.45
new_emptyMethod · 0.45
new_zeroedMethod · 0.45

Calls 1

takeMethod · 0.45

Tested by 2

test_vec_interopFunction · 0.36