Skip to main content

TensorType

Trait TensorType 

Source
pub trait TensorType: Sealed {
    type H;

    // Required method
    fn owned() -> bool;

    // Provided method
    fn borrowed() -> bool { ... }
}
Expand description

A trait to represent the type of a tensor

Required Associated Types§

Source

type H

The type of the tensor data

Required Methods§

Source

fn owned() -> bool

Check if the tensor is owned

Provided Methods§

Source

fn borrowed() -> bool

Check if the tensor is borrowed

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.

Implementors§

Source§

impl<H> TensorType for Owned<H>

Source§

type H = H

Source§

impl<H> TensorType for View<&H>

Source§

type H = H

Source§

impl<H> TensorType for View<&mut H>

Source§

type H = H