[−][src]Trait nickel::Mountable
Required methods
fn mount<S: Into<String>, M: Middleware<D>>(
&mut self,
mount_point: S,
middleware: M
)
&mut self,
mount_point: S,
middleware: M
)
Implementors
impl<D> Mountable<D> for Nickel<D> where
D: Send + Sync + 'static,
[src]
impl<D> Mountable<D> for Nickel<D> where
D: Send + Sync + 'static,
fn mount<S: Into<String>, M: Middleware<D>>( | [src] |
A trait that makes mounting more convenient. Works the same as
manually adding a Mount
middleware.
Examples
use nickel::{Nickel, StaticFilesHandler, Mountable}; let mut server = Nickel::new(); server.mount("/static_files/", StaticFilesHandler::new("/path/to/serve/"));
Panics
Panics if mount_point does not have a leading and trailing slash.