Trait arrow::alloc::NativeType
source · [−]pub unsafe trait NativeType: Sized + Copy + Debug + Display + PartialEq + Default + Sized + 'static {
type Bytes: AsRef<[u8]>;
fn is_valid(data_type: &DataType) -> bool;
fn to_le_bytes(&self) -> Self::Bytes;
}
Expand description
A type that Rust’s custom allocator knows how to allocate and deallocate. This is implemented for all Arrow’s physical types whose in-memory representation matches Rust’s physical types. Consider this trait sealed.
Safety
Do not implement this trait.
Required Associated Types
Required Methods
Whether a DataType is a valid type for this physical representation.
fn to_le_bytes(&self) -> Self::Bytes
fn to_le_bytes(&self) -> Self::Bytes
How this type represents itself as bytes in little endianess. This is used for IPC, where data is communicated with a specific endianess.