[]Struct lumol::sys::ParticleSliceMut

pub struct ParticleSliceMut<'a> {
    pub name: &'a mut [String],
    pub kind: &'a mut [ParticleKind],
    pub charge: &'a mut [f64],
    pub mass: &'a mut [f64],
    pub position: &'a mut [Vector3D],
    pub velocity: &'a mut [Vector3D],
}

A mutable slice of Particle inside a ParticleVec .

Fields

name: &'a mut [String]

A mutable slice of name from a ParticleVec

kind: &'a mut [ParticleKind]

A mutable slice of kind from a ParticleVec

charge: &'a mut [f64]

A mutable slice of charge from a ParticleVec

mass: &'a mut [f64]

A mutable slice of mass from a ParticleVec

position: &'a mut [Vector3D]

A mutable slice of position from a ParticleVec

velocity: &'a mut [Vector3D]

A mutable slice of velocity from a ParticleVec

Methods

impl<'a> ParticleSliceMut<'a>

pub fn as_ref(&self) -> ParticleSlice

Convert a ParticleSliceMut to a ParticleSlice in order to be able to use the methods on the non mutable version of the slices.

pub fn len(&self) -> usize

Similar to [Particle] ::len(), the length of all fields should be the same.

pub fn is_empty(&self) -> bool

Similar to [Particle] ::is_empty(), the length of all fields should be the same.

pub fn first_mut(&mut self) -> Option<ParticleRefMut>

pub fn split_first_mut(&mut self) -> Option<(ParticleRefMut, ParticleSliceMut)>

pub fn last_mut(&mut self) -> Option<ParticleRefMut>

pub fn split_last_mut(&mut self) -> Option<(ParticleRefMut, ParticleSliceMut)>

pub fn split_at_mut(
    &mut self,
    mid: usize
) -> (ParticleSliceMut, ParticleSliceMut)

pub fn swap(&mut self, a: usize, b: usize)

Similar to [Particle] ::swap().

pub fn get(&self, i: usize) -> Option<ParticleRef>

Similar to [Particle] ::get().

pub unsafe fn get_unchecked(&self, i: usize) -> ParticleRef

pub fn get_mut(&mut self, i: usize) -> Option<ParticleRefMut>

pub unsafe fn get_unchecked_mut(&mut self, i: usize) -> ParticleRefMut

pub fn as_ptr(&self) -> ParticlePtr

pub fn as_mut_ptr(&mut self) -> ParticlePtrMut

pub unsafe fn from_raw_parts_mut<'b>(
    data: ParticlePtrMut,
    len: usize
) -> ParticleSliceMut<'b>

impl<'a> ParticleSliceMut<'a>

pub fn to_vec(&self) -> ParticleVec

impl<'a> ParticleSliceMut<'a>

pub fn iter(&mut self) -> Iter

Get an iterator over the ParticleRef in this vector

pub fn iter_mut(&mut self) -> IterMut

Get a mutable iterator over the ParticleRefMut in this vector

Trait Implementations

impl<'a> IntoIterator for ParticleSliceMut<'a>

type Item = ParticleRefMut<'a>

The type of the elements being iterated over.

type IntoIter = IterMut<'a>

Which kind of iterator are we turning this into?

impl<'a> Debug for ParticleSliceMut<'a>

Auto Trait Implementations

impl<'a> Send for ParticleSliceMut<'a>

impl<'a> Sync for ParticleSliceMut<'a>

Blanket Implementations

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]