[−][src]Struct soa_derive_example::ParticleSlice
A slice of
Particle
inside a
ParticleVec
.
Fields
mass: &'a [f64]A slice of mass from a ParticleVec
position: &'a [[f64; 3]]A slice of position from a ParticleVec
kind: &'a [usize]A slice of kind from a ParticleVec
name: &'a [String]A slice of name from a ParticleVec
Implementations
impl<'a> ParticleSlice<'a>[src]
pub fn iter(&self) -> Iter<'_>[src]
Get an iterator over the
ParticleRef
in this slice.
impl<'a> ParticleSlice<'a>[src]
pub fn len(&self) -> usize[src]
Similar to [Particle] ::len(),
the length of all fields should be the same.
pub fn is_empty(&self) -> bool[src]
Similar to [Particle] ::is_empty(),
the length of all fields should be the same.
pub fn first(&self) -> Option<ParticleRef<'a>>[src]
Similar to [Particle] ::first().
pub fn split_first(&self) -> Option<(ParticleRef<'a>, ParticleSlice<'a>)>[src]
Similar to [Particle] ::split_first().
pub fn last(&self) -> Option<ParticleRef<'a>>[src]
Similar to [Particle] ::last().
pub fn split_last(&self) -> Option<(ParticleRef<'a>, ParticleSlice<'a>)>[src]
Similar to [Particle] ::split_last().
pub fn split_at(&self, mid: usize) -> (ParticleSlice<'a>, ParticleSlice<'a>)[src]
Similar to [Particle] ::split_at().
pub fn get<'b, I>(&'b self, index: I) -> Option<I::RefOutput> where
I: SoAIndex<ParticleSlice<'b>>,
'a: 'b, [src]
I: SoAIndex<ParticleSlice<'b>>,
'a: 'b,
Similar to [Particle] ::get().
pub unsafe fn get_unchecked<'b, I>(&'b self, index: I) -> I::RefOutput where
I: SoAIndex<ParticleSlice<'b>>,
'a: 'b, [src]
I: SoAIndex<ParticleSlice<'b>>,
'a: 'b,
Similar to [Particle] ::get_unchecked().
pub fn index<'b, I>(&'b self, index: I) -> I::RefOutput where
I: SoAIndex<ParticleSlice<'b>>,
'a: 'b, [src]
I: SoAIndex<ParticleSlice<'b>>,
'a: 'b,
Similar to std::ops::Index trait on
[Particle]
.
This is required because we cannot implement std::ops::Index directly since it requires returning a reference.
pub fn reborrow<'b>(&'b self) -> ParticleSlice<'b> where
'a: 'b, [src]
'a: 'b,
Reborrows the slices in a narrower lifetime
pub fn as_ptr(&self) -> ParticlePtr[src]
Similar to [Particle] ::as_ptr().
pub unsafe fn from_raw_parts<'b>(
data: ParticlePtr,
len: usize
) -> ParticleSlice<'b>[src]
data: ParticlePtr,
len: usize
) -> ParticleSlice<'b>
Similar to std::slice::from_raw_parts().
Trait Implementations
impl<'a> Clone for ParticleSlice<'a>[src]
fn clone(&self) -> ParticleSlice<'a>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a> Copy for ParticleSlice<'a>[src]
impl<'a> Debug for ParticleSlice<'a>[src]
impl<'a> IntoIterator for ParticleSlice<'a>[src]
type Item = ParticleRef<'a>
The type of the elements being iterated over.
type IntoIter = Iter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, 'b> IntoIterator for &'a ParticleSlice<'b>[src]
type Item = ParticleRef<'a>
The type of the elements being iterated over.
type IntoIter = Iter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a> PartialEq<ParticleSlice<'a>> for ParticleSlice<'a>[src]
fn eq(&self, other: &ParticleSlice<'a>) -> bool[src]
fn ne(&self, other: &ParticleSlice<'a>) -> bool[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for usize[src]
type RefOutput = ParticleRef<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for Range<usize>[src]
type RefOutput = ParticleSlice<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for RangeTo<usize>[src]
type RefOutput = ParticleSlice<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for RangeFrom<usize>[src]
type RefOutput = ParticleSlice<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for RangeFull[src]
type RefOutput = ParticleSlice<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for RangeInclusive<usize>[src]
type RefOutput = ParticleSlice<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> SoAIndex<ParticleSlice<'a>> for RangeToInclusive<usize>[src]
type RefOutput = ParticleSlice<'a>
The output for the non-mutable functions
fn get(self, slice: ParticleSlice<'a>) -> Option<Self::RefOutput>[src]
unsafe fn get_unchecked(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
fn index(self, slice: ParticleSlice<'a>) -> Self::RefOutput[src]
impl<'a> StructuralPartialEq for ParticleSlice<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ParticleSlice<'a>
impl<'a> Send for ParticleSlice<'a>
impl<'a> Sync for ParticleSlice<'a>
impl<'a> Unpin for ParticleSlice<'a>
impl<'a> UnwindSafe for ParticleSlice<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator, [src]
I: Iterator,
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?
fn into_iter(self) -> I[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,