@@ -29,15 +29,18 @@ pub suberror HttpProtocolError {
2929 NotImplemented
3030}
3131impl Show for HttpProtocolError
32+ impl ToJson for HttpProtocolError
3233
3334pub suberror ProxyError Response
3435impl Show for ProxyError
36+ impl ToJson for ProxyError
3537
3638pub suberror URIParseError {
3739 InvalidFormat
3840 UnsupportedProtocol(String)
3941}
4042impl Show for URIParseError
43+ impl ToJson for URIParseError
4144
4245// Types and methods
4346type Client
@@ -59,13 +62,19 @@ pub(all) enum Protocol {
5962 Https
6063}
6164fn Protocol::default_port(Self) -> Int
65+ impl Compare for Protocol
66+ impl Eq for Protocol
67+ impl Hash for Protocol
68+ impl Show for Protocol
69+ impl ToJson for Protocol
6270
6371pub(all) struct Request {
6472 meth : RequestMethod
6573 path : String
6674 headers : Map[String, String]
6775}
6876impl Show for Request
77+ impl ToJson for Request
6978
7079pub(all) enum RequestMethod {
7180 Get
@@ -78,15 +87,19 @@ pub(all) enum RequestMethod {
7887 Trace
7988 Patch
8089}
90+ impl Compare for RequestMethod
8191impl Eq for RequestMethod
92+ impl Hash for RequestMethod
8293impl Show for RequestMethod
94+ impl ToJson for RequestMethod
8395
8496pub(all) struct Response {
8597 code : Int
8698 reason : String
8799 headers : Map[String, String]
88100}
89101impl Show for Response
102+ impl ToJson for Response
90103
91104type Server
92105async fn Server::accept(Self) -> (ServerConnection, @socket.Addr)
0 commit comments