Skip to main content

Assets

Trait Assets 

Source
pub trait Assets:
    Send
    + Sync
    + 'static {
    // Required method
    fn read(&self, uri: &str) -> Result<Vec<u8>, String>;
}
Expand description

Reads the app’s bundled files (asset:/… URIs): from the app’s resources, or from the dev server during development.

Required Methods§

Source

fn read(&self, uri: &str) -> Result<Vec<u8>, String>

The bytes of uri. Blocking; called on the engine thread.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§