pub unsafe trait ToByteArray: Copy {
type Align: AsRef<[u8]>;
type Bytes: AsRef<[u8]>;
// Required method
fn to_bytes(self) -> Self::Bytes;
}Expand description
Types which can be transmuted to a byte array.
§Safety
This type must only be implemented for Copy types which contain no
padding.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".