Skip to main content

Il2cppList

Struct Il2cppList 

Source
pub struct Il2cppList<T: Copy> {
    pub klass: *mut c_void,
    pub monitor: *mut c_void,
    pub items: *mut Il2cppArray<T>,
    pub size: i32,
    pub version: i32,
    /* private fields */
}

Fields§

§klass: *mut c_void

Pointer to the list class

§monitor: *mut c_void

Monitor for synchronization

§items: *mut Il2cppArray<T>

Internal array of items

§size: i32

Number of elements in the list

§version: i32

Version of the list

Implementations§

Source§

impl<T: Copy> Il2cppList<T>

Source

pub fn items_array(&self) -> Option<&Il2cppArray<T>>

Gets the internal items array

§Returns
  • Option<&Il2cppArray<T>> - The underlying array, or None if null
Source

pub fn items_array_mut(&mut self) -> Option<&mut Il2cppArray<T>>

Gets the internal items array as mutable

§Returns
  • Option<&mut Il2cppArray<T>> - The underlying mutable array, or None if null
Source

pub fn get(&self, index: usize) -> Option<T>

Gets the element at the specified index

§Arguments
  • index - The index of the element to retrieve
§Returns
  • Option<T> - The element if present and index is within bounds, otherwise None
Source

pub fn at(&self, index: usize) -> T

Alias for get that panics on out of bounds

§Arguments
  • index - The index of the element to retrieve
§Returns
  • T - The element at the specified index
§Panics

Panics if the index is out of bounds or the item array is null.

Source

pub fn set(&mut self, index: usize, value: T) -> bool

Sets the element at the specified index

§Arguments
  • index - The index where the value should be set
  • value - The value to set
§Returns
  • bool - True if setting was successful, False if index out of bounds or array null
Source

pub fn to_vec(&self) -> Vec<T>

Converts the list to a Rust Vec

§Returns
  • Vec<T> - A new vector containing the list elements
Source

pub fn get_pointer(&self) -> Option<*const T>

Gets a pointer to the data array

§Returns
  • Option<*const T> - Pointer to the first element, or None
Source

pub fn iter(&self) -> impl Iterator<Item = T> + '_

Returns an iterator over the list items

§Returns
  • impl Iterator<Item = T> + '_ - An iterator yielding elements

Auto Trait Implementations§

§

impl<T> Freeze for Il2cppList<T>

§

impl<T> RefUnwindSafe for Il2cppList<T>
where T: RefUnwindSafe,

§

impl<T> !Send for Il2cppList<T>

§

impl<T> !Sync for Il2cppList<T>

§

impl<T> Unpin for Il2cppList<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Il2cppList<T>

§

impl<T> UnwindSafe for Il2cppList<T>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.