Crates.io | actix-embed |
lib.rs | actix-embed |
version | 0.1.0 |
source | src |
created_at | 2022-06-19 07:08:36.806693 |
updated_at | 2022-06-19 07:08:36.806693 |
description | Provides embedded files to actix. |
homepage | https://github.com/unbyte/actix-embed |
repository | https://github.com/unbyte/actix-embed |
max_upload_size | |
id | 608845 |
size | 18,597 |
Serve embedded file with actix.
use actix_web::App;
use actix_embed::Embed;
use rust_embed::RustEmbed;
#[derive(RustEmbed)]
#[folder = "testdata/"]
struct Assets;
let app = App::new()
.service(Embed::new("/static", &Assets));