pub trait TypedAssetStorage<A> {
// Required methods
fn get<T: AssetHandle>(&self, handle: &T) -> Option<&A>;
fn get_version<T: AssetHandle>(&self, handle: &T) -> Option<u32>;
fn get_asset_with_version<T: AssetHandle>(
&self,
handle: &T,
) -> Option<(&A, u32)>;
}Expand description
Implementors of crate::storage::AssetStorage can implement this trait to enable convenience
functions on the common AssetHandle trait, which is implemented by all handle types.
Required Methods§
Sourcefn get_version<T: AssetHandle>(&self, handle: &T) -> Option<u32>
fn get_version<T: AssetHandle>(&self, handle: &T) -> Option<u32>
Sourcefn get_asset_with_version<T: AssetHandle>(
&self,
handle: &T,
) -> Option<(&A, u32)>
fn get_asset_with_version<T: AssetHandle>( &self, handle: &T, ) -> Option<(&A, u32)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.