Trait arrow2::types::NativeType [−][src]
pub unsafe trait NativeType: Relation + NaturalDataType + Send + Sync + Sized + Copy + Debug + Display + PartialEq + Default + Sized + 'static {
type Bytes: AsRef<[u8]> + Index<usize, Output = u8> + IndexMut<usize, Output = u8> + for<'a> TryFrom<&'a [u8]> + Debug;
fn to_le_bytes(&self) -> Self::Bytes;
fn to_ne_bytes(&self) -> Self::Bytes;
fn to_be_bytes(&self) -> Self::Bytes;
fn from_be_bytes(bytes: Self::Bytes) -> Self;
}
Expand description
Declares any type that can be allocated, serialized and deserialized by this crate. All data-heavy memory operations are implemented for this trait alone.
Safety
Do not implement.
Associated Types
Required methods
fn to_le_bytes(&self) -> Self::Bytes
fn to_le_bytes(&self) -> Self::Bytes
To bytes in little endian
fn to_ne_bytes(&self) -> Self::Bytes
fn to_ne_bytes(&self) -> Self::Bytes
To bytes in native endian
fn to_be_bytes(&self) -> Self::Bytes
fn to_be_bytes(&self) -> Self::Bytes
To bytes in big endian
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
From bytes in big endian