AssetSource

Trait AssetSource 

Source
pub trait AssetSource:
    'static
    + Send
    + Sync {
    // Required methods
    fn load(&self, path: &str) -> Result<Option<Cow<'static, [u8]>>>;
    fn list(&self, path: &str) -> Result<Vec<SharedString>>;
}
Expand description

A source of assets for this app to use.

Required Methods§

Source

fn load(&self, path: &str) -> Result<Option<Cow<'static, [u8]>>>

Load the given asset from the source path.

Source

fn list(&self, path: &str) -> Result<Vec<SharedString>>

List the assets at the given path.

Implementations on Foreign Types§

Source§

impl AssetSource for ()

Source§

fn load(&self, _path: &str) -> Result<Option<Cow<'static, [u8]>>>

Source§

fn list(&self, _path: &str) -> Result<Vec<SharedString>>

Implementors§