[][src]Struct soa_derive_example::ParticlePtr

pub struct ParticlePtr {
    pub mass: *const f64,
    pub position: *const [f64; 3],
    pub kind: *const usize,
    pub name: *const String,
}

An analog of a pointer to Particle with struct of array layout.

Fields

mass: *const f64

A pointer to a mass from a ParticleVec

position: *const [f64; 3]

A pointer to a position from a ParticleVec

kind: *const usize

A pointer to a kind from a ParticleVec

name: *const String

A pointer to a name from a ParticleVec

Implementations

impl ParticlePtr[src]

pub fn as_mut_ptr(&self) -> ParticlePtrMut[src]

Convert a ParticlePtr to a ParticlePtrMut ; i.e. do a *const T as *mut T transformation.

pub fn is_null(self) -> bool[src]

Similar to *const T::is_null().

pub unsafe fn as_ref<'a>(self) -> Option<ParticleRef<'a>>[src]

Similar to *const T::as_ref(), with the same safety caveats.

pub unsafe fn offset(self, count: isize) -> ParticlePtr[src]

Similar to *const T::offset(), with the same safety caveats.

pub fn wrapping_offset(self, count: isize) -> ParticlePtr[src]

Similar to *const T::offset().

pub unsafe fn add(self, count: usize) -> ParticlePtr[src]

Similar to *const T::add(), with the same safety caveats.

pub unsafe fn sub(self, count: usize) -> ParticlePtr[src]

Similar to *const T::sub(), with the same safety caveats.

pub fn wrapping_add(self, count: usize) -> ParticlePtr[src]

pub fn wrapping_sub(self, count: usize) -> ParticlePtr[src]

pub unsafe fn read(self) -> Particle[src]

Similar to *const T::read(), with the same safety caveats.

pub unsafe fn read_volatile(self) -> Particle[src]

Similar to *const T::read_volatile(), with the same safety caveats.

pub unsafe fn read_unaligned(self) -> Particle[src]

Similar to *const T::read_unaligned(), with the same safety caveats.

Trait Implementations

impl Clone for ParticlePtr[src]

impl Copy for ParticlePtr[src]

impl Debug for ParticlePtr[src]

impl PartialEq<ParticlePtr> for ParticlePtr[src]

impl StructuralPartialEq for ParticlePtr[src]

Auto Trait Implementations

impl RefUnwindSafe for ParticlePtr

impl !Send for ParticlePtr

impl !Sync for ParticlePtr

impl Unpin for ParticlePtr

impl UnwindSafe for ParticlePtr

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.