Skip to main content

Element

Trait Element 

Source
pub trait Element:
    Sealed
    + Copy
    + Send
    + Sync
    + 'static {
    const DTYPE: DType;
}
Expand description

A Rust type that can be stored in an array. Implemented for the element types of every DType; sealed.

Required Associated Constants§

Source

const DTYPE: DType

The array element type this Rust type maps to.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Element for bool

Source§

const DTYPE: DType = DType::Bool

Source§

impl Element for f32

Source§

const DTYPE: DType = DType::F32

Source§

impl Element for f64

Source§

const DTYPE: DType = DType::F64

Source§

impl Element for i8

Source§

const DTYPE: DType = DType::I8

Source§

impl Element for i16

Source§

const DTYPE: DType = DType::I16

Source§

impl Element for i32

Source§

const DTYPE: DType = DType::I32

Source§

impl Element for i64

Source§

const DTYPE: DType = DType::I64

Source§

impl Element for u8

Source§

const DTYPE: DType = DType::U8

Source§

impl Element for u16

Source§

const DTYPE: DType = DType::U16

Source§

impl Element for u32

Source§

const DTYPE: DType = DType::U32

Source§

impl Element for u64

Source§

const DTYPE: DType = DType::U64

Implementors§

Source§

impl Element for Complex64

Source§

const DTYPE: DType = DType::Complex64

Source§

impl Element for bf16

Source§

const DTYPE: DType = DType::BF16

Source§

impl Element for f16

Source§

const DTYPE: DType = DType::F16