asr::game_engine::unity::il2cpp

Struct Class

Source
pub struct Class { /* private fields */ }
Available on crate feature unity only.
Expand description

A .NET class that is part of an Image.

Implementations§

Source§

impl Class

Source

pub fn get_field_offset( &self, process: &Process, module: &Module, field_name: &str, ) -> Option<u32>

Tries to find a field with the specified name in the class. This returns the offset of the field from the start of an instance of the class. If it’s a static field, the offset will be from the start of the static table.

Source

pub async fn wait_get_static_instance( &self, process: &Process, module: &Module, field_name: &str, ) -> Address

Tries to find the address of a static instance of the class based on its field name. This waits until the field is not null.

Source

pub fn get_static_table( &self, process: &Process, module: &Module, ) -> Option<Address>

Returns the address of the static table of the class. This contains the values of all the static fields.

Source

pub fn get_parent(&self, process: &Process, module: &Module) -> Option<Class>

Tries to find the parent class.

Source

pub async fn wait_get_field_offset( &self, process: &Process, module: &Module, name: &str, ) -> u32

Tries to find a field with the specified name in the class. This returns the offset of the field from the start of an instance of the class. If it’s a static field, the offset will be from the start of the static table. This is the awaitable version of the get_field_offset function.

Source

pub async fn wait_get_static_table( &self, process: &Process, module: &Module, ) -> Address

Returns the address of the static table of the class. This contains the values of all the static fields. This is the awaitable version of the get_static_table function.

Source

pub async fn wait_get_parent(&self, process: &Process, module: &Module) -> Class

Tries to find the parent class. This is the awaitable version of the get_parent function.

Trait Implementations§

Source§

impl Clone for Class

Source§

fn clone(&self) -> Class

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Class

Auto Trait Implementations§

§

impl Freeze for Class

§

impl RefUnwindSafe for Class

§

impl Send for Class

§

impl Sync for Class

§

impl Unpin for Class

§

impl UnwindSafe for Class

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.