Crate actix_embed

Source
Expand description

§actix-embed

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));

Structs§

Traits§

  • Fallback handlers will be called when no matched file could be found.