Struct libil2cpp::MethodInfo
source · [−]#[repr(transparent)]pub struct MethodInfo(_);
Expand description
Information about a C# method
Implementations
sourceimpl MethodInfo
impl MethodInfo
sourcepub fn invoke<T, A, R, const N: usize>(
&self,
this: T,
args: A
) -> Result<R, &mut Il2CppException> where
T: ThisArgument,
A: Arguments<N>,
R: Returned,
pub fn invoke<T, A, R, const N: usize>(
&self,
this: T,
args: A
) -> Result<R, &mut Il2CppException> where
T: ThisArgument,
A: Arguments<N>,
R: Returned,
Invoke this method, type checking against its signature with the provided instance, arguments and return type
sourcepub unsafe fn invoke_unchecked<T, A, R, const N: usize>(
&self,
this: T,
args: A
) -> Result<R, &mut Il2CppException> where
T: ThisArgument,
A: Arguments<N>,
R: Returned,
pub unsafe fn invoke_unchecked<T, A, R, const N: usize>(
&self,
this: T,
args: A
) -> Result<R, &mut Il2CppException> where
T: ThisArgument,
A: Arguments<N>,
R: Returned,
Invoke this method with the given instance and arguments and converting the result to the specified type, without type checking
Safety
To be safe, the provided types have to match the method signature
sourcepub unsafe fn invoke_raw<'ok, 'err>(
&self,
this: *mut c_void,
args: &mut [*mut c_void]
) -> Result<Option<&'ok mut Il2CppObject>, &'err mut Il2CppException>
pub unsafe fn invoke_raw<'ok, 'err>(
&self,
this: *mut c_void,
args: &mut [*mut c_void]
) -> Result<Option<&'ok mut Il2CppObject>, &'err mut Il2CppException>
Invokes this method with the given raw instance and arguments, without performing any checks
Safety
To be safe, the provided instance and arguments have to match the method signature
sourcepub fn reflection_object(&self) -> &Il2CppReflectionMethod
pub fn reflection_object(&self) -> &Il2CppReflectionMethod
Il2CppReflectionMethod
which represents the method
sourcepub fn class(&self) -> &Il2CppClass
pub fn class(&self) -> &Il2CppClass
Class the method is from
sourcepub fn return_ty(&self) -> &Il2CppType
pub fn return_ty(&self) -> &Il2CppType
Return type of the method
sourcepub fn parameters(&self) -> &'_ [ParameterInfo]
pub fn parameters(&self) -> &'_ [ParameterInfo]
Parameters the method takes
sourcepub fn is_abstract(&self) -> bool
pub fn is_abstract(&self) -> bool
Whether the method is abstract
sourcepub fn is_virtual(&self) -> bool
pub fn is_virtual(&self) -> bool
Whether the method is virtual
sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Whether the method is generic
Trait Implementations
sourceimpl Debug for MethodInfo
impl Debug for MethodInfo
sourceimpl Display for MethodInfo
impl Display for MethodInfo
sourceimpl WrapRaw for MethodInfo
impl WrapRaw for MethodInfo
type Raw = MethodInfo
type Raw = MethodInfo
Raw il2cpp type
sourceunsafe fn raw_mut(&mut self) -> &mut Self::Raw
unsafe fn raw_mut(&mut self) -> &mut Self::Raw
Returns a mutable reference to the underlying raw il2cpp type Read more
sourceunsafe fn wrap_mut(raw: &mut Self::Raw) -> &mut Self
unsafe fn wrap_mut(raw: &mut Self::Raw) -> &mut Self
Wraps a mutable reference to the raw il2cpp type Read more
impl Send for MethodInfo
impl Sync for MethodInfo
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more