1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 16:02:59 +01:00
actix-extras/src/staticfiles.rs

24 lines
467 B
Rust
Raw Normal View History

#![allow(dead_code, unused_variables)]
use std::rc::Rc;
use task::Task;
use route::RouteHandler;
use payload::Payload;
use httpcodes::HTTPOk;
use httprequest::HttpRequest;
pub struct StaticFiles {
directory: String,
show_index: bool,
chunk_size: usize,
follow_synlinks: bool,
}
impl<S: 'static> RouteHandler<S> for StaticFiles {
fn handle(&self, req: HttpRequest, payload: Payload, state: Rc<S>) -> Task {
Task::reply(HTTPOk)
}
}