feat(runtime): implement shared transactional memcard with async saves
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
This commit is contained in:
@@ -6,12 +6,25 @@ use crate::asset::{
|
||||
use crate::cartridge::AssetsPayloadSource;
|
||||
|
||||
pub trait AssetBridge {
|
||||
/// Bind before cartridge preload/loading. Hosts supporting memcard must use
|
||||
/// this same lane for assets; an unsupported bridge refuses the fast profile.
|
||||
fn bind_background_work(
|
||||
&mut self,
|
||||
_lane: std::sync::Arc<dyn crate::background_work::BackgroundWork>,
|
||||
) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn initialize_for_cartridge(
|
||||
&self,
|
||||
assets: Vec<AssetEntry>,
|
||||
preload: Vec<PreloadEntry>,
|
||||
assets_data: AssetsPayloadSource,
|
||||
);
|
||||
/// Admission waits until all preloads are installed. Failure blocks guest boot.
|
||||
fn preloads_ready(&self) -> Result<bool, AssetLoadError> {
|
||||
Ok(true)
|
||||
}
|
||||
fn load(&self, asset_id: AssetId, slot_index: usize) -> Result<HandleId, AssetLoadError>;
|
||||
fn status(&self, handle: HandleId) -> LoadStatus;
|
||||
fn commit(&self, handle: HandleId) -> AssetOpStatus;
|
||||
|
||||
Reference in New Issue
Block a user