Trait amethyst::asset_manager::AssetStore
[−]
[src]
pub trait AssetStore { fn has_asset(&self, name: &str, asset_type: &str) -> bool; fn load_asset(
&self,
name: &str,
asset_type: &str,
buf: &mut Vec<u8>
) -> Option<usize>; }
Describes a permanent storage for assets.
Required Methods
fn has_asset(&self, name: &str, asset_type: &str) -> bool
Returns whether the asset store contains an asset with the given name and type strings.
fn load_asset(
&self,
name: &str,
asset_type: &str,
buf: &mut Vec<u8>
) -> Option<usize>
&self,
name: &str,
asset_type: &str,
buf: &mut Vec<u8>
) -> Option<usize>
Loads an asset file with the given name and type into buffer buf
.
Returns the final size of the asset in bytes, returns None
on failure.
Implementors
impl AssetStore for DirectoryStore