PR004: implement asset status-first lifecycle surface
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::asset::{
|
||||
AssetEntry, BankStats, BankType, HandleId, LoadStatus, PreloadEntry, SlotRef, SlotStats,
|
||||
AssetEntry, AssetLoadError, AssetOpStatus, BankStats, BankType, HandleId, LoadStatus,
|
||||
PreloadEntry, SlotRef, SlotStats,
|
||||
};
|
||||
|
||||
pub trait AssetBridge {
|
||||
@@ -9,10 +10,10 @@ pub trait AssetBridge {
|
||||
preload: Vec<PreloadEntry>,
|
||||
assets_data: Vec<u8>,
|
||||
);
|
||||
fn load(&self, asset_name: &str, slot: SlotRef) -> Result<HandleId, String>;
|
||||
fn load(&self, asset_name: &str, slot: SlotRef) -> Result<HandleId, AssetLoadError>;
|
||||
fn status(&self, handle: HandleId) -> LoadStatus;
|
||||
fn commit(&self, handle: HandleId);
|
||||
fn cancel(&self, handle: HandleId);
|
||||
fn commit(&self, handle: HandleId) -> AssetOpStatus;
|
||||
fn cancel(&self, handle: HandleId) -> AssetOpStatus;
|
||||
fn apply_commits(&self);
|
||||
fn bank_info(&self, kind: BankType) -> BankStats;
|
||||
fn slot_info(&self, slot: SlotRef) -> SlotStats;
|
||||
|
||||
Reference in New Issue
Block a user