Trait NativeType

Source
pub trait NativeType {
    const NAME: &'static str;

    // Required method
    fn data() -> &'static NativeTypeData;

    // Provided method
    fn ty() -> Type { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

Required Methods§

Source

fn data() -> &'static NativeTypeData

Provided Methods§

Source

fn ty() -> 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 bool

Source§

const NAME: &'static str = "bool"

Source§

fn data() -> &'static NativeTypeData

Source§

impl NativeType for i64

Source§

const NAME: &'static str = "Int"

Source§

fn data() -> &'static NativeTypeData

Implementors§

Source§

impl NativeType for ArrayValue

Source§

const NAME: &'static str = "array"

Source§

impl NativeType for Boxed

Source§

const NAME: &'static str = "box"

Source§

impl NativeType for Func

Source§

const NAME: &'static str = "Func"

Source§

impl NativeType for IterValue

Source§

const NAME: &'static str = "Iterator"

Source§

impl NativeType for MapValue

Source§

const NAME: &'static str = "Map"

Source§

impl NativeType for Module

Source§

const NAME: &'static str = "Module"

Source§

impl NativeType for RangeValue

Source§

const NAME: &'static str = "range"

Source§

impl NativeType for Str

Source§

const NAME: &'static str = "String"

Source§

impl NativeType for Type

Source§

const NAME: &'static str = "type"

Source§

impl NativeType for UnitValue

Source§

const NAME: &'static str = "()"