Element

Trait Element 

pub trait Element:
    ToElement
    + ElementRandom
    + ElementConversion
    + ElementEq
    + CheckedBitPattern
    + NoUninit
    + Zeroable
    + Debug
    + Display
    + Default
    + Send
    + Sync
    + Copy
    + 'static {
    // Required method
    fn dtype() -> DType;
}
Expand description

Core element trait for tensor values.

This trait defines the minimal set of capabilities required for a type to be stored and manipulated as a tensor element across all backends.

Required Methods§

fn dtype() -> DType

The dtype of the element.

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§

§

impl Element for bool

§

fn dtype() -> DType

§

impl Element for f32

§

fn dtype() -> DType

§

impl Element for f64

§

fn dtype() -> DType

§

impl Element for i8

§

fn dtype() -> DType

§

impl Element for i16

§

fn dtype() -> DType

§

impl Element for i32

§

fn dtype() -> DType

§

impl Element for i64

§

fn dtype() -> DType

§

impl Element for u8

§

fn dtype() -> DType

§

impl Element for u16

§

fn dtype() -> DType

§

impl Element for u32

§

fn dtype() -> DType

§

impl Element for u64

§

fn dtype() -> DType

§

impl Element for flex32

§

fn dtype() -> DType

Implementors§

§

impl Element for bf16

§

impl Element for f16