mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
24 lines
467 B
Rust
24 lines
467 B
Rust
|
#![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)
|
||
|
}
|
||
|
}
|