IndexNewToOld

Struct IndexNewToOld 

Source
pub struct IndexNewToOld(/* private fields */);

Implementations§

Source§

impl IndexNewToOld

Source

pub fn new(new_to_old: &[usize]) -> &Self

Source

pub fn build_old_to_new(&self) -> Vec<usize>

Source

pub fn apply_to<T>(&self, items: &mut [T])

Source

pub fn as_slice(&self) -> &[usize]

Trait Implementations§

Source§

impl Debug for IndexNewToOld

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Index<usize> for IndexNewToOld

Source§

type Output = usize

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more