mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
update examples
This commit is contained in:
12
src/route.rs
12
src/route.rs
@ -43,9 +43,9 @@ impl<S: 'static> Route<S> {
|
||||
self.handler.handle(req)
|
||||
}
|
||||
|
||||
/// Add match predicate to route.
|
||||
pub fn p(&mut self, p: Box<Predicate<S>>) -> &mut Self {
|
||||
self.preds.push(p);
|
||||
/// Add method check to route. This method could be called multiple times.
|
||||
pub fn method(&mut self, method: Method) -> &mut Self {
|
||||
self.preds.push(pred::Method(method));
|
||||
self
|
||||
}
|
||||
|
||||
@ -57,9 +57,9 @@ impl<S: 'static> Route<S> {
|
||||
self
|
||||
}
|
||||
|
||||
/// Add method check to route. This method could be called multiple times.
|
||||
pub fn method(&mut self, method: Method) -> &mut Self {
|
||||
self.preds.push(pred::Method(method));
|
||||
/// Add match predicate to route.
|
||||
pub fn p(&mut self, p: Box<Predicate<S>>) -> &mut Self {
|
||||
self.preds.push(p);
|
||||
self
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user