pub struct FileResources<'a> {
pub env: &'a Environment,
pub file: &'a Arc<SerializedFile>,
}Expand description
The core’s resource read from an object’s file: Environment::resource,
its port of get_resource_data.
Fields§
§env: &'a EnvironmentThe Environment that loaded the file.
file: &'a Arc<SerializedFile>The file holding the Mesh (UnityPy’s object_reader.assets_file).
Trait Implementations§
Source§impl<'a> Clone for FileResources<'a>
impl<'a> Clone for FileResources<'a>
impl<'a> Copy for FileResources<'a>
Source§impl<'a> Debug for FileResources<'a>
impl<'a> Debug for FileResources<'a>
Source§impl Resources for FileResources<'_>
impl Resources for FileResources<'_>
Source§fn resource(
&self,
path: &RawStr,
offset: u64,
size: u64,
) -> Result<Bytes, Error>
fn resource( &self, path: &RawStr, offset: u64, size: u64, ) -> Result<Bytes, Error>
The
size bytes at offset of the resource path names.Source§fn reads_range(&self) -> bool
fn reads_range(&self) -> bool
Whether
Resources::resource reads the stream’s offset and
size from the source itself, as a binding does from its caller’s
object, whose integers may be negative or wider than u64 (an
edited Mesh’s, which UnityPy hands its reader as they are). The
handler then reads neither and passes 0 for both, and checks the
channels and their formats first (a caller’s read opens files), where
UnityPy reads the resource before them.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FileResources<'a>
impl<'a> !UnwindSafe for FileResources<'a>
impl<'a> Forget for FileResources<'a>
impl<'a> Freeze for FileResources<'a>
impl<'a> Move for FileResources<'a>
impl<'a> Send for FileResources<'a>
impl<'a> Sync for FileResources<'a>
impl<'a> Unpin for FileResources<'a>
impl<'a> UnsafeUnpin for FileResources<'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