Struct amethyst_assets::Directory [−][src]
pub struct Directory { /* fields omitted */ }Directory source.
Please note that there is a default directory source
inside the Loader, which is automatically used when you call
load. In case you want another, second, directory for assets,
you can instantiate one yourself, too. Please use Loader::load_from then.
Methods
impl Directory[src]
impl DirectoryTrait Implementations
impl Debug for Directory[src]
impl Debug for Directoryfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Source for Directory[src]
impl Source for Directoryfn modified(&self, path: &str) -> Result<u64>[src]
fn modified(&self, path: &str) -> Result<u64>This is called to check if an asset has been modified. Read more
fn load(&self, path: &str) -> Result<Vec<u8>>[src]
fn load(&self, path: &str) -> Result<Vec<u8>>Loads the bytes given a path. Read more
fn load_with_metadata(&self, path: &str) -> Result<(Vec<u8>, u64)>[src]
fn load_with_metadata(&self, path: &str) -> Result<(Vec<u8>, u64)>Returns both the result of load and modified as a tuple. There's a default implementation which just calls both methods, but you may be able to provide a more optimized version yourself. Read more