PTypeVisitor

Trait PTypeVisitor 

Source
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§

Required Methods§

Source

fn as_u8(&self) -> Self::Output<u8>

Source

fn as_u16(&self) -> Self::Output<u16>

Source

fn as_u32(&self) -> Self::Output<u32>

Source

fn as_u64(&self) -> Self::Output<u64>

Source

fn as_i8(&self) -> Self::Output<i8>

Source

fn as_i16(&self) -> Self::Output<i16>

Source

fn as_i32(&self) -> Self::Output<i32>

Source

fn as_i64(&self) -> Self::Output<i64>

Source

fn as_f16(&self) -> Self::Output<f16>

Source

fn as_f32(&self) -> Self::Output<f32>

Source

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.

Implementors§