pub unsafe trait Pod: 'static {
fn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
{ ... }
fn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
{ ... }
}
Expand description
Defines types which can be safely transmute
d from any bit pattern.
Types which need to be read from PE files should implement this.
Safety
It must be safe to transmute any byte array (with length equal to the size of the type) to this type.
The type should be annotated by #[repr(C)]
.