Skip to main content

NativeType

Trait NativeType 

Source
pub trait NativeType {
    const INTERFACE_TYPE: InterfaceType;
}
Expand description

Represents a native type supported by WIT.

Required Associated Constants§

Source

const INTERFACE_TYPE: InterfaceType

The associated interface type that maps to the native type.

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 NativeType for f32

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::F32

Source§

impl NativeType for f64

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::F64

Source§

impl NativeType for i8

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::S8

Source§

impl NativeType for i16

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::S16

Source§

impl NativeType for i32

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::I32

Source§

impl NativeType for i64

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::I64

Source§

impl NativeType for u8

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::U8

Source§

impl NativeType for u16

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::U16

Source§

impl NativeType for u32

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::U32

Source§

impl NativeType for u64

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::U64

Source§

impl NativeType for String

Source§

const INTERFACE_TYPE: InterfaceType = InterfaceType::String

Implementors§