pub unsafe trait HostElement: Copy + 'static {
const ELEMENT_TYPE: ElementType;
}Expand description
A Rust type that can be copied to and from a Buffer as is.
§Safety
Implementors must be plain old data without padding whose in-memory
representation matches HostElement::ELEMENT_TYPE, and every bit
pattern of that size must be a valid value.
Required Associated Constants§
Sourceconst ELEMENT_TYPE: ElementType
const ELEMENT_TYPE: ElementType
The matching element type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".