@@ -149,6 +149,9 @@ impl Request {
149149 Some ( co)
150150 }
151151
152+ /// Sets the value as the module's context.
153+ ///
154+ /// See https://nginx.org/en/docs/dev/development_guide.html#http_request
152155 pub fn set_module_ctx ( & self , value : * mut c_void , module : & ngx_module_t ) {
153156 unsafe {
154157 * self . 0 . ctx . add ( module. ctx_index ) = value;
@@ -191,11 +194,17 @@ impl Request {
191194 self . 0 . headers_out . status = status. into ( ) ;
192195 }
193196
197+ /// Add header to the `headers_in` object.
198+ ///
199+ /// See https://nginx.org/en/docs/dev/development_guide.html#http_request
194200 pub fn add_header_in ( & mut self , key : & str , value : & str ) -> Option < ( ) > {
195201 let table: * mut ngx_table_elt_t = unsafe { ngx_list_push ( & mut self . 0 . headers_in . headers ) as _ } ;
196202 add_to_ngx_table ( table, self . 0 . pool , key, value)
197203 }
198204
205+ /// Add header to the `headers_out` object.
206+ ///
207+ /// See https://nginx.org/en/docs/dev/development_guide.html#http_request
199208 pub fn add_header_out ( & mut self , key : & str , value : & str ) -> Option < ( ) > {
200209 let table: * mut ngx_table_elt_t = unsafe { ngx_list_push ( & mut self . 0 . headers_out . headers ) as _ } ;
201210 add_to_ngx_table ( table, self . 0 . pool , key, value)
@@ -340,6 +349,9 @@ impl fmt::Debug for Request {
340349 }
341350}
342351
352+ /// Iterator for `ngx_list_t` types.
353+ ///
354+ /// Implementes the std::iter::Iterator trait.
343355pub struct NgxListIterator {
344356 done : bool ,
345357 part : * const ngx_list_part_t ,
@@ -459,6 +471,7 @@ impl Method {
459471 /// CONNECT
460472 pub const CONNECT : Method = Method ( MethodInner :: Connect ) ;
461473
474+ /// Convert a Method to a &str.
462475 #[ inline]
463476 pub fn as_str ( & self ) -> & str {
464477 match self . 0 {
0 commit comments