Ver código fonte

Regenerate protobufs with rust-protobuf 2.7.0

George Hahn 5 anos atrás
pai
commit
0bf96ec6c5
6 arquivos alterados com 1361 adições e 1079 exclusões
  1. 285 213
      protocol/src/authentication.rs
  2. 279 208
      protocol/src/keyexchange.rs
  3. 207 162
      protocol/src/mercury.rs
  4. 272 227
      protocol/src/metadata.rs
  5. 36 26
      protocol/src/pubsub.rs
  6. 282 243
      protocol/src/spirc.rs

Diferenças do arquivo suprimidas por serem muito extensas
+ 285 - 213
protocol/src/authentication.rs


Diferenças do arquivo suprimidas por serem muito extensas
+ 279 - 208
protocol/src/keyexchange.rs


+ 207 - 162
protocol/src/mercury.rs

@@ -1,9 +1,9 @@
-// This file is generated by rust-protobuf 2.0.5. Do not edit
+// This file is generated by rust-protobuf 2.7.0. Do not edit
 // @generated
 
 // https://github.com/Manishearth/rust-clippy/issues/702
 #![allow(unknown_lints)]
-#![allow(clippy)]
+#![allow(clippy::all)]
 
 #![cfg_attr(rustfmt, rustfmt_skip)]
 
@@ -17,17 +17,28 @@
 #![allow(unsafe_code)]
 #![allow(unused_imports)]
 #![allow(unused_results)]
+//! Generated file from `mercury.proto`
 
 use protobuf::Message as Message_imported_for_functions;
 use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
 
