pub trait PTypeVisitor {
type Output<T: NativePType>;
// Required methods
fn as_u8(&self) -> Self::Output<u8>;
fn as_u16(&self) -> Self::Output<u16>;
fn as_u32(&self) -> Self::Output<u32>;
fn as_u64(&self) -> Self::Output<u64>;
fn as_i8(&self) -> Self::Output<i8>;
fn as_i16(&self) -> Self::Output<i16>;
fn as_i32(&self) -> Self::Output<i32>;
fn as_i64(&self) -> Self::Output<i64>;
fn as_f16(&self) -> Self::Output<f16>;
fn as_f32(&self) -> Self::Output<f32>;
fn as_f64(&self) -> Self::Output<f64>;
}Expand description
A visitor trait for converting a NativePType to another parameterized type.
Required Associated Types§
type Output<T: NativePType>
Required Methods§
fn as_u8(&self) -> Self::Output<u8>
fn as_u16(&self) -> Self::Output<u16>
fn as_u32(&self) -> Self::Output<u32>
fn as_u64(&self) -> Self::Output<u64>
fn as_i8(&self) -> Self::Output<i8>
fn as_i16(&self) -> Self::Output<i16>
fn as_i32(&self) -> Self::Output<i32>
fn as_i64(&self) -> Self::Output<i64>
fn as_f16(&self) -> Self::Output<f16>
fn as_f32(&self) -> Self::Output<f32>
fn as_f64(&self) -> Self::Output<f64>
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.