pub trait NativePType:
Send
+ Sync
+ Clone
+ Copy
+ Debug
+ Display
+ Default
+ RefUnwindSafe
+ Num
+ NumCast
+ FromPrimitive
+ ToBytes
+ TryFromBytes
+ 'static {
const PTYPE: PType;
// Required methods
fn is_nan(self) -> bool;
fn is_infinite(self) -> bool;
fn total_compare(self, other: Self) -> Ordering;
fn is_eq(self, other: Self) -> bool;
fn downcast<V: PTypeVisitor + ?Sized>(visitor: &V) -> V::Output<Self>;
fn downcast_mut<V: PTypeVisitorMut + ?Sized>(
visitor: &mut V,
) -> V::Output<Self>;
// Provided methods
fn is_le(self, other: Self) -> bool { ... }
fn is_lt(self, other: Self) -> bool { ... }
fn is_ge(self, other: Self) -> bool { ... }
fn is_gt(self, other: Self) -> bool { ... }
}Expand description
A trait for native Rust types that correspond 1:1 to a PType
Required Associated Constants§
Required Methods§
Sourcefn is_nan(self) -> bool
fn is_nan(self) -> bool
Whether this instance (self) is NaN
For integer types, this is always false
Sourcefn is_infinite(self) -> bool
fn is_infinite(self) -> bool
Whether this instance (self) is Infinite
For integer types, this is always false
Sourcefn total_compare(self, other: Self) -> Ordering
fn total_compare(self, other: Self) -> Ordering
Compare another instance of this type to self, providing a total ordering
Sourcefn is_eq(self, other: Self) -> bool
fn is_eq(self, other: Self) -> bool
Whether another instance of this type (other) is bitwise equal to self
Sourcefn downcast<V: PTypeVisitor + ?Sized>(visitor: &V) -> V::Output<Self>
fn downcast<V: PTypeVisitor + ?Sized>(visitor: &V) -> V::Output<Self>
Downcast the provided object to a type-specific instance.
Sourcefn downcast_mut<V: PTypeVisitorMut + ?Sized>(visitor: &mut V) -> V::Output<Self>
fn downcast_mut<V: PTypeVisitorMut + ?Sized>(visitor: &mut V) -> V::Output<Self>
Downcast the provided object to a type-specific instance.
Provided Methods§
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.