use bytes::Bytes;
use std::future::Future;
pub struct NetworkAssetBundle {}
impl NetworkAssetBundle {
pub fn new(base_url: String) -> Self {
todo!()
}
}
impl AssetBundle for NetworkAssetBundle {
fn clear(&self) {
todo!()
}
fn evict(&self, key: String) {
todo!()
}
fn load(&self, key: String) -> Box<dyn Future<Output = Bytes>> {
todo!()
}
fn load_string(
&self,
key: String,
cache: bool,
) -> Box<dyn Future<Output = String>> {
todo!()
}
}
pub struct PlatformAssetBundle {}
impl CachingAssetBundle for PlatformAssetBundle {}
impl AssetBundle for PlatformAssetBundle {
fn clear(&self) {
todo!()
}
fn evict(&self, key: String) {
todo!()
}
fn load(&self, key: String) -> Box<dyn Future<Output = Bytes>> {
todo!()
}
fn load_string(
&self,
key: String,
cache: bool,
) -> Box<dyn Future<Output = String>> {
todo!()
}
}
pub trait CachingAssetBundle: AssetBundle {}
pub trait AssetBundle {
fn clear(&self);
fn evict(&self, key: String);
fn load(&self, key: String) -> Box<dyn Future<Output = Bytes>>;
fn load_string(
&self,
key: String,
cache: bool,
) -> Box<dyn Future<Output = String>>;
}