+/// Generated files are compatible only with the same version
+/// of protobuf runtime.
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
+
 #[derive(PartialEq,Clone,Default)]
 pub struct MercuryMultiGetRequest {
     // message fields
     request: ::protobuf::RepeatedField<MercuryRequest>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a MercuryMultiGetRequest {
+    fn default() -> &'a MercuryMultiGetRequest {
+        <MercuryMultiGetRequest as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl MercuryMultiGetRequest {
@@ -37,6 +48,10 @@ impl MercuryMultiGetRequest {
 
     // repeated .MercuryRequest request = 1;
 
+
+    pub fn get_request(&self) -> &[MercuryRequest] {
+        &self.request
+    }
     pub fn clear_request(&mut self) {
         self.request.clear();
     }
@@ -55,10 +70,6 @@ impl MercuryMultiGetRequest {
     pub fn take_request(&mut self) -> ::protobuf::RepeatedField<MercuryRequest> {
         ::std::mem::replace(&mut self.request, ::protobuf::RepeatedField::new())
     }
-
-    pub fn get_request(&self) -> &[MercuryRequest] {
-        &self.request
-    }
 }
 
 impl ::protobuf::Message for MercuryMultiGetRequest {
@@ -174,7 +185,7 @@ impl ::protobuf::Message for MercuryMultiGetRequest {
 
 impl ::protobuf::Clear for MercuryMultiGetRequest {
     fn clear(&mut self) {
-        self.clear_request();
+        self.request.clear();
         self.unknown_fields.clear();
     }
 }
@@ -196,8 +207,14 @@ pub struct MercuryMultiGetReply {
     // message fields
     reply: ::protobuf::RepeatedField<MercuryReply>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a MercuryMultiGetReply {
+    fn default() -> &'a MercuryMultiGetReply {
+        <MercuryMultiGetReply as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl MercuryMultiGetReply {
@@ -207,6 +224,10 @@ impl MercuryMultiGetReply {
 
     // repeated .MercuryReply reply = 1;
 
+
+    pub fn get_reply(&self) -> &[MercuryReply] {
+        &self.reply
+    }
     pub fn clear_reply(&mut self) {
         self.reply.clear();
     }
@@ -225,10 +246,6 @@ impl MercuryMultiGetReply {
     pub fn take_reply(&mut self) -> ::protobuf::RepeatedField<MercuryReply> {
         ::std::mem::replace(&mut self.reply, ::protobuf::RepeatedField::new())
     }
-
-    pub fn get_reply(&self) -> &[MercuryReply] {
-        &self.reply
-    }
 }
 
 impl ::protobuf::Message for MercuryMultiGetReply {
@@ -344,7 +361,7 @@ impl ::protobuf::Message for MercuryMultiGetReply {
 
 impl ::protobuf::Clear for MercuryMultiGetReply {
     fn clear(&mut self) {
-        self.clear_reply();
+        self.reply.clear();
         self.unknown_fields.clear();
     }
 }
@@ -369,8 +386,14 @@ pub struct MercuryRequest {
     body: ::protobuf::SingularField<::std::vec::Vec<u8>>,
     etag: ::protobuf::SingularField<::std::vec::Vec<u8>>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a MercuryRequest {
+    fn default() -> &'a MercuryRequest {
+        <MercuryRequest as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl MercuryRequest {
@@ -380,6 +403,13 @@ impl MercuryRequest {
 
     // optional string uri = 1;
 
+
+    pub fn get_uri(&self) -> &str {
+        match self.uri.as_ref() {
+            Some(v) => &v,
+            None => "",
+        }
+    }
     pub fn clear_uri(&mut self) {
         self.uri.clear();
     }
@@ -407,15 +437,15 @@ impl MercuryRequest {
         self.uri.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_uri(&self) -> &str {
-        match self.uri.as_ref() {
+    // optional string content_type = 2;
+
+
+    pub fn get_content_type(&self) -> &str {
+        match self.content_type.as_ref() {
             Some(v) => &v,
             None => "",
         }
     }
-
-    // optional string content_type = 2;
-
     pub fn clear_content_type(&mut self) {
         self.content_type.clear();
     }
@@ -443,15 +473,15 @@ impl MercuryRequest {
         self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_content_type(&self) -> &str {
-        match self.content_type.as_ref() {
+    // optional bytes body = 3;
+
+
+    pub fn get_body(&self) -> &[u8] {
+        match self.body.as_ref() {
             Some(v) => &v,
-            None => "",
+            None => &[],
         }
     }
-
-    // optional bytes body = 3;
-
     pub fn clear_body(&mut self) {
         self.body.clear();
     }
@@ -479,15 +509,15 @@ impl MercuryRequest {
         self.body.take().unwrap_or_else(|| ::std::vec::Vec::new())
     }
 
-    pub fn get_body(&self) -> &[u8] {
-        match self.body.as_ref() {
+    // optional bytes etag = 4;
+
+
+    pub fn get_etag(&self) -> &[u8] {
+        match self.etag.as_ref() {
             Some(v) => &v,
             None => &[],
         }
     }
-
-    // optional bytes etag = 4;
-
     pub fn clear_etag(&mut self) {
         self.etag.clear();
     }
@@ -514,13 +544,6 @@ impl MercuryRequest {
     pub fn take_etag(&mut self) -> ::std::vec::Vec<u8> {
         self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new())
     }
-
-    pub fn get_etag(&self) -> &[u8] {
-        match self.etag.as_ref() {
-            Some(v) => &v,
-            None => &[],
-        }
-    }
 }
 
 impl ::protobuf::Message for MercuryRequest {
@@ -670,10 +693,10 @@ impl ::protobuf::Message for MercuryRequest {
 
 impl ::protobuf::Clear for MercuryRequest {
     fn clear(&mut self) {
-        self.clear_uri();
-        self.clear_content_type();
-        self.clear_body();
-        self.clear_etag();
+        self.uri.clear();
+        self.content_type.clear();
+        self.body.clear();
+        self.etag.clear();
         self.unknown_fields.clear();
     }
 }
@@ -701,8 +724,14 @@ pub struct MercuryReply {
     content_type: ::protobuf::SingularField<::std::string::String>,
     body: ::protobuf::SingularField<::std::vec::Vec<u8>>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a MercuryReply {
+    fn default() -> &'a MercuryReply {
+        <MercuryReply as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl MercuryReply {
@@ -712,6 +741,10 @@ impl MercuryReply {
 
     // optional sint32 status_code = 1;
 
+
+    pub fn get_status_code(&self) -> i32 {
+        self.status_code.unwrap_or(0)
+    }
     pub fn clear_status_code(&mut self) {
         self.status_code = ::std::option::Option::None;
     }
@@ -725,12 +758,15 @@ impl MercuryReply {
         self.status_code = ::std::option::Option::Some(v);
     }
 
-    pub fn get_status_code(&self) -> i32 {
-        self.status_code.unwrap_or(0)
-    }
-
     // optional string status_message = 2;
 
+
+    pub fn get_status_message(&self) -> &str {
+        match self.status_message.as_ref() {
+            Some(v) => &v,
+            None => "",
+        }
+    }
     pub fn clear_status_message(&mut self) {
         self.status_message.clear();
     }
@@ -758,15 +794,12 @@ impl MercuryReply {
         self.status_message.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_status_message(&self) -> &str {
-        match self.status_message.as_ref() {
-            Some(v) => &v,
-            None => "",
-        }
-    }
-
     // optional .MercuryReply.CachePolicy cache_policy = 3;
 
+
+    pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy {
+        self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO)
+    }
     pub fn clear_cache_policy(&mut self) {
         self.cache_policy = ::std::option::Option::None;
     }
@@ -780,12 +813,12 @@ impl MercuryReply {
         self.cache_policy = ::std::option::Option::Some(v);
     }
 
-    pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy {
-        self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO)
-    }
-
     // optional sint32 ttl = 4;
 
+
+    pub fn get_ttl(&self) -> i32 {
+        self.ttl.unwrap_or(0)
+    }
     pub fn clear_ttl(&mut self) {
         self.ttl = ::std::option::Option::None;
     }
@@ -799,12 +832,15 @@ impl MercuryReply {
         self.ttl = ::std::option::Option::Some(v);
     }
 
-    pub fn get_ttl(&self) -> i32 {
-        self.ttl.unwrap_or(0)
-    }
-
     // optional bytes etag = 5;
 
+
+    pub fn get_etag(&self) -> &[u8] {
+        match self.etag.as_ref() {
+            Some(v) => &v,
+            None => &[],
+        }
+    }
     pub fn clear_etag(&mut self) {
         self.etag.clear();
     }
@@ -832,15 +868,15 @@ impl MercuryReply {
         self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new())
     }
 
-    pub fn get_etag(&self) -> &[u8] {
-        match self.etag.as_ref() {
+    // optional string content_type = 6;
+
+
+    pub fn get_content_type(&self) -> &str {
+        match self.content_type.as_ref() {
             Some(v) => &v,
-            None => &[],
+            None => "",
         }
     }
-
-    // optional string content_type = 6;
-
     pub fn clear_content_type(&mut self) {
         self.content_type.clear();
     }
@@ -868,15 +904,15 @@ impl MercuryReply {
         self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_content_type(&self) -> &str {
-        match self.content_type.as_ref() {
+    // optional bytes body = 7;
+
+
+    pub fn get_body(&self) -> &[u8] {
+        match self.body.as_ref() {
             Some(v) => &v,
-            None => "",
+            None => &[],
         }
     }
-
-    // optional bytes body = 7;
-
     pub fn clear_body(&mut self) {
         self.body.clear();
     }
@@ -903,13 +939,6 @@ impl MercuryReply {
     pub fn take_body(&mut self) -> ::std::vec::Vec<u8> {
         self.body.take().unwrap_or_else(|| ::std::vec::Vec::new())
     }
-
-    pub fn get_body(&self) -> &[u8] {
-        match self.body.as_ref() {
-            Some(v) => &v,
-            None => &[],
-        }
-    }
 }
 
 impl ::protobuf::Message for MercuryReply {
@@ -1109,13 +1138,13 @@ impl ::protobuf::Message for MercuryReply {
 
 impl ::protobuf::Clear for MercuryReply {
     fn clear(&mut self) {
-        self.clear_status_code();
-        self.clear_status_message();
-        self.clear_cache_policy();
-        self.clear_ttl();
-        self.clear_etag();
-        self.clear_content_type();
-        self.clear_body();
+        self.status_code = ::std::option::Option::None;
+        self.status_message.clear();
+        self.cache_policy = ::std::option::Option::None;
+        self.ttl = ::std::option::Option::None;
+        self.etag.clear();
+        self.content_type.clear();
+        self.body.clear();
         self.unknown_fields.clear();
     }
 }
@@ -1178,6 +1207,13 @@ impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy {
 impl ::std::marker::Copy for MercuryReply_CachePolicy {
 }
 
+// Note, `Default` is implemented although default value is not 0
+impl ::std::default::Default for MercuryReply_CachePolicy {
+    fn default() -> Self {
+        MercuryReply_CachePolicy::CACHE_NO
+    }
+}
+
 impl ::protobuf::reflect::ProtobufValue for MercuryReply_CachePolicy {
     fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
         ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
@@ -1193,8 +1229,14 @@ pub struct Header {
     status_code: ::std::option::Option<i32>,
     user_fields: ::protobuf::RepeatedField<UserField>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a Header {
+    fn default() -> &'a Header {
+        <Header as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl Header {
@@ -1204,6 +1246,13 @@ impl Header {
 
     // optional string uri = 1;
 
+
+    pub fn get_uri(&self) -> &str {
+        match self.uri.as_ref() {
+            Some(v) => &v,
+            None => "",
+        }
+    }
     pub fn clear_uri(&mut self) {
         self.uri.clear();
     }
@@ -1231,15 +1280,15 @@ impl Header {
         self.uri.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_uri(&self) -> &str {
-        match self.uri.as_ref() {
+    // optional string content_type = 2;
+
+
+    pub fn get_content_type(&self) -> &str {
+        match self.content_type.as_ref() {
             Some(v) => &v,
             None => "",
         }
     }
-
-    // optional string content_type = 2;
-
     pub fn clear_content_type(&mut self) {
         self.content_type.clear();
     }
@@ -1267,15 +1316,15 @@ impl Header {
         self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_content_type(&self) -> &str {
-        match self.content_type.as_ref() {
+    // optional string method = 3;
+
+
+    pub fn get_method(&self) -> &str {
+        match self.method.as_ref() {
             Some(v) => &v,
             None => "",
         }
     }
-
-    // optional string method = 3;
-
     pub fn clear_method(&mut self) {
         self.method.clear();
     }
@@ -1303,15 +1352,12 @@ impl Header {
         self.method.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_method(&self) -> &str {
-        match self.method.as_ref() {
-            Some(v) => &v,
-            None => "",
-        }
-    }
-
     // optional sint32 status_code = 4;
 
+
+    pub fn get_status_code(&self) -> i32 {
+        self.status_code.unwrap_or(0)
+    }
     pub fn clear_status_code(&mut self) {
         self.status_code = ::std::option::Option::None;
     }
@@ -1325,12 +1371,12 @@ impl Header {
         self.status_code = ::std::option::Option::Some(v);
     }
 
-    pub fn get_status_code(&self) -> i32 {
-        self.status_code.unwrap_or(0)
-    }
-
     // repeated .UserField user_fields = 6;
 
+
+    pub fn get_user_fields(&self) -> &[UserField] {
+        &self.user_fields
+    }
     pub fn clear_user_fields(&mut self) {
         self.user_fields.clear();
     }
@@ -1349,10 +1395,6 @@ impl Header {
     pub fn take_user_fields(&mut self) -> ::protobuf::RepeatedField<UserField> {
         ::std::mem::replace(&mut self.user_fields, ::protobuf::RepeatedField::new())
     }
-
-    pub fn get_user_fields(&self) -> &[UserField] {
-        &self.user_fields
-    }
 }
 
 impl ::protobuf::Message for Header {
@@ -1528,11 +1570,11 @@ impl ::protobuf::Message for Header {
 
 impl ::protobuf::Clear for Header {
     fn clear(&mut self) {
-        self.clear_uri();
-        self.clear_content_type();
-        self.clear_method();
-        self.clear_status_code();
-        self.clear_user_fields();
+        self.uri.clear();
+        self.content_type.clear();
+        self.method.clear();
+        self.status_code = ::std::option::Option::None;
+        self.user_fields.clear();
         self.unknown_fields.clear();
     }
 }
@@ -1555,8 +1597,14 @@ pub struct UserField {
     key: ::protobuf::SingularField<::std::string::String>,
     value: ::protobuf::SingularField<::std::vec::Vec<u8>>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a UserField {
+    fn default() -> &'a UserField {
+        <UserField as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl UserField {
@@ -1566,6 +1614,13 @@ impl UserField {
 
     // optional string key = 1;
 
+
+    pub fn get_key(&self) -> &str {
+        match self.key.as_ref() {
+            Some(v) => &v,
+            None => "",
+        }
+    }
     pub fn clear_key(&mut self) {
         self.key.clear();
     }
@@ -1593,15 +1648,15 @@ impl UserField {
         self.key.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_key(&self) -> &str {
-        match self.key.as_ref() {
+    // optional bytes value = 2;
+
+
+    pub fn get_value(&self) -> &[u8] {
+        match self.value.as_ref() {
             Some(v) => &v,
-            None => "",
+            None => &[],
         }
     }
-
-    // optional bytes value = 2;
-
     pub fn clear_value(&mut self) {
         self.value.clear();
     }
@@ -1628,13 +1683,6 @@ impl UserField {
     pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
         self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
     }
-
-    pub fn get_value(&self) -> &[u8] {
-        match self.value.as_ref() {
-            Some(v) => &v,
-            None => &[],
-        }
-    }
 }
 
 impl ::protobuf::Message for UserField {
@@ -1756,8 +1804,8 @@ impl ::protobuf::Message for UserField {
 
 impl ::protobuf::Clear for UserField {
     fn clear(&mut self) {
-        self.clear_key();
-        self.clear_value();
+        self.key.clear();
+        self.value.clear();
         self.unknown_fields.clear();
     }
 }
@@ -1775,27 +1823,24 @@ impl ::protobuf::reflect::ProtobufValue for UserField {
 }
 
 static file_descriptor_proto_data: &'static [u8] = b"\
-    \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12$\n\x07request\
-    \x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\x02\x18\0\"8\n\x14MercuryMult\
-    iGetReply\x12\x20\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\x02\
-    \x18\0\"_\n\x0eMercuryRequest\x12\x0f\n\x03uri\x18\x01\x20\x01(\tB\x02\
-    \x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\x18\0\x12\x10\n\
-    \x04body\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04etag\x18\x04\x20\
-    \x01(\x0cB\x02\x18\0\"\x8d\x02\n\x0cMercuryReply\x12\x17\n\x0bstatus_cod\
-    e\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x1a\n\x0estatus_message\x18\x02\
-    \x20\x01(\tB\x02\x18\0\x123\n\x0ccache_policy\x18\x03\x20\x01(\x0e2\x19.\
-    MercuryReply.CachePolicyB\x02\x18\0\x12\x0f\n\x03ttl\x18\x04\x20\x01(\
-    \x11B\x02\x18\0\x12\x10\n\x04etag\x18\x05\x20\x01(\x0cB\x02\x18\0\x12\
-    \x18\n\x0ccontent_type\x18\x06\x20\x01(\tB\x02\x18\0\x12\x10\n\x04body\
-    \x18\x07\x20\x01(\x0cB\x02\x18\0\"D\n\x0bCachePolicy\x12\x0c\n\x08CACHE_\
-    NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\x10\x02\x12\x10\n\x0cCACHE_PUBLIC\
-    \x10\x03\x1a\x02\x10\0\"\x85\x01\n\x06Header\x12\x0f\n\x03uri\x18\x01\
-    \x20\x01(\tB\x02\x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\
-    \x18\0\x12\x12\n\x06method\x18\x03\x20\x01(\tB\x02\x18\0\x12\x17\n\x0bst\
-    atus_code\x18\x04\x20\x01(\x11B\x02\x18\0\x12#\n\x0buser_fields\x18\x06\
-    \x20\x03(\x0b2\n.UserFieldB\x02\x18\0\"/\n\tUserField\x12\x0f\n\x03key\
-    \x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\x0cB\
-    \x02\x18\0B\0b\x06proto2\
+    \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12\"\n\x07reques\
+    t\x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\0:\0\"8\n\x14MercuryMultiGet\
+    Reply\x12\x1e\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\0:\0\"Y\n\
+    \x0eMercuryRequest\x12\r\n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccon\
+    tent_type\x18\x02\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x03\x20\x01(\x0cB\
+    \0\x12\x0e\n\x04etag\x18\x04\x20\x01(\x0cB\0:\0\"\xff\x01\n\x0cMercuryRe\
+    ply\x12\x15\n\x0bstatus_code\x18\x01\x20\x01(\x11B\0\x12\x18\n\x0estatus\
+    _message\x18\x02\x20\x01(\tB\0\x121\n\x0ccache_policy\x18\x03\x20\x01(\
+    \x0e2\x19.MercuryReply.CachePolicyB\0\x12\r\n\x03ttl\x18\x04\x20\x01(\
+    \x11B\0\x12\x0e\n\x04etag\x18\x05\x20\x01(\x0cB\0\x12\x16\n\x0ccontent_t\
+    ype\x18\x06\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x07\x20\x01(\x0cB\0\"B\n\
+    \x0bCachePolicy\x12\x0c\n\x08CACHE_NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\
+    \x10\x02\x12\x10\n\x0cCACHE_PUBLIC\x10\x03\x1a\0:\0\"}\n\x06Header\x12\r\
+    \n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccontent_type\x18\x02\x20\
+    \x01(\tB\0\x12\x10\n\x06method\x18\x03\x20\x01(\tB\0\x12\x15\n\x0bstatus\
+    _code\x18\x04\x20\x01(\x11B\0\x12!\n\x0buser_fields\x18\x06\x20\x03(\x0b\
+    2\n.UserFieldB\0:\0\"-\n\tUserField\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\
+    \x12\x0f\n\x05value\x18\x02\x20\x01(\x0cB\0:\0B\0b\x06proto2\
 ";
 
 static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {

Diferenças do arquivo suprimidas por serem muito extensas
+ 272 - 227
protocol/src/metadata.rs


+ 36 - 26
protocol/src/pubsub.rs

@@ -1,9 +1,9 @@
-// This file is generated by rust-protobuf 2.0.5. Do not edit
+// This file is generated by rust-protobuf 2.7.0. Do not edit
 // @generated
 
 // https://github.com/Manishearth/rust-clippy/issues/702
 #![allow(unknown_lints)]
-#![allow(clippy)]
+#![allow(clippy::all)]
 
 #![cfg_attr(rustfmt, rustfmt_skip)]
 
@@ -17,10 +17,15 @@
 #![allow(unsafe_code)]
 #![allow(unused_imports)]
 #![allow(unused_results)]
+//! Generated file from `pubsub.proto`
 
 use protobuf::Message as Message_imported_for_functions;
 use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
 
+/// Generated files are compatible only with the same version
+/// of protobuf runtime.
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
+
 #[derive(PartialEq,Clone,Default)]
 pub struct Subscription {
     // message fields
@@ -28,8 +33,14 @@ pub struct Subscription {
     expiry: ::std::option::Option<i32>,
     status_code: ::std::option::Option<i32>,
     // special fields
-    unknown_fields: ::protobuf::UnknownFields,
-    cached_size: ::protobuf::CachedSize,
+    pub unknown_fields: ::protobuf::UnknownFields,
+    pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a Subscription {
+    fn default() -> &'a Subscription {
+        <Subscription as ::protobuf::Message>::default_instance()
+    }
 }
 
 impl Subscription {
@@ -39,6 +50,13 @@ impl Subscription {
 
     // optional string uri = 1;
 
+
+    pub fn get_uri(&self) -> &str {
+        match self.uri.as_ref() {
+            Some(v) => &v,
+            None => "",
+        }
+    }
     pub fn clear_uri(&mut self) {
         self.uri.clear();
     }
@@ -66,15 +84,12 @@ impl Subscription {
         self.uri.take().unwrap_or_else(|| ::std::string::String::new())
     }
 
-    pub fn get_uri(&self) -> &str {
-        match self.uri.as_ref() {
-            Some(v) => &v,
-            None => "",
-        }
-    }
-
     // optional int32 expiry = 2;
 
+
+    pub fn get_expiry(&self) -> i32 {
+        self.expiry.unwrap_or(0)
+    }
     pub fn clear_expiry(&mut self) {
         self.expiry = ::std::option::Option::None;
     }
@@ -88,12 +103,12 @@ impl Subscription {
         self.expiry = ::std::option::Option::Some(v);
     }
 
-    pub fn get_expiry(&self) -> i32 {
-        self.expiry.unwrap_or(0)
-    }
-
     // optional int32 status_code = 3;
 
+
+    pub fn get_status_code(&self) -> i32 {
+        self.status_code.unwrap_or(0)
+    }
     pub fn clear_status_code(&mut self) {
         self.status_code = ::std::option::Option::None;
     }
@@ -106,10 +121,6 @@ impl Subscription {
     pub fn set_status_code(&mut self, v: i32) {
         self.status_code = ::std::option::Option::Some(v);
     }
-
-    pub fn get_status_code(&self) -> i32 {
-        self.status_code.unwrap_or(0)
-    }
 }
 
 impl ::protobuf::Message for Subscription {
@@ -253,9 +264,9 @@ impl ::protobuf::Message for Subscription {
 
 impl ::protobuf::Clear for Subscription {
     fn clear(&mut self) {
-        self.clear_uri();
-        self.clear_expiry();
-        self.clear_status_code();
+        self.uri.clear();
+        self.expiry = ::std::option::Option::None;
+        self.status_code = ::std::option::Option::None;
         self.unknown_fields.clear();
     }
 }
@@ -273,10 +284,9 @@ impl ::protobuf::reflect::ProtobufValue for Subscription {
 }
 
 static file_descriptor_proto_data: &'static [u8] = b"\
-    \n\x0cpubsub.proto\x12\0\"L\n\x0cSubscription\x12\x0f\n\x03uri\x18\x01\
-    \x20\x01(\tB\x02\x18\0\x12\x12\n\x06expiry\x18\x02\x20\x01(\x05B\x02\x18\
-    \0\x12\x17\n\x0bstatus_code\x18\x03\x20\x01(\x05B\x02\x18\0B\0b\x06proto\
-    2\
+    \n\x0cpubsub.proto\x12\0\"H\n\x0cSubscription\x12\r\n\x03uri\x18\x01\x20\
+    \x01(\tB\0\x12\x10\n\x06expiry\x18\x02\x20\x01(\x05B\0\x12\x15\n\x0bstat\
+    us_code\x18\x03\x20\x01(\x05B\0:\0B\0b\x06proto2\
 ";
 
 static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {

Diferenças do arquivo suprimidas por serem muito extensas
+ 282 - 243
protocol/src/spirc.rs


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff