pub trait CastOps<S: Clone + CastDtype, const MAX_RANK: usize>: TensorRef<S, MAX_RANK> {
// Provided method
fn try_cast_dtype<D: Clone + CastDtype>(
&self,
) -> Result<Tensor<D, Global, MAX_RANK>, TensorError> { ... }
}Expand description
Extension trait: type casting for any TensorRef implementor.
Provided Methods§
fn try_cast_dtype<D: Clone + CastDtype>( &self, ) -> Result<Tensor<D, Global, MAX_RANK>, TensorError>
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.