1 2 3 4 5 6 7 8 9 10 11
#[macro_use] extern crate rust_embed; #[derive(RustEmbed)] #[folder = "examples/public/"] struct Asset; fn main() { let index_html = Asset::get("index.html").unwrap(); println!("{:?}", std::str::from_utf8(&index_html)); }