pub struct Metadata {Show 15 fields
pub version: u32,
pub images: Vec<ImageDefinition>,
pub assemblies: Vec<AssemblyDefinition>,
pub type_definitions: Vec<TypeDefinition>,
pub methods: Vec<MethodDefinition>,
pub fields: Vec<FieldDefinition>,
pub parameters: Vec<ParameterDefinition>,
pub properties: Vec<PropertyDefinition>,
pub events: Vec<EventDefinition>,
pub generic_containers: Vec<GenericContainer>,
pub generic_parameters: Vec<GenericParameter>,
pub nested_types: Vec<TypeDefinitionIndex>,
pub interfaces: Vec<TypeIndex>,
pub generic_parameter_constraints: Vec<TypeIndex>,
pub field_default_values: Vec<FieldDefaultValue>,
/* private fields */
}Fields§
§version: u32§images: Vec<ImageDefinition>§assemblies: Vec<AssemblyDefinition>§type_definitions: Vec<TypeDefinition>§methods: Vec<MethodDefinition>§fields: Vec<FieldDefinition>§parameters: Vec<ParameterDefinition>§properties: Vec<PropertyDefinition>§events: Vec<EventDefinition>§generic_containers: Vec<GenericContainer>§generic_parameters: Vec<GenericParameter>§nested_types: Vec<TypeDefinitionIndex>§interfaces: Vec<TypeIndex>§generic_parameter_constraints: Vec<TypeIndex>§field_default_values: Vec<FieldDefaultValue>Implementations§
Source§impl Metadata
impl Metadata
pub fn from_path(path: impl AsRef<Path>) -> Result<Self>
pub fn parse(data: Vec<u8>) -> Result<Self>
pub fn type_name(&self, index: TypeDefinitionIndex) -> &str
Sourcepub fn type_full_name(&self, index: TypeDefinitionIndex) -> String
pub fn type_full_name(&self, index: TypeDefinitionIndex) -> String
Namespace.Name, with / separating nested types.
Sourcepub fn declaring_type_definition(
&self,
index: TypeDefinitionIndex,
) -> Option<TypeDefinitionIndex>
pub fn declaring_type_definition( &self, index: TypeDefinitionIndex, ) -> Option<TypeDefinitionIndex>
The enclosing type definition, found through the nested type lists.
pub fn image_name(&self, image: &ImageDefinition) -> &str
Sourcepub fn image_types(&self, image: &ImageDefinition) -> Range<TypeDefinitionIndex> ⓘ
pub fn image_types(&self, image: &ImageDefinition) -> Range<TypeDefinitionIndex> ⓘ
Type definition indices belonging to image.
pub fn type_methods(&self, t: &TypeDefinition) -> &[MethodDefinition]
pub fn type_fields(&self, t: &TypeDefinition) -> &[FieldDefinition]
Sourcepub fn default_value_data(&self, index: i32) -> &[u8] ⓘ
pub fn default_value_data(&self, index: i32) -> &[u8] ⓘ
Bytes of the default value data section from index on.
pub fn generic_container_parameters( &self, container: i32, ) -> &[GenericParameter]
pub fn method_parameters(&self, m: &MethodDefinition) -> &[ParameterDefinition]
Sourcepub fn attribute_data_ranges(&self) -> Vec<(u32, u32)>
pub fn attribute_data_ranges(&self) -> Vec<(u32, u32)>
The (token, start_offset) entries of the attribute_data_range section
(v29+). Each start_offset indexes into Metadata::attribute_data; a
range ends where the next entry begins, as the section is laid out in global
offset order (Il2CppCustomAttributeDataRange).
Sourcepub fn attribute_data(&self) -> &[u8] ⓘ
pub fn attribute_data(&self) -> &[u8] ⓘ
The raw attribute_data blob holding v29+ custom attribute values.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Metadata
impl Freeze for Metadata
impl Move for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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