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
impl TypeTreeProcessor
Sourcepub fn new() -> TypeTreeProcessor
pub fn new() -> TypeTreeProcessor
Create a new TypeTree processor
Sourcepub fn with_version(version: u32) -> TypeTreeProcessor
pub fn with_version(version: u32) -> TypeTreeProcessor
Create a processor with a specific Unity version
Sourcepub fn parse_from_reader(
&mut self,
reader: &mut BinaryReader<'_>,
) -> Result<(), BinaryError>
pub fn parse_from_reader( &mut self, reader: &mut BinaryReader<'_>, ) -> Result<(), BinaryError>
Parse TypeTree from binary data
Sourcepub fn parse_object(
&self,
reader: &mut BinaryReader<'_>,
) -> Result<IndexMap<String, UnityValue>, BinaryError>
pub fn parse_object( &self, reader: &mut BinaryReader<'_>, ) -> Result<IndexMap<String, UnityValue>, BinaryError>
Parse object data using the loaded TypeTree
Sourcepub fn serialize_object(
&self,
data: &IndexMap<String, UnityValue>,
) -> Result<Vec<u8>, BinaryError>
pub fn serialize_object( &self, data: &IndexMap<String, UnityValue>, ) -> Result<Vec<u8>, BinaryError>
Serialize object data using the loaded TypeTree
Sourcepub fn validate(&self) -> Result<ValidationReport, BinaryError>
pub fn validate(&self) -> Result<ValidationReport, BinaryError>
Validate the loaded TypeTree
Sourcepub fn statistics(&self) -> Option<TypeTreeStatistics>
pub fn statistics(&self) -> Option<TypeTreeStatistics>
Get TypeTree statistics
Sourcepub fn parsing_stats(&self) -> Option<ParsingStats>
pub fn parsing_stats(&self) -> Option<ParsingStats>
Get parsing statistics
Sourcepub fn set_version(&mut self, version: u32)
pub fn set_version(&mut self, version: u32)
Set the Unity version
Trait Implementations§
Source§impl Default for TypeTreeProcessor
impl Default for TypeTreeProcessor
Source§fn default() -> TypeTreeProcessor
fn default() -> TypeTreeProcessor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeTreeProcessor
impl RefUnwindSafe for TypeTreeProcessor
impl Send for TypeTreeProcessor
impl Sync for TypeTreeProcessor
impl Unpin for TypeTreeProcessor
impl UnwindSafe for TypeTreeProcessor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().