vortex_dtype

Trait NativePType

Source
pub trait NativePType:
    Send
    + Sync
    + Clone
    + Copy
    + Debug
    + Display
    + PartialEq
    + PartialOrd
    + Default
    + RefUnwindSafe
    + Num
    + NumCast
    + FromPrimitive
    + ToBytes
    + TryFromBytes {
    const PTYPE: PType;

    // Required methods
    fn is_nan(self) -> bool;
    fn compare(self, other: Self) -> Ordering;
    fn is_eq(self, other: Self) -> bool;
}
Expand description

A trait for native Rust types that correspond 1:1 to a PType

Required Associated Constants§

Source

const PTYPE: PType

The PType that corresponds to this native type

Required Methods§

Source

fn is_nan(self) -> bool

Whether this instance (self) is NaN For integer types, this is always false

Source

fn compare(self, other: Self) -> Ordering

Compare another instance of this type to self

Source

fn is_eq(self, other: Self) -> bool

Whether another instance of this type (other) is bitwise equal to self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NativePType for f32

Source§

const PTYPE: PType = PType::F32

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for f64

Source§

const PTYPE: PType = PType::F64

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for i8

Source§

const PTYPE: PType = PType::I8

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for i16

Source§

const PTYPE: PType = PType::I16

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for i32

Source§

const PTYPE: PType = PType::I32

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for i64

Source§

const PTYPE: PType = PType::I64

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for u8

Source§

const PTYPE: PType = PType::U8

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for u16

Source§

const PTYPE: PType = PType::U16

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for u32

Source§

const PTYPE: PType = PType::U32

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for u64

Source§

const PTYPE: PType = PType::U64

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Source§

impl NativePType for f16

Source§

const PTYPE: PType = PType::F16

Source§

fn is_nan(self) -> bool

Source§

fn compare(self, other: Self) -> Ordering

Source§

fn is_eq(self, other: Self) -> bool

Implementors§