Struct ApiSetMap

Source
pub struct ApiSetMap<'a> { /* private fields */ }
Expand description

Root structure describing an API Set Map.

Implementations§

Source§

impl<'a> ApiSetMap<'a>

Source

pub fn flags(&self) -> ApiSetMapFlags

Returns flags set for this ApiSetMap as specified by ApiSetMapFlags.

Source

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.

Source

pub fn hash_entries(&self) -> Result<ApiSetHashEntries<'a>>

Returns an iterator over the ApiSetHashEntrys of this ApiSetMap.

You usually don’t need to iterate through the hash entries manually. Use find_namespace_entry instead.

Source

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.

Source

pub fn try_from_pe64<T>(pe64: T) -> Result<Self>
where T: Pe<'a>,

Available on crate feature 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.

Source

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.

Trait Implementations§

Source§

impl<'a> Debug for ApiSetMap<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ApiSetMap<'a>

§

impl<'a> RefUnwindSafe for ApiSetMap<'a>

§

impl<'a> Send for ApiSetMap<'a>

§

impl<'a> Sync for ApiSetMap<'a>

§

impl<'a> Unpin for ApiSetMap<'a>

§

impl<'a> UnwindSafe for ApiSetMap<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.