Struct tsukuyomi::router::Builder [−][src]
pub struct Builder { /* fields omitted */ }
A builder object for constructing an instance of Router
.
Methods
impl Builder
[src]
impl Builder
pub fn mount<'a>(&'a mut self, base: &'a str) -> Mount<'a>
[src]
pub fn mount<'a>(&'a mut self, base: &'a str) -> Mount<'a>
Creates a proxy object to add some routes mounted to the provided prefix.
ⓘImportant traits for &'a mut Rpub fn fallback_head(&mut self, enabled: bool) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn fallback_head(&mut self, enabled: bool) -> &mut Self
Sets whether the fallback to GET if the handler for HEAD is not registered is enabled or not.
The default value is true
.
pub fn finish(&mut self) -> Result<Router, Error>
[src]
pub fn finish(&mut self) -> Result<Router, Error>
Creates an instance of Router
with current configuration.