Struct libil2cpp::Il2CppReflectionType
source · [−]pub struct Il2CppReflectionType(_);
Expand description
Object used for reflection of types
Implementations
sourceimpl Il2CppReflectionType
impl Il2CppReflectionType
sourcepub fn ty(&self) -> &Il2CppType
pub fn ty(&self) -> &Il2CppType
Il2CppType
which this object represents
sourcepub fn make_generic<G>(&self) -> Result<Option<&Self>, &mut Il2CppException> where
G: Generics,
pub fn make_generic<G>(&self) -> Result<Option<&Self>, &mut Il2CppException> where
G: Generics,
Instanciates a generic type template with the provided generic arguments
Methods from Deref<Target = Il2CppObject>
sourcepub fn class(&self) -> &'static Il2CppClass
pub fn class(&self) -> &'static Il2CppClass
Il2CppClass
of the object
sourcepub fn invoke<A, R, const N: usize>(
&mut self,
name: &str,
args: A
) -> Result<R, &mut Il2CppException> where
A: Arguments<N>,
R: Returned,
pub fn invoke<A, R, const N: usize>(
&mut self,
name: &str,
args: A
) -> Result<R, &mut Il2CppException> where
A: Arguments<N>,
R: Returned,
Invokes the method with the given name on self
using the given
arguments, with type checking
Panics
This method will panic if a matching method can’t be found.
sourcepub fn invoke_void<A, const N: usize>(
&mut self,
name: &str,
args: A
) -> Result<(), &mut Il2CppException> where
A: Arguments<N>,
pub fn invoke_void<A, const N: usize>(
&mut self,
name: &str,
args: A
) -> Result<(), &mut Il2CppException> where
A: Arguments<N>,
Invokes the void
method with the given name on self
using the
given arguments, with type checking
Panics
This method will panic if a matching method can’t be found.
Trait Implementations
sourceimpl Debug for Il2CppReflectionType
impl Debug for Il2CppReflectionType
sourceimpl Deref for Il2CppReflectionType
impl Deref for Il2CppReflectionType
type Target = Il2CppObject
type Target = Il2CppObject
The resulting type after dereferencing.
sourceimpl DerefMut for Il2CppReflectionType
impl DerefMut for Il2CppReflectionType
sourceimpl Type for Il2CppReflectionType
impl Type for Il2CppReflectionType
type Held<'a> = Option<&'a mut Il2CppReflectionType>
type Held<'a> = Option<&'a mut Il2CppReflectionType>
Type of the values held in variables of the type
type HeldRaw = *mut Il2CppReflectionType
type HeldRaw = *mut Il2CppReflectionType
Non-generic version of [Held
].
sourceconst CLASS_NAME: &'static str = "RuntimeType"
const CLASS_NAME: &'static str = "RuntimeType"
Name of the class the type represents
sourcefn matches_reference_argument(ty: &Il2CppType) -> bool
fn matches_reference_argument(ty: &Il2CppType) -> bool
Whether a reference to the type can be used as an argument of the given
Il2CppType
Read more
sourcefn matches_value_argument(_: &Il2CppType) -> bool
fn matches_value_argument(_: &Il2CppType) -> bool
Whether a value of the type can be used as an argument of the given
Il2CppType
Read more
sourcefn matches_reference_parameter(ty: &Il2CppType) -> bool
fn matches_reference_parameter(ty: &Il2CppType) -> bool
Whether a reference to the type can be used as a parameter of the given
Il2CppType
Read more
sourcefn matches_value_parameter(_: &Il2CppType) -> bool
fn matches_value_parameter(_: &Il2CppType) -> bool
Whether a value of the type can be used as a parameter of the given
Il2CppType
Read more
sourcefn class() -> &'static Il2CppClass
fn class() -> &'static Il2CppClass
Il2CppClass
of the type
sourcefn matches_this_argument(method: &MethodInfo) -> bool
fn matches_this_argument(method: &MethodInfo) -> bool
Whether the type can be used as a this
argument for the given
MethodInfo
Read more
sourcefn matches_this_parameter(method: &MethodInfo) -> bool
fn matches_this_parameter(method: &MethodInfo) -> bool
Whether the type can be used as a this
parameter for the given
MethodInfo
Read more
sourcefn matches_returned(ty: &Il2CppType) -> bool
fn matches_returned(ty: &Il2CppType) -> bool
Whether the type can be used as the value of the given Il2CppType
returned from a C# method Read more
sourcefn matches_return(ty: &Il2CppType) -> bool
fn matches_return(ty: &Il2CppType) -> bool
Whether the type can be used as the return value of the given
Il2CppType
for a C# method Read more
sourceimpl WrapRaw for Il2CppReflectionType
impl WrapRaw for Il2CppReflectionType
type Raw = Il2CppReflectionType
type Raw = Il2CppReflectionType
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
Auto Trait Implementations
impl RefUnwindSafe for Il2CppReflectionType
impl !Send for Il2CppReflectionType
impl !Sync for Il2CppReflectionType
impl Unpin for Il2CppReflectionType
impl UnwindSafe for Il2CppReflectionType
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