pub struct ApiSetMap<'a> { /* private fields */ }
Expand description
Root structure describing an API Set Map.
Implementations§
Source§impl<'a> ApiSetMap<'a>
impl<'a> ApiSetMap<'a>
Sourcepub fn flags(&self) -> ApiSetMapFlags
pub fn flags(&self) -> ApiSetMapFlags
Returns flags set for this ApiSetMap
as specified by ApiSetMapFlags
.
Sourcepub fn find_namespace_entry(
&self,
namespace_entry_name: &str,
) -> Option<Result<ApiSetNamespaceEntry<'a>>>
pub fn find_namespace_entry( &self, namespace_entry_name: &str, ) -> Option<Result<ApiSetNamespaceEntry<'a>>>
Finds a namespace entry efficiently in the hash table of the API Set Map.
namespace_entry_name
must be non-empty and only consist of lowercase characters, digits, and hyphens.
This is asserted in debug builds.
If you fail to adhere to these requirements in release builds, the lookup will be performed anyway and return None
.
Sourcepub fn hash_entries(&self) -> Result<ApiSetHashEntries<'a>>
pub fn hash_entries(&self) -> Result<ApiSetHashEntries<'a>>
Returns an iterator over the ApiSetHashEntry
s of this ApiSetMap
.
You usually don’t need to iterate through the hash entries manually.
Use find_namespace_entry
instead.
Sourcepub fn namespace_entries(&self) -> Result<ApiSetNamespaceEntries<'a>>
pub fn namespace_entries(&self) -> Result<ApiSetNamespaceEntries<'a>>
Returns an iterator over the ApiSetNamespaceEntry
elements of this ApiSetMap
.
Alternatively, you can lookup a specific namespace entry via the find_namespace_entry
method.
Sourcepub fn try_from_pe64<T>(pe64: T) -> Result<Self>where
T: Pe<'a>,
Available on crate feature pelite
only.
pub fn try_from_pe64<T>(pe64: T) -> Result<Self>where
T: Pe<'a>,
pelite
only.Creates an ApiSetMap
from an API Set Map file opened via the pelite
crate.
If you already have the raw bytes of the .apiset
section of that file, consider using try_from_apiset_section_bytes
.
Sourcepub fn try_from_apiset_section_bytes(section_bytes: &'a [u8]) -> Result<Self>
pub fn try_from_apiset_section_bytes(section_bytes: &'a [u8]) -> Result<Self>
Creates an ApiSetMap
from the raw bytes of the .apiset
section of an API Set Map file.
If you only have the DLL file and not the .apiset
section bytes, consider using try_from_pe64
.