actix-web
actix-web copied to clipboard
Expose inner value of Path
PR Type
Feature
PR Checklist
- [ ] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [ ] A changelog entry has been made for the appropriate packages.
- [ ] Format code with the latest stable rustfmt.
- [x] (Team) Label with affected crates and semver status.
Overview
The inner value is already exposed via the into_inner function, so we may as well expose it directly to improve ergonomics. I have updated the doc example to illustrate this.
Note that this aligns the implementation with that of Query, Json, Header, and Form.
This will be included with the next breaking release. Actix-web-lab has a version with public T you can use in the meantime.
https://docs.rs/actix-web-lab/latest/actix_web_lab/extract/struct.Path.html