mirror of
https://github.com/actix/actix-website
synced 2025-08-31 08:57:01 +02:00
use tuple for multiple extractors
This commit is contained in:
@@ -22,7 +22,7 @@ function.
|
|||||||
```rust
|
```rust
|
||||||
|
|
||||||
// Option 1: passed as a parameter to a handler function
|
// Option 1: passed as a parameter to a handler function
|
||||||
fn index(params: Path<(String, String,)>, info: Json<MyInfo>) -> HttpResponse {
|
fn index((params, info): (Path<(String, String,)>, Json<MyInfo>)) -> HttpResponse {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user