We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2e24241 + fd555a6 commit 37c1762Copy full SHA for 37c1762
src/response.rs
@@ -247,10 +247,23 @@ impl Response {
247
self.res.local_mut().insert(val);
248
self
249
}
250
+
251
+ /// Create a `tide::Response` from a type that can be converted into an
252
+ /// `http_types::Response`.
253
+ pub fn from_res<T>(value: T) -> Self
254
+ where
255
+ T: Into<http_types::Response>,
256
+ {
257
+ let res: http_types::Response = value.into();
258
+ Self {
259
+ res,
260
+ cookie_events: vec![],
261
+ }
262
263
264
265
impl Into<http::Response> for Response {
- fn into(self) -> http::Response {
266
+ fn into(self) -> http_types::Response {
267
self.res
268
269
0 commit comments