pub trait TensorLikewhere
Self: Sized,{
// Required methods
fn f_to_device(&self, device: Device) -> Result<Self, TchError>;
fn f_to_kind(&self, kind: Kind) -> Result<Self, TchError>;
fn shallow_clone(&self) -> Self;
// Provided methods
fn to_device(&self, device: Device) -> Self { ... }
fn to_kind(&self, kind: Kind) -> Self { ... }
}
Required Methods§
fn f_to_device(&self, device: Device) -> Result<Self, TchError>
fn f_to_kind(&self, kind: Kind) -> Result<Self, TchError>
fn shallow_clone(&self) -> Self
Provided Methods§
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.