pub struct BytesAssetProtocol;Expand description
Protocol implementation for handling generic byte-based assets.
This struct defines how raw bytes representing assets are stored directly without additional processing or transformation.
Trait Implementations§
Source§impl AssetProtocol for BytesAssetProtocol
impl AssetProtocol for BytesAssetProtocol
Source§fn process_bytes(
&mut self,
handle: AssetHandle,
storage: &mut World,
bytes: Vec<u8>,
) -> Result<(), Box<dyn Error>>
fn process_bytes( &mut self, handle: AssetHandle, storage: &mut World, bytes: Vec<u8>, ) -> Result<(), Box<dyn Error>>
Processes the raw byte data of an asset. Read more
Source§fn produce_bytes(
&mut self,
handle: AssetHandle,
storage: &mut World,
) -> Result<Vec<u8>, Box<dyn Error>>
fn produce_bytes( &mut self, handle: AssetHandle, storage: &mut World, ) -> Result<Vec<u8>, Box<dyn Error>>
Produces raw byte data for an asset. Read more
Source§fn extract_bundle_from_path(
&self,
path: &AssetPath<'_>,
) -> Result<DynamicBundle, Box<dyn Error>>
fn extract_bundle_from_path( &self, path: &AssetPath<'_>, ) -> Result<DynamicBundle, Box<dyn Error>>
Extracts a dynamic bundle from the given asset path. Read more
Source§fn rewrite_path(
&self,
path: AssetPathStatic,
) -> Result<AssetPathStatic, Box<dyn Error>>
fn rewrite_path( &self, path: AssetPathStatic, ) -> Result<AssetPathStatic, Box<dyn Error>>
Rewrites the asset path before spawning asset in storage. Read more
Source§fn process_asset_bytes(
&mut self,
handle: AssetHandle,
storage: &mut World,
) -> Result<(), Box<dyn Error>>
fn process_asset_bytes( &mut self, handle: AssetHandle, storage: &mut World, ) -> Result<(), Box<dyn Error>>
Processes an asset by first retrieving its raw byte data and then
delegating to
process_bytes. Read moreSource§fn produce_asset_bytes(
&mut self,
handle: AssetHandle,
storage: &mut World,
) -> Result<(), Box<dyn Error>>
fn produce_asset_bytes( &mut self, handle: AssetHandle, storage: &mut World, ) -> Result<(), Box<dyn Error>>
Produces an asset by first retrieving its raw byte data and then
delegating to
produce_bytes. Read moreAuto Trait Implementations§
impl Freeze for BytesAssetProtocol
impl RefUnwindSafe for BytesAssetProtocol
impl Send for BytesAssetProtocol
impl Sync for BytesAssetProtocol
impl Unpin for BytesAssetProtocol
impl UnwindSafe for BytesAssetProtocol
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