1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-28 15:57:47 +02:00

refactor service registration process; unify services and resources

This commit is contained in:
Nikolay Kim
2019-03-06 15:47:15 -08:00
parent 5cde4dc479
commit fe22e83144
18 changed files with 845 additions and 779 deletions

View File

@@ -149,9 +149,10 @@ impl HttpMessage for HttpRequest {
/// }
///
/// fn main() {
/// let app = App::new().resource("/users/:first", |r| {
/// r.route(web::get().to(index))
/// });
/// let app = App::new().service(
/// web::resource("/users/{first}").route(
/// web::get().to(index))
/// );
/// }
/// ```
impl<P> FromRequest<P> for HttpRequest {