Trait candle_core::shape::Dims

source ·
pub trait Dims: Sized {
    // Required method
    fn to_indexes_internal(
        self,
        shape: &Shape,
        op: &'static str
    ) -> Result<Vec<usize>>;

    // Provided method
    fn to_indexes(self, shape: &Shape, op: &'static str) -> Result<Vec<usize>> { ... }
}

Required Methods§

source

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

Provided Methods§

source

fn to_indexes(self, shape: &Shape, op: &'static str) -> Result<Vec<usize>>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Dims for &[usize]

source§

fn to_indexes_internal(self, _: &Shape, _: &'static str) -> Result<Vec<usize>>

source§

impl Dims for ()

source§

fn to_indexes_internal(self, _: &Shape, _: &'static str) -> Result<Vec<usize>>

source§

impl Dims for Vec<usize>

source§

fn to_indexes_internal(self, _: &Shape, _: &'static str) -> Result<Vec<usize>>

source§

impl<D1: Dim, D2: Dim> Dims for (D1, D2)

source§

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

source§

impl<D1: Dim, D2: Dim, D3: Dim> Dims for (D1, D2, D3)

source§

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

source§

impl<D1: Dim, D2: Dim, D3: Dim, D4: Dim> Dims for (D1, D2, D3, D4)

source§

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

source§

impl<D1: Dim, D2: Dim, D3: Dim, D4: Dim, D5: Dim> Dims for (D1, D2, D3, D4, D5)

source§

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

source§

impl<D1: Dim, D2: Dim, D3: Dim, D4: Dim, D5: Dim, D6: Dim> Dims for (D1, D2, D3, D4, D5, D6)

source§

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

source§

impl<D: Dim> Dims for (D,)

source§

fn to_indexes_internal( self, shape: &Shape, op: &'static str ) -> Result<Vec<usize>>

source§

impl<const N: usize> Dims for [usize; N]

source§

fn to_indexes_internal(self, _: &Shape, _: &'static str) -> Result<Vec<usize>>

Implementors§

source§

impl<D: Dim + Sized> Dims for D