Struct staticdir::StaticDir [] [src]

pub struct StaticDir<T> {
    pub root: PathBuf,
    // some fields omitted
}

An implementation of Handler which serves list of directory contents.

Fields

root

The path from which this handler serves the list of directory contents.

Methods

impl<T> StaticDir<T>

fn new<P>(root: P, response_strategy: T) -> StaticDir<T> where P: Into<PathBuf>

Creates new instance of the StaticDir handler.

Trait Implementations

impl<T> Handler for StaticDir<T> where T: Send + Sync + Any + ResponseStrategy

fn handle(&self, req: &mut Request) -> IronResult<Response>

impl<T> AfterMiddleware for StaticDir<T> where T: Send + Sync + Any + ResponseStrategy

fn after(&self, req: &mut Request, res: Response) -> IronResult<Response>

fn catch(&self, req: &mut Request, err: IronError) -> IronResult<Response>