Struct pemmican::plugins::htdocs::Htdocs[][src]

pub struct Htdocs { /* fields omitted */ }

This plugin serves static files from a document root.

If a previous router handler has already set a body, this plugin will take no action. It will only serve files if the path matches and the response body has not yet been set.

Methods

impl Htdocs
[src]

Create a new Htdocs plugin with the given document root.

index is the file to search for in case a directory is specified, e.g. Some(index.html) or simply None if directories are not to be matched.

Trait Implementations

impl<S, E> Plugin<S, E> for Htdocs where
    S: Send + Sync + 'static,
    E: Send + 'static, 
[src]

Important traits for Box<R>

Auto Trait Implementations

impl Send for Htdocs

impl Sync for Htdocs