mirror of https://github.com/rwf2/Rocket.git
b7db74144f
This commit introduces the sealed `UriPart` marker trait as well as the implementing `Path` and `Query` marker types, allowing for parts of a URI to be distinguished at the type level. Consequently, `UriDisplay` has been parameterized with `P: UriPart`, creating `UriDisplay<Path>` and `UriDisplay<Query>`. The effect of this change is improved type safely for URI rendering as well as the ability to omit rendering values in query parts via `Option` and `Result`. The `UriDisplay` derive was replaced by `UriDisplayQuery` and `UriDisplayPath` which derive implementations for `UriDisplay<Path>` and `UriDisplay<Query>`, respectively. This commit also works around a rustdoc visibility issue by creating a hidden `http::private` module. Finally, this commit also removes the now vestigial use of the `rustc_private` feature in codegen. Fixes #827. |
||
---|---|---|
.. | ||
catch.rs | ||
catch.stderr | ||
catch_type_errors.rs | ||
catch_type_errors.stderr | ||
catchers.rs | ||
catchers.stderr | ||
from_form.rs | ||
from_form.stderr | ||
from_form_type_errors.rs | ||
from_form_type_errors.stderr | ||
from_form_value.rs | ||
from_form_value.stderr | ||
responder-types.rs | ||
responder-types.stderr | ||
responder.stderr | ||
route-attribute-general-syntax.rs | ||
route-attribute-general-syntax.stderr | ||
route-path-bad-syntax.rs | ||
route-path-bad-syntax.stderr | ||
route-type-errors.rs | ||
route-type-errors.stderr | ||
route-warnings.rs | ||
route-warnings.stderr | ||
routes.rs | ||
routes.stderr | ||
typed-uri-bad-type.rs | ||
typed-uri-bad-type.stderr | ||
typed-uris-bad-params.rs | ||
typed-uris-bad-params.stderr | ||
typed-uris-invalid-syntax.rs | ||
typed-uris-invalid-syntax.stderr | ||
update-references.sh | ||
uri_display.rs | ||
uri_display.stderr | ||
uri_display_type_errors.rs | ||
uri_display_type_errors.stderr |