Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update extractors.md #351

Closed
wants to merge 1 commit into from
Closed

Update extractors.md #351

wants to merge 1 commit into from

Conversation

kunal171
Copy link

@kunal171 kunal171 commented Dec 5, 2023

Need to add serde dependency with derive feature in dependencies in Cargo.toml file

Need to add serde dependency with derive feature in dependencies in Cargo.toml file
Copy link

netlify bot commented Dec 5, 2023

Deploy Preview for actix-website ready!

Name Link
🔨 Latest commit 2d3ded2
🔍 Latest deploy log https://app.netlify.com/sites/actix-website/deploys/656f3d3f4a02e30008f55bfb
😎 Deploy Preview https://deploy-preview-351--actix-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 23 to +31
It is also possible to extract path information to a type that implements the `Deserialize` trait from `serde` by matching dynamic segment names with field names. Here is an equivalent example that uses `serde` instead of a tuple type.

It depends on `serde`:

```toml
[dependencies]
serde = { version = "1.0", features = ["derive"] }
```

Copy link
Member

@robjtede robjtede Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see your point, but i think this is a more suitable amendment to the current docs

Suggested change
It is also possible to extract path information to a type that implements the `Deserialize` trait from `serde` by matching dynamic segment names with field names. Here is an equivalent example that uses `serde` instead of a tuple type.
It depends on `serde`:
```toml
[dependencies]
serde = { version = "1.0", features = ["derive"] }
```
It is also possible to extract path information to a type that implements the `Deserialize` trait from `serde` by matching dynamic segment names with field names. Here is an equivalent example that uses a deserialization struct using `serde` (make sure to enable its `derive` feature) instead of a tuple type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented in 4c56331

@robjtede robjtede closed this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants