Dim

Trait Dim 

Source
pub trait Dim {
    // Required methods
    fn to_index(&self, shape: &Shape, op: &'static str) -> Result<usize, Error>;
    fn to_index_plus_one(
        &self,
        shape: &Shape,
        op: &'static str,
    ) -> Result<usize, Error>;
}

Required Methods§

Source

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

Source

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

Implementations on Foreign Types§

Source§

impl Dim for i32

Source§

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

Source§

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

Source§

impl Dim for usize

Source§

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

Source§

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

Implementors§

Source§

impl Dim for D