Trait Soapy

Source
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§

Source

type Raw: SoaRaw<Item = Self>

Implements internal, unsafe, low-level routines used by Soa

Source

type Deref: ?Sized + SoaDeref<Item = Self>

Slice dereferences to this type to provide getters for the individual fields as slices.

Source

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.

Source

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.

Source

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].

Source

type Slices<'a> where Self: 'a

The slices that make up a Slice.

For each field with type T, this type has a field with type &[T].

Source

type SlicesMut<'a> where Self: 'a

The mutable slices that make up a Slice.

For each field with type T, this type has a field with type &mut [T].

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§