[][src]Struct soa_vec::Soa4

pub struct Soa4<T1: Sized, T2: Sized, T3: Sized, T4: Sized> { /* fields omitted */ }

Stores slices in a struct-of-arrays style with the API of Vec. The advantage over simply using multiple Vec is that all slices live in a single allocation, there's one shared len/capacity variable, and the API ensures that items are kept together through all operations like push/pop/sort

Methods

impl<T1: Sized, T2: Sized, T3: Sized, T4: Sized> Soa4<T1, T2, T3, T4>[src]

pub fn new() -> Soa4<T1, T2, T3, T4>[src]

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

pub fn clear(&mut self)[src]

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

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

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

##Panics:

  • Must panic if index is out of bounds

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

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

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

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

Panics

  • If index is >= len

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

Trait Implementations

impl<T1: Sized, T2: Sized, T3: Sized, T4: Sized> Drop for Soa4<T1, T2, T3, T4>[src]

impl<T1: Clone + Sized, T2: Clone + Sized, T3: Clone + Sized, T4: Clone + Sized> Clone for Soa4<T1, T2, T3, T4>[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T1, T2, T3, T4> !Send for Soa4<T1, T2, T3, T4>

impl<T1, T2, T3, T4> !Sync for Soa4<T1, T2, T3, T4>

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]