feat: impl IntoResponseParts for Redirect (#3721)

This commit is contained in:
Dihan Nahdi
2026-05-02 17:46:22 +02:00
committed by GitHub
parent bff1764b70
commit b0123f7051
4 changed files with 123 additions and 2 deletions
@@ -107,6 +107,18 @@ pub struct ResponseParts {
}
impl ResponseParts {
/// Gets the response status code.
#[must_use]
pub fn status(&self) -> StatusCode {
self.res.status()
}
/// Gets a mutable reference to the response status code.
#[must_use]
pub fn status_mut(&mut self) -> &mut StatusCode {
self.res.status_mut()
}
/// Gets a reference to the response headers.
#[must_use]
pub fn headers(&self) -> &HeaderMap {