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

Method build_with_arguments

arrow-buffer/src/buffer/immutable.rs:167–179  ·  view source on GitHub ↗

Auxiliary method to create a new Buffer

(
        ptr: NonNull<u8>,
        len: usize,
        deallocation: Deallocation,
    )

Source from the content-addressed store, hash-verified

165
166 /// Auxiliary method to create a new Buffer
167 unsafe fn build_with_arguments(
168 ptr: NonNull<u8>,
169 len: usize,
170 deallocation: Deallocation,
171 ) -> Self {
172 let bytes = unsafe { Bytes::new(ptr, len, deallocation) };
173 let ptr = bytes.as_ptr();
174 Buffer {
175 ptr,
176 data: Arc::new(bytes),
177 length: len,
178 }
179 }
180
181 /// Returns the number of bytes in the buffer
182 #[inline]

Callers

nothing calls this directly

Calls 1

as_ptrMethod · 0.45

Tested by

no test coverage detected