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.
1 parent f575a12 commit fd555a6Copy full SHA for fd555a6
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