Trait AsDLDataType

Source
pub trait AsDLDataType: Copy {
    const DL_DATA_TYPE: DLDataType;
}
Expand description

Trait to convert standard data types to DLDataType

This trait provides a way to get the corresponding DLDataType for standard Rust types. It’s implemented for common integer, unsigned integer, and floating-point types.

Required Associated Constants§

Source

const DL_DATA_TYPE: DLDataType

The corresponding DLDataType for this 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 AsDLDataType for f32

Source§

impl AsDLDataType for f64

Source§

impl AsDLDataType for i8

Source§

impl AsDLDataType for i16

Source§

impl AsDLDataType for i32

Source§

impl AsDLDataType for i64

Source§

impl AsDLDataType for u8

Source§

impl AsDLDataType for u16

Source§

impl AsDLDataType for u32

Source§

impl AsDLDataType for u64

Implementors§