Struct tsukuyomi::router::Mount [−][src]
pub struct Mount<'a> { /* fields omitted */ }
A proxy object for adding routes with the certain prefix.
Methods
impl<'a> Mount<'a>
[src]
impl<'a> Mount<'a>
ⓘImportant traits for &'a mut Rpub fn route<H, R>(
&mut self,
path: &str,
method: Method,
handler: H
) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn route<H, R>(
&mut self,
path: &str,
method: Method,
handler: H
) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Adds a route with the provided path, method and handler.
ⓘImportant traits for &'a mut Rpub fn get<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn get<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::GET, handler)
.
ⓘImportant traits for &'a mut Rpub fn post<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn post<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::POST, handler)
.
ⓘImportant traits for &'a mut Rpub fn put<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn put<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::PUT, handler)
.
ⓘImportant traits for &'a mut Rpub fn delete<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn delete<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::DELETE, handler)
.
ⓘImportant traits for &'a mut Rpub fn head<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn head<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::HEAD, handler)
.
ⓘImportant traits for &'a mut Rpub fn options<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn options<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::OPTIONS, handler)
.
ⓘImportant traits for &'a mut Rpub fn patch<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
[src]
ⓘImportant traits for &'a mut R
pub fn patch<H, R>(&mut self, path: &str, handler: H) -> &mut Self where
H: Fn(&Context) -> R + Send + Sync + 'static,
R: Future + Send + 'static,
R::Output: Responder,
Equivalent to mount.route(path, Method::PATCH, handler)
.