pub unsafe trait Soapy: AsSoaRef<Item = Self> {
type Raw: SoaRaw<Item = Self>;
type Deref: ?Sized + SoaDeref<Item = Self>;
type Ref<'a>: Copy + Clone + AsSoaRef<Item = Self>
where Self: 'a;
type RefMut<'a>: AsSoaRef<Item = Self>
where Self: 'a;
type Array<const N: usize>: SoaArray<Item = Self>;
type Slices<'a>
where Self: 'a;
type SlicesMut<'a>
where Self: 'a;
}
Expand description
Provides Soa
compatibility.
§Safety
Soapy::Deref
mut be #[repr(transparent)]
with Slice<Self::Raw>
.
This trait should be derived using the derive macro.
Required Associated Types§
sourcetype Deref: ?Sized + SoaDeref<Item = Self>
type Deref: ?Sized + SoaDeref<Item = Self>
Slice
dereferences to this type to provide getters for the individual
fields as slices.
sourcetype Ref<'a>: Copy + Clone + AsSoaRef<Item = Self>
where
Self: 'a
type Ref<'a>: Copy + Clone + AsSoaRef<Item = Self> where Self: 'a
A reference to an element of a Slice
.
For each field with type T
, this type has a field with type &T
.
sourcetype RefMut<'a>: AsSoaRef<Item = Self>
where
Self: 'a
type RefMut<'a>: AsSoaRef<Item = Self> where Self: 'a
A reference to an element of a Slice
.
For each field with type T
, this type has a field with type &mut T
.
sourcetype Array<const N: usize>: SoaArray<Item = Self>
type Array<const N: usize>: SoaArray<Item = Self>
The SoA array type.
For each field with type T
, this type has a field with type [T; N]
.
Object Safety§
This trait is not object safe.