pub trait Assets:
Send
+ Sync
+ 'static {
// Required method
fn read(&self, uri: &str) -> Result<Vec<u8>, String>;
// Provided methods
fn url(&self, uri: &str) -> Option<String> { ... }
fn base(&self) -> Option<AssetBase> { ... }
}Expand description
Reads the app’s bundled files (asset:/… URIs): from the app’s
resources, or from the dev server during development. The engine reads
the fonts it registers with it, and answers the app’s requests of
asset:/ URLs (fetch) from it.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".