Trait Variance

Source
pub trait Variance {
    type Rank: Unsigned + Add<B1>;

    // Required method
    fn variance() -> Vec<IndexType>;

    // Provided method
    fn rank() -> usize { ... }
}
Expand description

Trait identifying a type as representing a tensor variance. It is implemented for CovariantIndex, ContravariantIndex and tuples (Index, Variance).

Required Associated Types§

Required Methods§

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.

Implementations on Foreign Types§

Source§

impl Variance for ()

Source§

impl<T, U> Variance for (T, U)
where U: Variance, Add1<U::Rank>: Unsigned + Add<B1>, T: TensorIndex,

Implementors§