Struct libil2cpp::Il2CppClass
source · [−]#[repr(transparent)]pub struct Il2CppClass(_);
Expand description
An il2cpp class
Implementations
sourceimpl Il2CppClass
impl Il2CppClass
sourcepub fn find(namespace: &str, name: &str) -> Option<&'static Self>
pub fn find(namespace: &str, name: &str) -> Option<&'static Self>
Find a class by namespace and name
sourcepub fn find_generic<G>(namespace: &str, name: &str) -> Option<&'static Self> where
G: Generics,
pub fn find_generic<G>(namespace: &str, name: &str) -> Option<&'static Self> where
G: Generics,
Finds a generic method by namespace, name and generic parameters
sourcepub fn find_method<A, R, const N: usize>(
&self,
name: &str
) -> Result<&'static MethodInfo, FindMethodError> where
A: Arguments<N>,
R: Returned,
pub fn find_method<A, R, const N: usize>(
&self,
name: &str
) -> Result<&'static MethodInfo, FindMethodError> where
A: Arguments<N>,
R: Returned,
Find a method belonging to the class or its parents by name with type checking
sourcepub fn find_static_method<A, R, const N: usize>(
&self,
name: &str
) -> Result<&'static MethodInfo, FindMethodError> where
A: Arguments<N>,
R: Returned,
pub fn find_static_method<A, R, const N: usize>(
&self,
name: &str
) -> Result<&'static MethodInfo, FindMethodError> where
A: Arguments<N>,
R: Returned,
Find a static
method belonging to the class by name with type checking
sourcepub fn find_method_callee<T, P, R>(
&self,
name: &str
) -> Result<&'static MethodInfo, FindMethodError> where
T: ThisParameter,
P: Parameters,
R: Return,
pub fn find_method_callee<T, P, R>(
&self,
name: &str
) -> Result<&'static MethodInfo, FindMethodError> where
T: ThisParameter,
P: Parameters,
R: Return,
Find a method belonging to the class or its parents by name with type checking from a callee perspective
sourcepub fn find_method_unchecked(
&self,
name: &str,
parameters_count: usize
) -> Result<&'static MethodInfo, FindMethodError>
pub fn find_method_unchecked(
&self,
name: &str,
parameters_count: usize
) -> Result<&'static MethodInfo, FindMethodError>
Find a method belonging to the class or its parents by name and parameter count, without type checking
sourcepub fn find_field(&self, name: &str) -> Option<&FieldInfo>
pub fn find_field(&self, name: &str) -> Option<&FieldInfo>
Find a field belonging to the class or its parents by name
sourcepub fn make_generic<G>(
&self
) -> Result<Option<&'static Self>, &mut Il2CppException> where
G: Generics,
pub fn make_generic<G>(
&self
) -> Result<Option<&'static Self>, &mut Il2CppException> where
G: Generics,
Instanciates a generic class template with the provided generic arguments
sourcepub fn instantiate<T>(&self) -> &'static mut T where
for<'a> T: Type<Held<'a> = Option<&'a mut T>>,
pub fn instantiate<T>(&self) -> &'static mut T where
for<'a> T: Type<Held<'a> = Option<&'a mut T>>,
Instanciates an object of the class
sourcepub fn invoke<A, R, const N: usize>(
&self,
name: &str,
args: A
) -> Result<R, &mut Il2CppException> where
A: Arguments<N>,
R: Returned,
pub fn invoke<A, R, const N: usize>(
&self,
name: &str,
args: A
) -> Result<R, &mut Il2CppException> where
A: Arguments<N>,
R: Returned,
Invokes the static
method with the given name using the given
arguments, with type checking
sourcepub fn invoke_void<A, const N: usize>(
&self,
name: &str,
args: A
) -> Result<(), &mut Il2CppException> where
A: Arguments<N>,
pub fn invoke_void<A, const N: usize>(
&self,
name: &str,
args: A
) -> Result<(), &mut Il2CppException> where
A: Arguments<N>,
Invokes the static void
method with the given name using the given
arguments, with type checking
sourcepub fn methods(&self) -> &[&'static MethodInfo]
pub fn methods(&self) -> &[&'static MethodInfo]
Methods of the class
sourcepub fn hierarchy(&self) -> Hierarchy<'_>
pub fn hierarchy(&self) -> Hierarchy<'_>
Iterator over the class hierarchy, starting with the class itself
sourcepub fn implemented_interfaces(&self) -> &[&Self]
pub fn implemented_interfaces(&self) -> &[&Self]
Interfaces this class implements
sourcepub fn nested_types(&self) -> &[&Self]
pub fn nested_types(&self) -> &[&Self]
Nested types of the class
sourcepub fn is_assignable_from(&self, other: &Self) -> bool
pub fn is_assignable_from(&self, other: &Self) -> bool
Whether the class is assignable from other
sourcepub fn this_arg_ty(&self) -> &Il2CppType
pub fn this_arg_ty(&self) -> &Il2CppType
Il2CppType
of this
for the class
sourcepub fn byval_arg_ty(&self) -> &Il2CppType
pub fn byval_arg_ty(&self) -> &Il2CppType
Il2CppType
of byval arguments for the class
sourcepub fn ty(&self) -> &Il2CppType
pub fn ty(&self) -> &Il2CppType
Il2CppType
of the class
Trait Implementations
sourceimpl Debug for Il2CppClass
impl Debug for Il2CppClass
sourceimpl Display for Il2CppClass
impl Display for Il2CppClass
sourceimpl<'a> From<&'a Il2CppType> for &'a Il2CppClass
impl<'a> From<&'a Il2CppType> for &'a Il2CppClass
sourcefn from(ty: &'a Il2CppType) -> Self
fn from(ty: &'a Il2CppType) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<Il2CppClass> for Il2CppClass
impl PartialEq<Il2CppClass> for Il2CppClass
sourceimpl WrapRaw for Il2CppClass
impl WrapRaw for Il2CppClass
type Raw = Il2CppClass
type Raw = Il2CppClass
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 Il2CppClass
impl Sync for Il2CppClass
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