[][src]Trait object::read::pe::ImageNtHeaders

pub trait ImageNtHeaders: Debug + Pod {
    type ImageOptionalHeader: ImageOptionalHeader;
    pub fn is_type_64(&self) -> bool;
pub fn is_valid_optional_magic(&self) -> bool;
pub fn signature(&self) -> u32;
pub fn file_header(&self) -> &ImageFileHeader;
pub fn optional_header(&self) -> &Self::ImageOptionalHeader; pub fn parse<'data>(
        dos_header: &ImageDosHeader,
        data: Bytes<'data>
    ) -> Result<(&'data Self, &'data [ImageDataDirectory], Bytes<'data>)> { ... }
pub fn sections<'data>(
        &self,
        nt_tail: Bytes<'data>
    ) -> Result<SectionTable<'data>> { ... }
pub fn symbols<'data>(
        &self,
        data: Bytes<'data>
    ) -> Result<SymbolTable<'data>> { ... } }

A trait for generic access to ImageNtHeaders32 and ImageNtHeaders64.

Associated Types

type ImageOptionalHeader: ImageOptionalHeader[src]

Loading content...

Required methods

pub fn is_type_64(&self) -> bool[src]

Return true if this type is a 64-bit header.

This is a property of the type, not a value in the header data.

pub fn is_valid_optional_magic(&self) -> bool[src]

Return true if the magic field in the optional header is valid.

pub fn signature(&self) -> u32[src]

Return the signature

pub fn file_header(&self) -> &ImageFileHeader[src]

Return the file header.

pub fn optional_header(&self) -> &Self::ImageOptionalHeader[src]

Return the optional header.

Loading content...

Provided methods

pub fn parse<'data>(
    dos_header: &ImageDosHeader,
    data: Bytes<'data>
) -> Result<(&'data Self, &'data [ImageDataDirectory], Bytes<'data>)>
[src]

Read the NT headers, including the data directories.

The DOS header is required to determine the NT headers offset.

The given data must be for the entire file. Returns the data following the NT headers, which will contain the section headers.

Also checks that the signature and magic fields in the headers are valid.

pub fn sections<'data>(
    &self,
    nt_tail: Bytes<'data>
) -> Result<SectionTable<'data>>
[src]

Read the section table.

nt_tail must be the data following the NT headers.

pub fn symbols<'data>(&self, data: Bytes<'data>) -> Result<SymbolTable<'data>>[src]

Read the symbol table and string table.

data must be the entire file data.

Loading content...

Implementors

impl ImageNtHeaders for ImageNtHeaders32[src]

type ImageOptionalHeader = ImageOptionalHeader32

impl ImageNtHeaders for ImageNtHeaders64[src]

type ImageOptionalHeader = ImageOptionalHeader64

Loading content...