Trait Optional

Source
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.

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.

Implementors§