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

Method to_byte_slice

arrow-buffer/src/native.rs:275–278  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

273impl<T: ArrowNativeType> ToByteSlice for [T] {
274 #[inline]
275 fn to_byte_slice(&self) -> &[u8] {
276 let raw_ptr = self.as_ptr() as *const u8;
277 unsafe { std::slice::from_raw_parts(raw_ptr, std::mem::size_of_val(self)) }
278 }
279}
280
281impl<T: ArrowNativeType> ToByteSlice for T {

Callers 15

from_sliceFunction · 0.80
create_random_list_arrayFunction · 0.80
create_random_map_arrayFunction · 0.80
test_list_nullFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
pushMethod · 0.80
push_uncheckedMethod · 0.80
extend_from_iterMethod · 0.80
from_trusted_len_iterMethod · 0.80

Calls 1

as_ptrMethod · 0.45

Tested by 15

test_list_nullFunction · 0.64
mixed_struct_listFunction · 0.64
arrow_writer_listFunction · 0.64
arrow_writer_complexFunction · 0.64
null_list_single_columnFunction · 0.64
list_single_columnFunction · 0.64
large_list_single_columnFunction · 0.64
test_dictionary_arrayFunction · 0.64