TypeTreeProcessor

Struct TypeTreeProcessor 

Source
pub struct TypeTreeProcessor { /* private fields */ }
Expand description

Main TypeTree processing facade

This struct provides a high-level interface for TypeTree processing, combining parsing, building, and serialization functionality.

Implementations§

Source§

impl TypeTreeProcessor

Source

pub fn new() -> Self

Create a new TypeTree processor

Source

pub fn with_version(version: u32) -> Self

Create a processor with a specific Unity version

Source

pub fn parse_from_reader(&mut self, reader: &mut BinaryReader<'_>) -> Result<()>

Parse TypeTree from binary data

Source

pub fn parse_object( &self, reader: &mut BinaryReader<'_>, ) -> Result<IndexMap<String, UnityValue>>

Parse object data using the loaded TypeTree

Source

pub fn serialize_object( &self, data: &IndexMap<String, UnityValue>, ) -> Result<Vec<u8>>

Serialize object data using the loaded TypeTree

Source

pub fn tree(&self) -> Option<&TypeTree>

Get the loaded TypeTree

Source

pub fn set_tree(&mut self, tree: TypeTree)

Set a TypeTree manually

Source

pub fn validate(&self) -> Result<ValidationReport>

Validate the loaded TypeTree

Source

pub fn statistics(&self) -> Option<TypeTreeStatistics>

Get TypeTree statistics

Source

pub fn parsing_stats(&self) -> Option<ParsingStats>

Get parsing statistics

Source

pub fn clear(&mut self)

Clear the loaded TypeTree

Source

pub fn has_tree(&self) -> bool

Check if a TypeTree is loaded

Source

pub fn version(&self) -> u32

Get the Unity version

Source

pub fn set_version(&mut self, version: u32)

Set the Unity version

Trait Implementations§

Source§

impl Default for TypeTreeProcessor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.