pub trait ScratchElement:
ScratchElementSealed
+ Copy
+ Send
+ Sync
+ 'static {
const ALIGN_BYTES: usize;
}Expand description
Element types that the scratch pool can manage.
Implemented for f32, f64, u8, common integer types, and (with the
eunomia feature) eunomia::Complex<f32> and eunomia::Complex<f64>.
With the bytemuck feature, a blanket impl covers any
bytemuck::Zeroable + Copy + Send + Sync + 'static type — including
arbitrary repr(C) POD structs that derive Zeroable.
§Safety invariant
Every implementor must tolerate an all-zero bit pattern as a valid,
non-trapping value. This is true for all floating-point scalars (±0.0),
all integers (0), eunomia complex numbers, and any type that implements
bytemuck::Zeroable. Types with validity invariants (e.g. non-null
pointers, Rust references, enums with niche optimizations) must not
implement this trait.
Required Associated Constants§
Sourceconst ALIGN_BYTES: usize
const ALIGN_BYTES: usize
Alignment in bytes required for SIMD operations on this element type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".