unity::il2cpp::class

Struct Il2CppClass

source
#[repr(C)]
pub struct Il2CppClass { pub _1: Il2CppClass1, pub static_fields: *mut (), pub rgctx_data: &'static mut Il2CppRGCTXData, pub _2: Il2CppClass2, /* private fields */ }

Fields§

§_1: Il2CppClass1§static_fields: *mut ()§rgctx_data: &'static mut Il2CppRGCTXData§_2: Il2CppClass2

Implementations§

source§

impl Il2CppClass

source

pub fn from_name( namespace: impl AsRef<str>, name: impl AsRef<str>, ) -> Il2CppResult<&'static mut Self>

source

pub fn from_il2cpptype(ty: &Il2CppType) -> Il2CppResult<&'static mut Self>

source

pub fn from_system_type( ty: &Il2CppReflectionType, ) -> Il2CppResult<&'static mut Self>

source

pub fn with_generic_type<'a>( &self, args: impl AsRef<[&'a Il2CppClass]>, ) -> Il2CppResult<&'static mut Il2CppClass>

source

pub fn clone(&self) -> &'static mut Il2CppClass

source

pub fn get_static_fields<T>(&self) -> &T

source

pub fn get_static_fields_mut<T>(&self) -> &mut T

source

pub fn get_type(&self) -> &Il2CppType

source

pub fn get_name(&self) -> String

source

pub fn get_namespace(&self) -> String

source

pub fn get_vtable(&self) -> &[VirtualInvoke]

source

pub fn get_vtable_mut(&mut self) -> &mut [VirtualInvoke]

source

pub fn get_virtual_method( &self, name: impl AsRef<str>, ) -> Option<&VirtualInvoke>

source

pub fn get_virtual_method_mut( &mut self, name: impl AsRef<str>, ) -> Option<&mut VirtualInvoke>

source

pub fn get_fields(&self) -> &[FieldInfo]

Returns a slice containing the fields of the class, static and constants included

source

pub fn get_instance_fields(&self) -> impl Iterator<Item = &FieldInfo>

Returns a Iterator over the fields that are not static or constants

source

pub fn get_methods(&self) -> &[&'static MethodInfo]

source

pub fn get_nested_types(&self) -> &[&'static Il2CppClass]

source

pub fn get_method_from_name( &self, name: impl AsRef<str>, args_count: usize, ) -> Il2CppResult<&'static mut MethodInfo>

source

pub fn get_method_from_name_with_flag( &self, name: impl AsRef<str>, args_count: usize, flag: u32, ) -> Il2CppResult<&'static mut MethodInfo>

Trait Implementations§

source§

impl Send for Il2CppClass

source§

impl Sync for Il2CppClass

Auto Trait Implementations§

§

impl Freeze for Il2CppClass

§

impl RefUnwindSafe for Il2CppClass

§

impl Unpin for Il2CppClass

§

impl !UnwindSafe for Il2CppClass

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> 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, 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.