Trait ArrayRotate

Source
pub trait ArrayRotate<T, const N: usize>: Array + AsSlice<Item = T> {
    // Required methods
    const fn into_rotate_left(self, n: usize) -> [T; N];
    const fn into_rotate_right(self, n: usize) -> [T; N];
    const fn rotate_left(&mut self, n: usize);
    const fn rotate_right(&mut self, n: usize);
}

Required Methods§

Source

const fn into_rotate_left(self, n: usize) -> [T; N]

Source

const fn into_rotate_right(self, n: usize) -> [T; N]

Source

const fn rotate_left(&mut self, n: usize)

Source

const fn rotate_right(&mut self, n: usize)

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<T, const N: usize> ArrayRotate<T, N> for [T; N]

Source§

const fn into_rotate_left(self, n: usize) -> [T; N]

Source§

const fn into_rotate_right(self, n: usize) -> [T; N]

Source§

const fn rotate_left(&mut self, n: usize)

Source§

const fn rotate_right(&mut self, n: usize)

Implementors§