pub unsafe trait Element<const LEN: usize>: Copy + Freeze{
type Primitive: PrimitiveVector;
}Available on x86 or x86-64 only.
Expand description
A SIMD-compatible element.
§Safety
A type T can soundly implement Element if and only if all of the
following conditions hold:
Tcontains no niches (any bit-pattern forms a valid instance ofT).[T; LEN]has the same size asPrimitive.- The alignment of
Tis less than or equal to that ofPrimitive. [T; LEN]can be soundly transmuted to and fromPrimitive.Tdoes not contain interior mutability.
Required Associated Types§
sourcetype Primitive: PrimitiveVector
type Primitive: PrimitiveVector
The matching primitive vector type.
Object Safety§
This trait is not object safe.