Struct pelite::pe64::exports::By

source ·
pub struct By<'a, P> { /* private fields */ }
Expand description

Export directory symbol lookup.

Implementations

Gets the export address table.

Gets the name address table.

The values are RVAs to the exported function’s name, to find its export look at the name index table with the same index.

The names are sorted allowing binary search lookup.

Gets the name index table.

The values are indices (not ordinals!) into the export address table matching name with the same index in the name address table.

Validates and checks if the name table is sorted.

The PE specification says that the list of names should be sorted to allow binary search. This function checks if the names table is actually sorted, if not then various name based lookup functions may fail to find certain exports.

Returns an error if a name entry cannot be read or is otherwise corrupt.

Looks up an Export by its ordinal.

Looks up an Export by its name.

Does a linear scan over the name table. If the name table isn’t sorted this will still be able to find exported functions by name.

Gracefully handles corrupted name entries by ignoring them.

Looks up an Export by its name.

If the name table isn’t sorted, certain exported functions may fail to be found.

Looks up an Export by its import.

Looks up an export by its index.

Looks up an export by its hint.

Looks up an export by its hint and falls back to the name if the hint is incorrect.

Looks up the name for a hint.

Given an index in the functions array, gets the named export.

Note that this does a linear scan to find its name, if this is called in a loop over all the exported functions you are accidentally quadratic.

See iter_names to iterate over the exported names in linear time.

Iterate over exported functions.

Not every exported function has a name, some are exported by ordinal. Looking up the exported function’s name with name_lookup results in quadratic performance. If the exported function’s name is important consider building a cache or using iter_names instead.

Iterate over functions exported by name.

Iterate over functions exported by name, returning their name and index in the functions table.

Methods from Deref<Target = Exports<'a, P>>

Gets the PE instance.

Returns the underlying export directory image.

Gets the export directory’s name for this library.

Gets the ordinal base for the exported functions.

Gets the export address table.

Gets the name address table.

The values are RVAs to the exported function’s name, to find its export look at the name index table with the same index.

The names are sorted allowing binary search lookup.

Gets the name index table.

The values are indices (not ordinals!) into the export address table matching name with the same index in the name address table.

Query the exports.

This specifically validates whether the functions, names and name indices are valid.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Serialize this value into the given Serde serializer. Read more

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.

Calls U::from(self).

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

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.