actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

Expose inner value of Path

Open sebastianv89 opened this issue 3 years ago • 1 comments

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.

sebastianv89 avatar Aug 10 '22 08:08 sebastianv89

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

robjtede avatar Aug 10 '22 11:08 robjtede