pub enum Program<'a> {
    File(PeFile<'a>),
    Mapping(PeView<'a>),
}

Variants

File(PeFile<'a>)

Mapping(PeView<'a>)

Implementations

Safety

This must only be called from the context of a valid PE program. Attempting to call this on a program with malformed or incorrect PE headers is undefined behaviour.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. 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. Read more
Slices the image at the specified rva returning a byte slice with no alignment or minimum size. Read more
Gets the bytes defined by a section header in this image. Read more
Reads the image at the specified va. 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.
Returns the Rich structure.
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
Returns the image as a byte slice.
Returns whether this image uses file alignment or section alignment.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Convenient method to get an exported function. Read more
Convenient method to get the address of an exported function. Read more
Convenient method to get an exported function. Read more
Convenient method to get the address of an exported function. Read more
Convenient method to get an exported function. Read more
Convenient method to get the address of an exported function. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.