pub trait Optional: Sized {
    // Required methods
    fn get_subsystem(&self) -> Option<Subsystem>;
    fn get_dll_characteristics(&self) -> Option<DLLCharacteristics>;
    fn parse_optional_header(
        binary: &[u8],
        offset: &mut usize
    ) -> Result<Self, Error>;
}
Expand description

Helper functions for optional header structs

Required Methods§

source

fn get_subsystem(&self) -> Option<Subsystem>

Returns the subsystem as an enum

source

fn get_dll_characteristics(&self) -> Option<DLLCharacteristics>

Returns the DLL Characteristics as bitflags

source

fn parse_optional_header( binary: &[u8], offset: &mut usize ) -> Result<Self, Error>

Parse optional header (either PE32, or PE32+) starting at the given offset.

Implementors§