rust-embed-for-web 11.3.0

Rust Macro which embeds files into your executable. A fork of `rust-embed` with a focus on usage on web servers.
Documentation
1
2
3
4
5
6
7
use rust_embed_for_web::EmbedableFile;

pub fn read_embed_as_string<T: EmbedableFile>(file: T) -> String {
    let data = file.data();
    let index_contents = String::from_utf8_lossy(data.as_ref());
    index_contents.to_string()
}