mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-27 20:02:04 +00:00
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.
30 lines
927 B
TOML
30 lines
927 B
TOML
[package]
|
|
name = "rocket_codegen"
|
|
version = "0.4.0-rc.1"
|
|
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
|
description = "Procedural macros for the Rocket web framework."
|
|
documentation = "https://api.rocket.rs/v0.4/rocket_codegen/"
|
|
homepage = "https://rocket.rs"
|
|
repository = "https://github.com/SergioBenitez/Rocket"
|
|
readme = "../../README.md"
|
|
keywords = ["rocket", "web", "framework", "code", "generation"]
|
|
license = "MIT/Apache-2.0"
|
|
build = "build.rs"
|
|
|
|
[lib]
|
|
proc-macro = true
|
|
|
|
[dependencies]
|
|
indexmap = "1.0"
|
|
quote = "0.6.1"
|
|
rocket_http = { version = "0.4.0-rc.1", path = "../http/" }
|
|
devise = { git = "http://github.com/SergioBenitez/Devise", rev = "b5295e3e" }
|
|
|
|
[build-dependencies]
|
|
yansi = { git = "https://github.com/SergioBenitez/yansi", rev = "59c3a91" }
|
|
version_check = "0.1.3"
|
|
|
|
[dev-dependencies]
|
|
rocket = { version = "0.4.0-rc.1", path = "../lib" }
|
|
compiletest_rs = { git = "https://github.com/laumann/compiletest-rs" }
|