File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,18 @@ impl<State> Request<State> {
308
308
}
309
309
}
310
310
311
+ impl < State > AsMut < http:: Request > for Request < State > {
312
+ fn as_mut ( & mut self ) -> & mut http:: Request {
313
+ & mut self . request
314
+ }
315
+ }
316
+
317
+ impl < State > AsRef < http:: Request > for Request < State > {
318
+ fn as_ref ( & self ) -> & http:: Request {
319
+ & self . request
320
+ }
321
+ }
322
+
311
323
impl < State > Read for Request < State > {
312
324
fn poll_read (
313
325
mut self : Pin < & mut Self > ,
@@ -318,6 +330,12 @@ impl<State> Read for Request<State> {
318
330
}
319
331
}
320
332
333
+ impl < State > Into < http:: Request > for Request < State > {
334
+ fn into ( self ) -> http:: Request {
335
+ self . request
336
+ }
337
+ }
338
+
321
339
// NOTE: From cannot be implemented for this conversion because `State` needs to
322
340
// be constrained by a type.
323
341
impl < State : Send + Sync + ' static > Into < Response > for Request < State > {
Original file line number Diff line number Diff line change @@ -262,6 +262,18 @@ impl Response {
262
262
}
263
263
}
264
264
265
+ impl AsMut < http:: Response > for Response {
266
+ fn as_mut ( & mut self ) -> & mut http:: Response {
267
+ & mut self . res
268
+ }
269
+ }
270
+
271
+ impl AsRef < http:: Response > for Response {
272
+ fn as_ref ( & self ) -> & http:: Response {
273
+ & self . res
274
+ }
275
+ }
276
+
265
277
impl Into < http:: Response > for Response {
266
278
fn into ( self ) -> http_types:: Response {
267
279
self . res
You can’t perform that action at this time.
0 commit comments