pub struct BinaryObjectRef<'a> {
pub source: &'a BinarySource,
pub source_kind: BinarySourceKind,
pub asset_index: Option<usize>,
pub object: ObjectHandle<'a>,
/* private fields */
}Expand description
A reference to a binary object within a SerializedFile.
This is conceptually similar to UnityPy’s ObjectReader: it is a lightweight handle that can be
converted into a parsed UnityObject on-demand.
Fields§
§source: &'a BinarySource§source_kind: BinarySourceKind§asset_index: Option<usize>Asset index within a bundle. None for standalone serialized files.
object: ObjectHandle<'a>Implementations§
Source§impl<'a> BinaryObjectRef<'a>
impl<'a> BinaryObjectRef<'a>
pub fn read(&self) -> Result<UnityObject>
Sourcepub fn key(&self) -> BinaryObjectKey
pub fn key(&self) -> BinaryObjectKey
Create a globally-unique key for this object reference.
Trait Implementations§
Source§impl<'a> Clone for BinaryObjectRef<'a>
impl<'a> Clone for BinaryObjectRef<'a>
Source§fn clone(&self) -> BinaryObjectRef<'a>
fn clone(&self) -> BinaryObjectRef<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for BinaryObjectRef<'a>
impl<'a> !RefUnwindSafe for BinaryObjectRef<'a>
impl<'a> Send for BinaryObjectRef<'a>
impl<'a> Sync for BinaryObjectRef<'a>
impl<'a> Unpin for BinaryObjectRef<'a>
impl<'a> !UnwindSafe for BinaryObjectRef<'a>
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