Struct pelite::pe32::PeFile[][src]

pub struct PeFile<'a> { /* fields omitted */ }

View into an unmapped PE file.

Methods

impl<'a> PeFile<'a>
[src]

Constructs a file view from a byte slice.

Errors

  • Bounds: The byte slice is too small to fit the PE headers.

  • Misaligned: The minimum alignment of 4 is not satisfied.

  • BadMagic: This is not a PE file.

  • PeMagic: Trying to parse a PE32 file with the PE32+ parser and vice versa.

  • Insanity: Reasonable limits on e_lfanew, SizeOfHeaders or NumberOfSections are exceeded.

Converts the file to section alignment.

Trait Implementations

impl<'a> Copy for PeFile<'a>
[src]

impl<'a> Clone for PeFile<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Pe<'a> for PeFile<'a>
[src]

Returns the image as a byte slice.

Returns whether this image uses file alignment or section alignment.

Slices the image at the specified rva. Read more

Reads the image at the specified va. Read more

Returns the DOS header.

Returns the DOS image. Read more

Returns the NT headers.

Returns the file header.

Returns the optional header.

Returns the data directory.

Returns the section headers.

Returns the pe headers together in a single struct.

Converts a relative virtual address to file offset. Read more

Converts a file offset to relative virtual address. Read more

Converts from relative virtual address to virtual address. Read more

Converts from virtual address to relative virtual address. Read more

Slices the image at the specified rva returning a byte slice with no alignment or minimum size. Read more

Reads the image at the specified va returning a byte slice with no alignment or minimum size. Read more

Reads an aligned pod T.

Reads an unaligned pod T.

Reads and byte-wise copies the content to the given destination. Read more

Reads an array of pod T with given length.

Reads an array of pod T. Read more

Reads an array of pod T. Read more

Reads a nul-terminated C string.

Reads a string.

Dereferences the pointer to a pod T.

Dereferences the pointer to an unaligned pod T.

Reads and byte-wise copies the content to the given destination. Read more

Reads an array of pod T with given length.

Reads an array of pod T. Read more

Reads an array of pod T. Read more

Dereferences the pointer to a nul-terminated C string.

Dereferences the pointer to a string.

Gets the Export Directory. Read more

Gets the Import Directory. Read more

Gets the Import Address Table. Read more

Gets the Base Relocations Directory. Read more

Gets the Load Config Directory. Read more

Gets the TLS Directory. Read more

Gets the Security Directory. Read more

Gets the Exception Directory. Read more

Gets the Debug Directory. Read more

Gets the Resources. Read more

Gets Scanner access. Read more

impl<'a> Serialize for PeFile<'a>
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl<'a> Send for PeFile<'a>

impl<'a> Sync for PeFile<'a>