Skip to main content

FnAssetLoader

Type Alias FnAssetLoader 

Source
pub type FnAssetLoader = Arc<dyn Fn() -> Option<AssetData> + Send + Sync + 'static>;
Expand description

A callback that produces an asset’s bytes when the asset is requested, or None if it can’t.

The cache may call it from a worker thread, so the closure and everything it captures must be Send and Sync.

Aliased Type§

pub struct FnAssetLoader { /* private fields */ }