Router: implement missing builder methods
This commit is contained in:
parent
fc937099b3
commit
2ab1f7119c
|
@ -51,6 +51,21 @@ impl Router {
|
||||||
self.get = Some(m);
|
self.get = Some(m);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn put(mut self, m: ApiMethod) -> Self {
|
||||||
|
self.put = Some(m);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn post(mut self, m: ApiMethod) -> Self {
|
||||||
|
self.post = Some(m);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn delete(mut self, m: ApiMethod) -> Self {
|
||||||
|
self.delete = Some(m);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
pub fn find_route(&self, components: &[&str]) -> Option<&Router> {
|
pub fn find_route(&self, components: &[&str]) -> Option<&Router> {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue