[][src]Struct soa_vec::Soa7

pub struct Soa7<T1: Sized, T2: Sized, T3: Sized, T4: Sized, T5: Sized, T6: Sized, T7: Sized> { /* fields omitted */ }

Struct of arrays storage with vec API. See module docs for more information.

Methods

impl<T1: Sized, T2: Sized, T3: Sized, T4: Sized, T5: Sized, T6: Sized, T7: Sized> Soa7<T1, T2, T3, T4, T5, T6, T7>[src]

pub fn new() -> Soa7<T1, T2, T3, T4, T5, T6, T7>[src]

Creates a new Soa with a capacity of 0

pub fn len(&self) -> usize[src]

Returns the number of tuples in the soa, also referred to as its 'length'.

pub fn clear(&mut self)[src]

Clears the soa, removing all values. Note that this method has no effect on the allocated capacity of the soa.

pub fn push(&mut self, value: (T1, T2, T3, T4, T5, T6, T7))[src]

Appends a tuple to the back of a soa.

pub fn pop(&mut self) -> Option<(T1, T2, T3, T4, T5, T6, T7)>[src]

Removes the last tuple from a soa and returns it, or None if it is empty.

pub fn swap_remove(&mut self, index: usize) -> (T1, T2, T3, T4, T5, T6, T7)[src]

Removes a tuple from the soa and returns it. The removed tuple is replaced by the last tuple of the soa. This does not preserve ordering, but is O(1).

Panics:

  • Must panic if index is out of bounds

pub fn slices<'a>(
    &self
) -> (&'a [T1], &'a [T2], &'a [T3], &'a [T4], &'a [T5], &'a [T6], &'a [T7])
[src]

Returns a tuple of all the destructured tuples added to this soa.

pub fn iters<'a>(
    &self
) -> (Iter<'a, T1>, Iter<'a, T2>, Iter<'a, T3>, Iter<'a, T4>, Iter<'a, T5>, Iter<'a, T6>, Iter<'a, T7>)
[src]

Returns a tuple of iterators over each field in the soa.

pub fn iters_mut<'a>(
    &mut self
) -> (IterMut<'a, T1>, IterMut<'a, T2>, IterMut<'a, T3>, IterMut<'a, T4>, IterMut<'a, T5>, IterMut<'a, T6>, IterMut<'a, T7>)
[src]

Returns a tuple of mutable iterators over each field in the soa.

pub fn slices_mut<'a>(
    &self
) -> (&'a mut [T1], &'a mut [T2], &'a mut [T3], &'a mut [T4], &'a mut [T5], &'a mut [T6], &'a mut [T7])
[src]

Returns a tuple of all the destructured mutable tuples added to this soa.

pub fn get<'a>(
    &self,
    index: usize
) -> (&'a T1, &'a T2, &'a T3, &'a T4, &'a T5, &'a T6, &'a T7)
[src]

This is analogous to the index operator in vec, but returns a tuple of references.

Panics

  • If index is >= len

pub fn sort_unstable_by<F: FnMut((&T1, &T2, &T3, &T4, &T5, &T6, &T7), (&T1, &T2, &T3, &T4, &T5, &T6, &T7)) -> Ordering>(
    &mut self,
    f: F
)
[src]

Sorts the soa keeping related data together.

Trait Implementations

impl<T1: Sized, T2: Sized, T3: Sized, T4: Sized, T5: Sized, T6: Sized, T7: Sized> Drop for Soa7<T1, T2, T3, T4, T5, T6, T7>[src]

impl<T1: Clone + Sized, T2: Clone + Sized, T3: Clone + Sized, T4: Clone + Sized, T5: Clone + Sized, T6: Clone + Sized, T7: Clone + Sized> Clone for Soa7<T1, T2, T3, T4, T5, T6, T7>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T1: Sized, T2: Sized, T3: Sized, T4: Sized, T5: Sized, T6: Sized, T7: Sized> Default for Soa7<T1, T2, T3, T4, T5, T6, T7>[src]

Auto Trait Implementations

impl<T1, T2, T3, T4, T5, T6, T7> !Send for Soa7<T1, T2, T3, T4, T5, T6, T7>

impl<T1, T2, T3, T4, T5, T6, T7> !Sync for Soa7<T1, T2, T3, T4, T5, T6, T7>

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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