Struct ambient_std::download_asset::BincodeFromUrl
source · pub struct BincodeFromUrl<T> {
pub url: AbsAssetUrl,
pub cache_on_disk: bool,
/* private fields */
}
Fields§
§url: AbsAssetUrl
§cache_on_disk: bool
Implementations§
Trait Implementations§
source§impl<T: DeserializeOwned + Debug + Sync + Send + 'static> AsyncAssetKey<Result<Arc<T>, AssetError>> for BincodeFromUrl<T>
impl<T: DeserializeOwned + Debug + Sync + Send + 'static> AsyncAssetKey<Result<Arc<T>, AssetError>> for BincodeFromUrl<T>
fn load<'async_trait>( self, assets: AssetCache ) -> Pin<Box<dyn Future<Output = AssetResult<Arc<T>>> + Send + 'async_trait>>where Self: 'async_trait,
source§fn in_background(self) -> BackgroundKey<Self>where
Self: Sized,
fn in_background(self) -> BackgroundKey<Self>where Self: Sized,
Adapter to make the key load in a background task. Read more
fn keepalive(&self) -> AssetKeepalive
fn drop_policy(&self) -> AssetLoadDropPolicy
fn cpu_size(&self, _asset: &T) -> Option<u64>
fn gpu_size(&self, _asset: &T) -> Option<u64>
source§impl<T> Clone for BincodeFromUrl<T>
impl<T> Clone for BincodeFromUrl<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for BincodeFromUrl<T>where T: RefUnwindSafe,
impl<T> Send for BincodeFromUrl<T>where T: Send,
impl<T> Sync for BincodeFromUrl<T>where T: Sync,
impl<T> Unpin for BincodeFromUrl<T>where T: Unpin,
impl<T> UnwindSafe for BincodeFromUrl<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T, K> AsyncAssetKeyExt<T> for Kwhere
T: Asset + Clone + Sync + Send + 'static,
K: AsyncAssetKey<T> + Clone + 'static,
impl<T, K> AsyncAssetKeyExt<T> for Kwhere T: Asset + Clone + Sync + Send + 'static, K: AsyncAssetKey<T> + Clone + 'static,
fn key(&self) -> String
fn long_name(&self) -> String
fn get<'life0, 'life1, 'async_trait>( &'life0 self, assets: &'life1 AssetCache ) -> Pin<Box<dyn Future<Output = T> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, K: 'async_trait,
source§fn is_loaded(&self, assets: &AssetCache) -> Option<T>
fn is_loaded(&self, assets: &AssetCache) -> Option<T>
Returns
Some(T)
if the asset is currently loaded, alive, and well. Read moresource§fn peek(&self, assets: &AssetCache) -> Option<T>
fn peek(&self, assets: &AssetCache) -> Option<T>
If the asset is loaded, it will be returned. Otherwise, the loading will start loading in the background, and None will be returned
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