pub trait RustEmbed {
    fn get(file_path: &str) -> Option<EmbeddedFile>;
}
Expand description

A directory of binary assets.

The files in the specified folder will be embedded into the executable in release builds.

This trait is meant to be derived like so:

use rust_embed_for_web::RustEmbed;

#[derive(RustEmbed)]
#[folder = "examples/public/"]
struct Asset;

fn main() {}

Required Methods

Get an embedded file and its metadata.

Implementors