Skip to main content

Ext2

Trait Ext2 

Source
pub trait Ext2 {
    // Required method
    fn invert_permutation(&mut self);
}

Required Methods§

Source

fn invert_permutation(&mut self)

Transforms the slice in the inverse permutation.

§Panics

This function panics if any value in self is not in 0..self.len().

§Example:
let mut p = [1, 3, 2, 0];
p.invert_permutation();
assert_eq!(p, [3, 0, 2, 1]);

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Ext2 for [isize]

Implementors§