unity::il2cpp::method

Struct MethodInfo

source
#[repr(C)]
pub struct MethodInfo {
Show 14 fields pub method_ptr: *mut u8, pub invoker_method: *const u8, pub name: *const u8, pub class: Option<&'static Il2CppClass>, pub return_type: *const u8, pub parameters: *const ParameterInfo, pub info_or_definition: *const u8, pub generic_method_or_container: *const u8, pub token: u32, pub flags: u16, pub iflags: u16, pub slot: u16, pub parameters_count: u8, pub bitflags: u8,
}
Expand description

Type representing the reflection information of a C# method.

Can be used to query various things such as the name, argument count and much more.

Fields§

§method_ptr: *mut u8§invoker_method: *const u8§name: *const u8§class: Option<&'static Il2CppClass>§return_type: *const u8§parameters: *const ParameterInfo§info_or_definition: *const u8§generic_method_or_container: *const u8§token: u32§flags: u16§iflags: u16§slot: u16§parameters_count: u8§bitflags: u8

Implementations§

source§

impl MethodInfo

source

pub fn new() -> Self

source

pub fn new_from(base: Self) -> Self

source§

impl MethodInfo

source

pub fn get_name(&self) -> Option<String>

Get the name of the method, if set.

source

pub fn get_parameters(&self) -> &[ParameterInfo]

Get the parameters expected by the method.

Trait Implementations§

source§

impl Clone for MethodInfo

source§

fn clone(&self) -> MethodInfo

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
source§

impl Copy for MethodInfo

source§

impl Send for MethodInfo

source§

impl Sync for MethodInfo

Auto Trait Implementations§

§

impl Freeze for MethodInfo

§

impl RefUnwindSafe for MethodInfo

§

impl Unpin for MethodInfo

§

impl UnwindSafe for MethodInfo

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.