[][src]Crate soa_derive_example

This crate is an example for the soa_derive crate functionalities. All the code is generated by a single file:

#[macro_use]
extern crate soa_derive;

/// A basic Particle type
#[derive(Debug, PartialEq, StructOfArray)]
#[soa_derive = "Debug, PartialEq"]
pub struct Particle {
    /// Mass of the particle
    pub mass: f64,
    /// Position of the particle
    pub position: [f64; 3],
    /// Kind of the particle
    pub kind: usize,
    /// Name of the particle
    pub name: String,
}

Structs

Particle

A basic Particle type

ParticlePtr

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

ParticlePtrMut

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

ParticleRef

A reference to a Particle with struct of array layout.

ParticleRefMut

A mutable reference to a Particle with struct of array layout.

ParticleSlice

A slice of Particle inside a ParticleVec .

ParticleSliceMut

A mutable slice of Particle inside a ParticleVec .

ParticleVec

An analog to Vec<Particle> with Struct of Array (SoA) layout