File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ extern crate semver;
2
2
3
3
use std:: collections:: HashMap ;
4
4
use std:: io:: net:: ip:: IpAddr ;
5
+ use std:: any:: Any ;
5
6
6
7
#[ deriving( PartialEq , Show , Clone ) ]
7
8
pub enum Scheme {
@@ -34,6 +35,9 @@ pub enum Method<'a> {
34
35
Other ( & ' a str )
35
36
}
36
37
38
+ /// A Dictionary for extensions provided by the server or middleware
39
+ pub type Extensions = HashMap < & ' static str , Box < Any > > ;
40
+
37
41
pub trait Request {
38
42
/// The version of HTTP being used
39
43
fn http_version ( & self ) -> semver:: Version ;
@@ -73,6 +77,12 @@ pub trait Request {
73
77
74
78
/// A Reader for the body of the request
75
79
fn body < ' a > ( & ' a mut self ) -> & ' a mut Reader ;
80
+
81
+ /// A readable map of extensions
82
+ fn extensions < ' a > ( & ' a self ) -> & ' a Extensions ;
83
+
84
+ /// A mutable map of extensions
85
+ fn mut_extensions < ' a > ( & ' a mut self ) -> & ' a mut Extensions ;
76
86
}
77
87
78
88
pub type HeaderEntries < ' a > = Box < Iterator < ( & ' a str , Vec < & ' a str > ) > > ;
You can’t perform that action at this time.
0 commit comments