pub unsafe trait Transparent {
type Inner;
const OFFSET: usize;
}
Expand description
A type that can be encoded as a transparent wrapper around an inner type.
§Safety
The caller must ensure that there is only one non-zero-sized field in the struct, at the provided offset, and that constructing the struct by writing just that field is safe.
Required Associated Constants§
Required Associated Types§
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.