Update Rust crate rocket to 0.5.0-rc.2
Created by: renovate[bot]
This PR contains the following updates:
Package | Type | Update | New value | References | Sourcegraph |
---|---|---|---|---|---|
rocket (source) | dependencies | patch | 0.5.0-rc.2 | homepage, source |
Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR.
Test plan: CI should pass with updated dependencies.
Release Notes
SergioBenitez/Rocket
v0.5.0-rc.2
Major Features and Improvements
- Introduced [
rocket_db_pools
] for asynchronous database pooling. - Introduced support for [mutual TLS] and client [
Certificate
]s. - Added a [
local_cache_once!
] macro for request-local storage. - Added a v0.4 to v0.5 migration guide and FAQ to Rocket's website.
- Introduced shutdown fairings.
Breaking Changes
-
Hash
impl
s forMediaType
andContentType
no longer consider media type parameters. - TLS config values are only available when the
tls
feature is enabled. - [
MediaType::with_params()
] and [ContentType::with_params()
] are now builder methods. - Content-Type [
content
] responder type names are now prefixed withRaw
. - The
content::Plain
responder is now calledcontent::RawText
. - The
content::Custom<T>
responder was removed in favor of [(ContentType, T)
][(ContentType, T)]. - TLS config structs are now only available when the
tls
feature is enabled. - Removed
CookieJar::get_private_pending()
in favor of [CookieJar::get_pending()
][CookieJar::get_pending()]. - The [
local_cache!
] macro accepts fewer types. Use [local_cache_once!
] as appropriate. - When requested, the
FromForm
implementations ofVec
andMap
s are now properly lenient. - To concord with browsers, the
[
and]
characters are now accepted in URI paths. - The
[
and]
characters are no longer encoded by [uri!
]. - [
Rocket::launch()
][Rocket::launch()] allowsRocket
recovery by returning the instance after shutdown. -
ErrorKind::Runtime
was removed; [ErrorKind::Shutdown
][ErrorKind::Shutdown] was added.
General Improvements
- [
Rocket
] is now#[must_use]
. - Support for HTTP/2 can be disabled by disabling the default
http2
crate feature. - Added [
rocket::execute()
][rocket::execute()] for executing Rocket'slaunch()
future. - Added the [
context!
] macro to [rocket_dyn_templates
] for ad-hoc template contexts. - The
time
crate is re-exported from the crate root. - The
FromForm
,Responder
, andUriDisplay
derives now fully support generics. - Added helper functions to
serde
submodules. - The [
Shield
] HSTS preload header now includesincludeSubdomains
. - Logging ignores
write!
errors ifstdout
disappears, preventing panics. - Added [
Client::terminate()
][Client::terminate()] to run graceful shutdown in testing. - Shutdown now terminates the
async
runtime, never the process.
HTTP
- Introduced [
Host
] and the [&Host
] request guard. - Added
Markdown
(text/markdown
) as a known media type. - Added [
RawStr::percent_encode_bytes()
]. -
NODELAY
is now enabled on all connections by default. - The TLS implementation handles handshakes off the main task, improving DoS resistance.
Request
- Added [
Request::host()
] to retrieve the client-requested host.
Trait Implementations
-
Arc<T>
,Box<T>
whereT: Responder
now implementResponder
. - [
Method
] implementsSerialize
andDeserialize
. - [
MediaType
] and [ContentType
] implementEq
.
Updated Dependencies
- The
time
dependency was updated to0.3
. - The
handlebars
dependency was updated to4.0
. - The
memcache
dependency was updated to0.16
. - The
rustls
dependency was updated to0.20
.
Infrastructure
- Rocket now uses the 2021 edition of Rust.
Configuration
-
If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.