[]Struct lumol::sys::ParticleSlice

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

A slice of Particle inside a ParticleVec .

Fields

A slice of name from a ParticleVec

A slice of kind from a ParticleVec

A slice of charge from a ParticleVec

A slice of mass from a ParticleVec

A slice of position from a ParticleVec

A slice of velocity from a ParticleVec

Methods

impl<'a> ParticleSlice<'a>

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

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

Similar to [Particle] ::last().

Similar to [Particle] ::get().

impl<'a> ParticleSlice<'a>

impl<'a> ParticleSlice<'a>

Get an iterator over the ParticleRef in this slice.

Trait Implementations

impl<'a> IntoIterator for ParticleSlice<'a>

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, 'b> IntoIterator for &'a ParticleSlice<'b>

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a> Debug for ParticleSlice<'a>

Formats the value using the given formatter. Read more

impl<'a> Copy for ParticleSlice<'a>

impl<'a> Clone for ParticleSlice<'a>

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a> Send for ParticleSlice<'a>

impl<'a> Sync for ParticleSlice<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more