Trait pelite::util::Pod

source ·
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 transmuted 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)].

Provided Methods

Implementations on Foreign Types

Implementors

source

impl Pod for IMAGE_RESOURCE_DATA_ENTRY

source

impl Pod for IMAGE_RESOURCE_DIRECTORY_ENTRY