soa-derive
soa-derive copied to clipboard
#[soa_attr] on field
Sometimes we want to add attribute to generated struct's field. For example:
#[derive(StructOfArray)]
#[soa_derive(Serialize, Deserialize)]
struct Point {
x: f32,
y: f32,
// Skip serialization for PointVec::meta
#[soa_attr(Vec, serde(skip))]
meta: bool,
}