pub struct BundleParser;Expand description
Main bundle parser
This struct handles the parsing of Unity AssetBundle files, supporting both UnityFS and legacy formats.
Implementations§
Source§impl BundleParser
impl BundleParser
Sourcepub fn from_bytes(data: Vec<u8>) -> Result<AssetBundle, BinaryError>
pub fn from_bytes(data: Vec<u8>) -> Result<AssetBundle, BinaryError>
Parse an AssetBundle from binary data
Sourcepub fn from_slice(data: &[u8]) -> Result<AssetBundle, BinaryError>
pub fn from_slice(data: &[u8]) -> Result<AssetBundle, BinaryError>
Parse an AssetBundle from a byte slice.
This avoids copying when the input bytes already live in a shared buffer (e.g. WebFile entries).
Parse an AssetBundle from a shared backing buffer + byte range (zero-copy view).
Parse an AssetBundle from a shared backing buffer + byte range (zero-copy view), with options.
Sourcepub fn from_bytes_with_options(
data: Vec<u8>,
options: BundleLoadOptions,
) -> Result<AssetBundle, BinaryError>
pub fn from_bytes_with_options( data: Vec<u8>, options: BundleLoadOptions, ) -> Result<AssetBundle, BinaryError>
Parse an AssetBundle from binary data with options
Sourcepub fn from_slice_with_options(
data: &[u8],
options: BundleLoadOptions,
) -> Result<AssetBundle, BinaryError>
pub fn from_slice_with_options( data: &[u8], options: BundleLoadOptions, ) -> Result<AssetBundle, BinaryError>
Parse an AssetBundle from a byte slice with options.
Sourcepub fn estimate_complexity(
data: &[u8],
) -> Result<ParsingComplexity, BinaryError>
pub fn estimate_complexity( data: &[u8], ) -> Result<ParsingComplexity, BinaryError>
Estimate parsing complexity
Auto Trait Implementations§
impl Freeze for BundleParser
impl RefUnwindSafe for BundleParser
impl Send for BundleParser
impl Sync for BundleParser
impl Unpin for BundleParser
impl UnwindSafe for BundleParser
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 more