pub struct Method {Show 17 fields
pub address: *mut c_void,
pub token: u32,
pub name: String,
pub class: Option<*const Class>,
pub return_type: Type,
pub flags: i32,
pub is_static: bool,
pub function: *mut c_void,
pub rva: u64,
pub va: u64,
pub args: Vec<Arg>,
pub is_generic: bool,
pub is_inflated: bool,
pub is_instance: bool,
pub param_count: u8,
pub declaring_type: *mut c_void,
pub instance: Option<*mut c_void>,
}Expand description
Hydrated IL2CPP method metadata plus optional bound instance state.
Fields§
§address: *mut c_voidPointer to the internal IL2CPP method structure
token: u32Metadata token for this method
name: StringName of the method
class: Option<*const Class>Class defining this method
return_type: TypeReturn type of the method
flags: i32Flags associated with the method
is_static: boolWhether the method is static
function: *mut c_voidPointer to the potentially compiled native function
rva: u64Relative Virtual Address of the method (static offset from image base)
va: u64Virtual Address of the method at runtime (includes ASLR slide)
args: Vec<Arg>List of arguments for this method
is_generic: boolWhether the method is generic
is_inflated: boolWhether the method is an inflated generic method
is_instance: boolWhether the method is an instance method
param_count: u8Number of parameters this method accepts
declaring_type: *mut c_voidPointer to the declaring type
instance: Option<*mut c_void>Instance pointer for instance methods
Implementations§
Source§impl Method
Implementation of Method operations
impl Method
Implementation of Method operations
Sourcepub unsafe fn call<T: Copy>(&self, params: &[*mut c_void]) -> Result<T, String>
pub unsafe fn call<T: Copy>(&self, params: &[*mut c_void]) -> Result<T, String>
Invokes the method with the provided parameter pointers.
For static methods, self.instance is ignored. For instance methods,
the method must either have been returned from Object::method(...) or
have its instance pointer set manually.
T must match the actual managed return shape:
- use pointer-sized types for reference returns
- use the concrete value type for value-type returns
- use
()forvoid
Managed exceptions are converted into Err(String).
Sourcepub fn get_attribute(&self) -> &'static str
pub fn get_attribute(&self) -> &'static str
Gets the access modifier attribute string