Struct bones_asset::prelude::WebAssetIo
source · pub struct WebAssetIo {
pub asset_url: String,
}
Expand description
Asset IO implementation that loads assets from a URL.
Fields§
§asset_url: String
The base URL to load assets from.
Implementations§
source§impl WebAssetIo
impl WebAssetIo
sourcepub fn new(asset_url: &str) -> Self
pub fn new(asset_url: &str) -> Self
Create a new WebAssetIo
with the given URL as the core pack root URL.
Trait Implementations§
source§impl AssetIo for WebAssetIo
impl AssetIo for WebAssetIo
source§fn enumerate_packs(&self) -> BoxedFuture<Result<Vec<String>>>
fn enumerate_packs(&self) -> BoxedFuture<Result<Vec<String>>>
List the names of the non-core asset pack folders that are installed. Read more
source§fn load_file(&self, loc: AssetLocRef<'_>) -> BoxedFuture<Result<Vec<u8>>>
fn load_file(&self, loc: AssetLocRef<'_>) -> BoxedFuture<Result<Vec<u8>>>
Get the binary contents of an asset. Read more
Auto Trait Implementations§
impl Freeze for WebAssetIo
impl RefUnwindSafe for WebAssetIo
impl Send for WebAssetIo
impl Sync for WebAssetIo
impl Unpin for WebAssetIo
impl UnwindSafe for WebAssetIo
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