Struct bones_asset::AssetLoadCtx
source · pub struct AssetLoadCtx {
pub asset_server: AssetServer,
pub loc: AssetLoc,
pub dependencies: Arc<AppendOnlyVec<UntypedHandle>>,
}
Expand description
Context provided to custom asset loaders in the AssetLoader::load
method.
Fields§
§asset_server: AssetServer
The asset server.
loc: AssetLoc
The location of the asset.
dependencies: Arc<AppendOnlyVec<UntypedHandle>>
The Cid
s of the assets this asset depends on.
This is automatically updated when calling AssetLoadCtx::load_asset
.
Implementations§
source§impl AssetLoadCtx
impl AssetLoadCtx
sourcepub fn load_asset(&mut self, path: &Path) -> Result<UntypedHandle>
pub fn load_asset(&mut self, path: &Path) -> Result<UntypedHandle>
Load another asset as a child of this asset.
Auto Trait Implementations§
impl Freeze for AssetLoadCtx
impl !RefUnwindSafe for AssetLoadCtx
impl Send for AssetLoadCtx
impl Sync for AssetLoadCtx
impl Unpin for AssetLoadCtx
impl !UnwindSafe for AssetLoadCtx
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