[go: up one dir, main page]

Trait DimBaseAPI

Source
pub trait DimBaseAPI:
    AsMut<[usize]>
    + AsRef<[usize]>
    + IndexMut<usize, Output = usize>
    + Debug
    + PartialEq
    + Clone
    + TryFrom<Vec<usize>>
    + Into<Vec<usize>>
    + Send
    + Sync
    + PartialOrd
    + PartialEq {
    type Stride: AsMut<[isize]> + AsRef<[isize]> + IndexMut<usize, Output = isize> + Debug + PartialEq + Clone + TryFrom<Vec<isize>> + Into<Vec<isize>>;

    // Required methods
    fn ndim(&self) -> usize;
    fn const_ndim() -> Option<usize>;
    fn new_shape(&self) -> Self;
    fn new_stride(&self) -> Self::Stride;
}

Required Associated Types§

Required Methods§

Source

fn ndim(&self) -> usize

Number of dimension

Source

fn const_ndim() -> Option<usize>

Dynamic or static dimension

Source

fn new_shape(&self) -> Self

New shape

Source

fn new_stride(&self) -> Self::Stride

New stride

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.

Implementors§