Skip to main content

Element

Trait Element 

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

Rust host type that has one exact admitted dense DType representation.

This trait is sealed so OA can uphold the no-padding and bit-validity requirements used by checked upload and readback.

Required Associated Constants§

Source

const DTYPE: DType

Dense OA dtype represented by this Rust type.

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 f32

Source§

const DTYPE: DType = DType::F32

Source§

impl Element for i32

Source§

const DTYPE: DType = DType::I32

Source§

impl Element for u8

Source§

const DTYPE: DType = DType::U8

Source§

impl Element for u32

Source§

const DTYPE: DType = DType::U32

Implementors§

Source§

impl Element for F16

Source§

const DTYPE: DType = DType::F16