1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

add Item and Error to FromRequest trait

This commit is contained in:
Nikolay Kim
2017-12-03 14:22:04 -08:00
parent 6bc7d60f52
commit 7c6faaa8e0
14 changed files with 178 additions and 108 deletions

View File

@@ -1,6 +1,6 @@
//! Static files support.
//!
//! TODO: needs to re-implement actual files handling, current impl blocks
// //! TODO: needs to re-implement actual files handling, current impl blocks
use std::io;
use std::io::Read;
use std::fmt::Write;
@@ -19,11 +19,10 @@ use httpcodes::{HTTPOk, HTTPNotFound};
///
/// ```rust
/// extern crate actix_web;
/// use actix_web::*;
///
/// fn main() {
/// let app = Application::default("/")
/// .route("/static", StaticFiles::new(".", true))
/// let app = actix_web::Application::default("/")
/// .route("/static", actix_web::fs::StaticFiles::new(".", true))
/// .finish();
/// }
/// ```
@@ -39,6 +38,7 @@ impl StaticFiles {
/// Create new `StaticFiles` instance
///
/// `dir` - base directory
///
/// `index` - show index for directory
pub fn new<D: Into<PathBuf>>(dir: D, index: bool) -> StaticFiles {
let dir = dir.into();