File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
#![ allow( unused_imports) ]
2
2
3
- // TODO(david): document that using a multi threaded tokio runtime is
4
- // required (because of `block_in_place`)
5
- // TODO(david): send_gzip on channel, but disabling compression of a message
6
-
7
3
use self :: util:: * ;
8
4
use futures:: { Stream , StreamExt } ;
9
5
use std:: {
Original file line number Diff line number Diff line change @@ -58,13 +58,16 @@ pub fn generate<T: Service>(
58
58
#service_ident:: new( InterceptedService :: new( inner, interceptor) )
59
59
}
60
60
61
- // TODO(david): docs
61
+ /// Compress requests with `gzip`.
62
+ ///
63
+ /// This requires the server to support it otherwise it might respond with an
64
+ /// error.
62
65
pub fn send_gzip( mut self ) -> Self {
63
66
self . inner = self . inner. send_gzip( ) ;
64
67
self
65
68
}
66
69
67
- // TODO(david): docs
70
+ /// Enable decompressing responses with `gzip`.
68
71
pub fn accept_gzip( mut self ) -> Self {
69
72
self . inner = self . inner. accept_gzip( ) ;
70
73
self
Original file line number Diff line number Diff line change @@ -46,13 +46,13 @@ pub fn generate<T: Service>(
46
46
47
47
let configure_compression_methods = if compression_enabled {
48
48
quote ! {
49
- // TODO(david): docs
49
+ /// Enable decompressing requests with `gzip`.
50
50
pub fn accept_gzip( mut self ) -> Self {
51
51
self . accept_compression_encodings. enable_gzip( ) ;
52
52
self
53
53
}
54
54
55
- // TODO(david): docs
55
+ /// Compress responses with `gzip`, if the client supports it.
56
56
pub fn send_gzip( mut self ) -> Self {
57
57
self . send_compression_encodings. enable_gzip( ) ;
58
58
self
You can’t perform that action at this time.
0 commit comments