Trait polars_arrow::types::NativeType
source · pub trait NativeType: Sealed + Pod + Send + Sync + Sized + RefUnwindSafe + Debug + Display + PartialEq + Default + Copy + TotalOrd + IsNull + MinMax {
type Bytes: AsRef<[u8]> + AsMut<[u8]> + Index<usize, Output = u8> + IndexMut<usize, Output = u8> + for<'a> TryFrom<&'a [u8]> + Debug + Default + IntoIterator<Item = u8>;
const PRIMITIVE: PrimitiveType;
// Required methods
fn to_le_bytes(&self) -> Self::Bytes;
fn to_be_bytes(&self) -> Self::Bytes;
fn from_le_bytes(bytes: Self::Bytes) -> Self;
fn from_be_bytes(bytes: Self::Bytes) -> Self;
}
Expand description
Sealed trait implemented by all physical types that can be allocated, serialized and deserialized by this crate. All O(N) allocations in this crate are done for this trait alone.
Required Associated Types§
Required Associated Constants§
sourceconst PRIMITIVE: PrimitiveType
const PRIMITIVE: PrimitiveType
The corresponding variant of PrimitiveType
.
Required Methods§
sourcefn to_le_bytes(&self) -> Self::Bytes
fn to_le_bytes(&self) -> Self::Bytes
To bytes in little endian
sourcefn to_be_bytes(&self) -> Self::Bytes
fn to_be_bytes(&self) -> Self::Bytes
To bytes in big endian
sourcefn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
From bytes in little endian
sourcefn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
From bytes in big endian
Object Safety§
This trait is not object safe.