pub trait PTypeUpcast {
type Input<T: NativePType>;
// Required methods
fn from_u8(input: Self::Input<u8>) -> Self;
fn from_u16(input: Self::Input<u16>) -> Self;
fn from_u32(input: Self::Input<u32>) -> Self;
fn from_u64(input: Self::Input<u64>) -> Self;
fn from_i8(input: Self::Input<i8>) -> Self;
fn from_i16(input: Self::Input<i16>) -> Self;
fn from_i32(input: Self::Input<i32>) -> Self;
fn from_i64(input: Self::Input<i64>) -> Self;
fn from_f16(input: Self::Input<f16>) -> Self;
fn from_f32(input: Self::Input<f32>) -> Self;
fn from_f64(input: Self::Input<f64>) -> Self;
}Expand description
A visitor trait for converting a generic NativePType into a non-parameterized type.
Required Associated Types§
type Input<T: NativePType>
Required Methods§
fn from_u8(input: Self::Input<u8>) -> Self
fn from_u16(input: Self::Input<u16>) -> Self
fn from_u32(input: Self::Input<u32>) -> Self
fn from_u64(input: Self::Input<u64>) -> Self
fn from_i8(input: Self::Input<i8>) -> Self
fn from_i16(input: Self::Input<i16>) -> Self
fn from_i32(input: Self::Input<i32>) -> Self
fn from_i64(input: Self::Input<i64>) -> Self
fn from_f16(input: Self::Input<f16>) -> Self
fn from_f32(input: Self::Input<f32>) -> Self
fn from_f64(input: Self::Input<f64>) -> 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.