pub struct Binary {
pub metadata_registration: MetadataRegistration,
pub code_registration: Option<CodeRegistration>,
pub types: Vec<Il2CppType>,
}Expand description
The game binary’s type table, decoded.
Fields§
§metadata_registration: MetadataRegistrationWhere the binary’s type and generic tables are.
code_registration: Option<CodeRegistration>The method code tables, or None if CodeRegistration wasn’t found
(then method_pointer always returns None).
types: Vec<Il2CppType>The Il2CppType table, decoded; metadata type indices index into it.
Implementations§
Source§impl Binary
impl Binary
Sourcepub fn read(image: &impl LoadedImage, metadata: &Metadata) -> Result<Self>
pub fn read(image: &impl LoadedImage, metadata: &Metadata) -> Result<Self>
Finds the registration structs in a loaded game binary and decodes
its type table, using metadata to recognise them.
Fails if MetadataRegistration isn’t found or a type can’t be read;
a missing CodeRegistration only leaves
code_registration None.
Sourcepub fn type_at(&self, index: i32) -> Option<&Il2CppType>
pub fn type_at(&self, index: i32) -> Option<&Il2CppType>
The type at a metadata type index (e.g. a field’s type_index), or
None if it’s negative or out of range.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Binary
impl Freeze for Binarywhere
*const u8 is !null: Freeze,
PhantomData<CodeGenModule>: Freeze,
PhantomData<Il2CppType>: Freeze,
impl Move for Binary
impl RefUnwindSafe for Binary
impl Send for Binary
impl Sync for Binary
impl Unpin for Binary
impl UnsafeUnpin for Binarywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<CodeGenModule>: UnsafeUnpin,
PhantomData<Il2CppType>: UnsafeUnpin,
impl UnwindSafe for Binary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more