Trait rapier3d::utils::IndexMut2

source ·
pub trait IndexMut2<I>: IndexMut<I> {
    // Required method
    fn index_mut2(
        &mut self,
        i: usize,
        j: usize
    ) -> (&mut Self::Output, &mut Self::Output);

    // Provided method
    fn index_mut_const(
        &mut self,
        i: usize,
        j: usize
    ) -> (&mut Self::Output, &Self::Output) { ... }
}
Expand description

Methods for simultaneously indexing a container with two distinct indices.

Required Methods§

source

fn index_mut2( &mut self, i: usize, j: usize ) -> (&mut Self::Output, &mut Self::Output)

Gets mutable references to two distinct elements of the container.

Panics if i == j.

Provided Methods§

source

fn index_mut_const( &mut self, i: usize, j: usize ) -> (&mut Self::Output, &Self::Output)

Gets a mutable reference to one element, and immutable reference to a second one.

Panics if i == j.

Implementations on Foreign Types§

source§

impl<T> IndexMut2<usize> for [T]

source§

fn index_mut2(&mut self, i: usize, j: usize) -> (&mut T, &mut T)

source§

impl<T> IndexMut2<usize> for Vec<T>

source§

fn index_mut2(&mut self, i: usize, j: usize) -> (&mut T, &mut T)

Implementors§