Struct bones_asset::AssetStore
source · pub struct AssetStore {
pub asset_ids: DashMap<UntypedHandle, Cid>,
pub asset_data: DashMap<Cid, Vec<u8>>,
pub assets: DashMap<Cid, LoadedAsset>,
pub path_handles: DashMap<AssetLoc, UntypedHandle>,
pub reverse_dependencies: DashMap<UntypedHandle, HashSet<UntypedHandle>>,
pub incompabile_packs: DashMap<String, PackfileMeta>,
pub core_pack: Arc<Mutex<Option<AssetPack>>>,
pub packs: DashMap<AssetPackSpec, AssetPack>,
pub pack_dirs: DashMap<String, AssetPackSpec>,
}
Expand description
Stores assets for later retrieval.
Fields§
§asset_ids: DashMap<UntypedHandle, Cid>
Maps the handle of the asset to it’s content ID.
asset_data: DashMap<Cid, Vec<u8>>
Content addressed cache of raw bytes for asset data.
Storing asset data in this ways allows you to easily replicate assets to other players over
the network by comparing available Cid
s.
assets: DashMap<Cid, LoadedAsset>
Maps asset content IDs, to assets that have been loaded by an asset loader from the raw bytes.
path_handles: DashMap<AssetLoc, UntypedHandle>
Maps the asset AssetLoc
to it’s handle.
reverse_dependencies: DashMap<UntypedHandle, HashSet<UntypedHandle>>
List of assets that depend on the given assets.
incompabile_packs: DashMap<String, PackfileMeta>
Lists the packs that have not been loaded due to an incompatible game version.
core_pack: Arc<Mutex<Option<AssetPack>>>
The core asset pack, if it’s been loaded.
packs: DashMap<AssetPackSpec, AssetPack>
The asset packs that have been loaded.
pack_dirs: DashMap<String, AssetPackSpec>
Maps the directory names of asset packs to their AssetPackSpec
.
Trait Implementations§
source§impl Clone for AssetStore
impl Clone for AssetStore
source§fn clone(&self) -> AssetStore
fn clone(&self) -> AssetStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AssetStore
impl Debug for AssetStore
source§impl Default for AssetStore
impl Default for AssetStore
source§fn default() -> AssetStore
fn default() -> AssetStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AssetStore
impl !RefUnwindSafe for AssetStore
impl Send for AssetStore
impl Sync for AssetStore
impl Unpin for AssetStore
impl !UnwindSafe for AssetStore
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)