pub struct BundleLoadOptions {
pub load_assets: bool,
pub decompress_blocks: bool,
pub validate: bool,
pub max_memory: Option<usize>,
pub max_unityfs_block_cache_memory: Option<usize>,
pub max_compressed_blocks_info_size: Option<usize>,
pub max_blocks_info_size: Option<usize>,
pub max_legacy_directory_compressed_size: Option<usize>,
pub max_compressed_block_size: Option<usize>,
pub max_blocks: usize,
pub max_nodes: usize,
}Expand description
Bundle loading options
Fields§
§load_assets: boolWhether to load all assets immediately
decompress_blocks: boolWhether to decompress all blocks immediately
validate: boolWhether to validate the bundle structure
max_memory: Option<usize>Maximum memory usage for decompression (in bytes)
max_unityfs_block_cache_memory: Option<usize>Maximum memory for caching UnityFS decompressed blocks during lazy range extraction.
This controls peak memory when AssetBundle::extract_node_data reads only a few nodes from
a large UnityFS without fully decompressing the entire bundle.
If None, block cache growth is unbounded (not recommended for untrusted inputs).
max_compressed_blocks_info_size: Option<usize>Maximum size of compressed blocks info (metadata) in bytes.
This is a cap on the compressed bytes read from the input stream before decompression.
max_blocks_info_size: Option<usize>Maximum size of decompressed blocks info (metadata) in bytes.
max_legacy_directory_compressed_size: Option<usize>Maximum size of the legacy (UnityWeb/UnityRaw) directory compressed section in bytes.
This is a cap on the raw bytes read from the input stream before decompression.
max_compressed_block_size: Option<usize>Maximum size of a single UnityFS compressed data block (in bytes).
This is a cap on the raw bytes read for each block before decompression. It helps protect against malicious headers that declare multi-GB compressed blocks.
max_blocks: usizeMaximum number of compression blocks allowed in metadata.
max_nodes: usizeMaximum number of directory nodes / file entries allowed in metadata.
Implementations§
Source§impl BundleLoadOptions
impl BundleLoadOptions
Sourcepub fn lazy() -> BundleLoadOptions
pub fn lazy() -> BundleLoadOptions
Create options for lazy loading (validate metadata, but do not preload assets or decompress blocks).
Sourcepub fn fast() -> BundleLoadOptions
pub fn fast() -> BundleLoadOptions
Create options for fast loading (minimal processing)
Sourcepub fn complete() -> BundleLoadOptions
pub fn complete() -> BundleLoadOptions
Create options for complete loading (all processing)
Trait Implementations§
Source§impl Clone for BundleLoadOptions
impl Clone for BundleLoadOptions
Source§fn clone(&self) -> BundleLoadOptions
fn clone(&self) -> BundleLoadOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BundleLoadOptions
impl Debug for BundleLoadOptions
Source§impl Default for BundleLoadOptions
impl Default for BundleLoadOptions
Source§fn default() -> BundleLoadOptions
fn default() -> BundleLoadOptions
Auto Trait Implementations§
impl Freeze for BundleLoadOptions
impl RefUnwindSafe for BundleLoadOptions
impl Send for BundleLoadOptions
impl Sync for BundleLoadOptions
impl Unpin for BundleLoadOptions
impl UnwindSafe for BundleLoadOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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>
ReadEndian::read_from_little_endian().