|
|
@@ -27,9 +27,514 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
|
27
|
27
|
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_2;
|
|
28
|
28
|
|
|
29
|
29
|
#[derive(PartialEq,Clone,Default)]
|
|
30
|
|
-pub struct Message {
|
|
|
30
|
+pub struct RegisterPeer {
|
|
|
31
|
+ // message fields
|
|
|
32
|
+ pub hbb_addr: ::std::string::String,
|
|
|
33
|
+ // special fields
|
|
|
34
|
+ pub unknown_fields: ::protobuf::UnknownFields,
|
|
|
35
|
+ pub cached_size: ::protobuf::CachedSize,
|
|
|
36
|
+}
|
|
|
37
|
+
|
|
|
38
|
+impl<'a> ::std::default::Default for &'a RegisterPeer {
|
|
|
39
|
+ fn default() -> &'a RegisterPeer {
|
|
|
40
|
+ <RegisterPeer as ::protobuf::Message>::default_instance()
|
|
|
41
|
+ }
|
|
|
42
|
+}
|
|
|
43
|
+
|
|
|
44
|
+impl RegisterPeer {
|
|
|
45
|
+ pub fn new() -> RegisterPeer {
|
|
|
46
|
+ ::std::default::Default::default()
|
|
|
47
|
+ }
|
|
|
48
|
+
|
|
|
49
|
+ // string hbb_addr = 1;
|
|
|
50
|
+
|
|
|
51
|
+
|
|
|
52
|
+ pub fn get_hbb_addr(&self) -> &str {
|
|
|
53
|
+ &self.hbb_addr
|
|
|
54
|
+ }
|
|
|
55
|
+ pub fn clear_hbb_addr(&mut self) {
|
|
|
56
|
+ self.hbb_addr.clear();
|
|
|
57
|
+ }
|
|
|
58
|
+
|
|
|
59
|
+ // Param is passed by value, moved
|
|
|
60
|
+ pub fn set_hbb_addr(&mut self, v: ::std::string::String) {
|
|
|
61
|
+ self.hbb_addr = v;
|
|
|
62
|
+ }
|
|
|
63
|
+
|
|
|
64
|
+ // Mutable pointer to the field.
|
|
|
65
|
+ // If field is not initialized, it is initialized with default value first.
|
|
|
66
|
+ pub fn mut_hbb_addr(&mut self) -> &mut ::std::string::String {
|
|
|
67
|
+ &mut self.hbb_addr
|
|
|
68
|
+ }
|
|
|
69
|
+
|
|
|
70
|
+ // Take field
|
|
|
71
|
+ pub fn take_hbb_addr(&mut self) -> ::std::string::String {
|
|
|
72
|
+ ::std::mem::replace(&mut self.hbb_addr, ::std::string::String::new())
|
|
|
73
|
+ }
|
|
|
74
|
+}
|
|
|
75
|
+
|
|
|
76
|
+impl ::protobuf::Message for RegisterPeer {
|
|
|
77
|
+ fn is_initialized(&self) -> bool {
|
|
|
78
|
+ true
|
|
|
79
|
+ }
|
|
|
80
|
+
|
|
|
81
|
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
|
82
|
+ while !is.eof()? {
|
|
|
83
|
+ let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
|
84
|
+ match field_number {
|
|
|
85
|
+ 1 => {
|
|
|
86
|
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hbb_addr)?;
|
|
|
87
|
+ },
|
|
|
88
|
+ _ => {
|
|
|
89
|
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
|
90
|
+ },
|
|
|
91
|
+ };
|
|
|
92
|
+ }
|
|
|
93
|
+ ::std::result::Result::Ok(())
|
|
|
94
|
+ }
|
|
|
95
|
+
|
|
|
96
|
+ // Compute sizes of nested messages
|
|
|
97
|
+ #[allow(unused_variables)]
|
|
|
98
|
+ fn compute_size(&self) -> u32 {
|
|
|
99
|
+ let mut my_size = 0;
|
|
|
100
|
+ if !self.hbb_addr.is_empty() {
|
|
|
101
|
+ my_size += ::protobuf::rt::string_size(1, &self.hbb_addr);
|
|
|
102
|
+ }
|
|
|
103
|
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
|
|
104
|
+ self.cached_size.set(my_size);
|
|
|
105
|
+ my_size
|
|
|
106
|
+ }
|
|
|
107
|
+
|
|
|
108
|
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
|
109
|
+ if !self.hbb_addr.is_empty() {
|
|
|
110
|
+ os.write_string(1, &self.hbb_addr)?;
|
|
|
111
|
+ }
|
|
|
112
|
+ os.write_unknown_fields(self.get_unknown_fields())?;
|
|
|
113
|
+ ::std::result::Result::Ok(())
|
|
|
114
|
+ }
|
|
|
115
|
+
|
|
|
116
|
+ fn get_cached_size(&self) -> u32 {
|
|
|
117
|
+ self.cached_size.get()
|
|
|
118
|
+ }
|
|
|
119
|
+
|
|
|
120
|
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
|
|
121
|
+ &self.unknown_fields
|
|
|
122
|
+ }
|
|
|
123
|
+
|
|
|
124
|
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
|
|
125
|
+ &mut self.unknown_fields
|
|
|
126
|
+ }
|
|
|
127
|
+
|
|
|
128
|
+ fn as_any(&self) -> &dyn (::std::any::Any) {
|
|
|
129
|
+ self as &dyn (::std::any::Any)
|
|
|
130
|
+ }
|
|
|
131
|
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
|
|
132
|
+ self as &mut dyn (::std::any::Any)
|
|
|
133
|
+ }
|
|
|
134
|
+ fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
|
|
135
|
+ self
|
|
|
136
|
+ }
|
|
|
137
|
+
|
|
|
138
|
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
|
139
|
+ Self::descriptor_static()
|
|
|
140
|
+ }
|
|
|
141
|
+
|
|
|
142
|
+ fn new() -> RegisterPeer {
|
|
|
143
|
+ RegisterPeer::new()
|
|
|
144
|
+ }
|
|
|
145
|
+
|
|
|
146
|
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
|
147
|
+ static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
|
|
148
|
+ lock: ::protobuf::lazy::ONCE_INIT,
|
|
|
149
|
+ ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
|
|
150
|
+ };
|
|
|
151
|
+ unsafe {
|
|
|
152
|
+ descriptor.get(|| {
|
|
|
153
|
+ let mut fields = ::std::vec::Vec::new();
|
|
|
154
|
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
|
|
155
|
+ "hbb_addr",
|
|
|
156
|
+ |m: &RegisterPeer| { &m.hbb_addr },
|
|
|
157
|
+ |m: &mut RegisterPeer| { &mut m.hbb_addr },
|
|
|
158
|
+ ));
|
|
|
159
|
+ ::protobuf::reflect::MessageDescriptor::new::<RegisterPeer>(
|
|
|
160
|
+ "RegisterPeer",
|
|
|
161
|
+ fields,
|
|
|
162
|
+ file_descriptor_proto()
|
|
|
163
|
+ )
|
|
|
164
|
+ })
|
|
|
165
|
+ }
|
|
|
166
|
+ }
|
|
|
167
|
+
|
|
|
168
|
+ fn default_instance() -> &'static RegisterPeer {
|
|
|
169
|
+ static mut instance: ::protobuf::lazy::Lazy<RegisterPeer> = ::protobuf::lazy::Lazy {
|
|
|
170
|
+ lock: ::protobuf::lazy::ONCE_INIT,
|
|
|
171
|
+ ptr: 0 as *const RegisterPeer,
|
|
|
172
|
+ };
|
|
|
173
|
+ unsafe {
|
|
|
174
|
+ instance.get(RegisterPeer::new)
|
|
|
175
|
+ }
|
|
|
176
|
+ }
|
|
|
177
|
+}
|
|
|
178
|
+
|
|
|
179
|
+impl ::protobuf::Clear for RegisterPeer {
|
|
|
180
|
+ fn clear(&mut self) {
|
|
|
181
|
+ self.hbb_addr.clear();
|
|
|
182
|
+ self.unknown_fields.clear();
|
|
|
183
|
+ }
|
|
|
184
|
+}
|
|
|
185
|
+
|
|
|
186
|
+impl ::std::fmt::Debug for RegisterPeer {
|
|
|
187
|
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
|
|
188
|
+ ::protobuf::text_format::fmt(self, f)
|
|
|
189
|
+ }
|
|
|
190
|
+}
|
|
|
191
|
+
|
|
|
192
|
+impl ::protobuf::reflect::ProtobufValue for RegisterPeer {
|
|
|
193
|
+ fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
|
194
|
+ ::protobuf::reflect::ProtobufValueRef::Message(self)
|
|
|
195
|
+ }
|
|
|
196
|
+}
|
|
|
197
|
+
|
|
|
198
|
+#[derive(PartialEq,Clone,Default)]
|
|
|
199
|
+pub struct PeekPeer {
|
|
31
|
200
|
// message fields
|
|
32
|
|
- pub addr: ::std::string::String,
|
|
|
201
|
+ pub hbb_addr: ::std::string::String,
|
|
|
202
|
+ // special fields
|
|
|
203
|
+ pub unknown_fields: ::protobuf::UnknownFields,
|
|
|
204
|
+ pub cached_size: ::protobuf::CachedSize,
|
|
|
205
|
+}
|
|
|
206
|
+
|
|
|
207
|
+impl<'a> ::std::default::Default for &'a PeekPeer {
|
|
|
208
|
+ fn default() -> &'a PeekPeer {
|
|
|
209
|
+ <PeekPeer as ::protobuf::Message>::default_instance()
|
|
|
210
|
+ }
|
|
|
211
|
+}
|
|
|
212
|
+
|
|
|
213
|
+impl PeekPeer {
|
|
|
214
|
+ pub fn new() -> PeekPeer {
|
|
|
215
|
+ ::std::default::Default::default()
|
|
|
216
|
+ }
|
|
|
217
|
+
|
|
|
218
|
+ // string hbb_addr = 1;
|
|
|
219
|
+
|
|
|
220
|
+
|
|
|
221
|
+ pub fn get_hbb_addr(&self) -> &str {
|
|
|
222
|
+ &self.hbb_addr
|
|
|
223
|
+ }
|
|
|
224
|
+ pub fn clear_hbb_addr(&mut self) {
|
|
|
225
|
+ self.hbb_addr.clear();
|
|
|
226
|
+ }
|
|
|
227
|
+
|
|
|
228
|
+ // Param is passed by value, moved
|
|
|
229
|
+ pub fn set_hbb_addr(&mut self, v: ::std::string::String) {
|
|
|
230
|
+ self.hbb_addr = v;
|
|
|
231
|
+ }
|
|
|
232
|
+
|
|
|
233
|
+ // Mutable pointer to the field.
|
|
|
234
|
+ // If field is not initialized, it is initialized with default value first.
|
|
|
235
|
+ pub fn mut_hbb_addr(&mut self) -> &mut ::std::string::String {
|
|
|
236
|
+ &mut self.hbb_addr
|
|
|
237
|
+ }
|
|
|
238
|
+
|
|
|
239
|
+ // Take field
|
|
|
240
|
+ pub fn take_hbb_addr(&mut self) -> ::std::string::String {
|
|
|
241
|
+ ::std::mem::replace(&mut self.hbb_addr, ::std::string::String::new())
|
|
|
242
|
+ }
|
|
|
243
|
+}
|
|
|
244
|
+
|
|
|
245
|
+impl ::protobuf::Message for PeekPeer {
|
|
|
246
|
+ fn is_initialized(&self) -> bool {
|
|
|
247
|
+ true
|
|
|
248
|
+ }
|
|
|
249
|
+
|
|
|
250
|
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
|
251
|
+ while !is.eof()? {
|
|
|
252
|
+ let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
|
253
|
+ match field_number {
|
|
|
254
|
+ 1 => {
|
|
|
255
|
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hbb_addr)?;
|
|
|
256
|
+ },
|
|
|
257
|
+ _ => {
|
|
|
258
|
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
|
259
|
+ },
|
|
|
260
|
+ };
|
|
|
261
|
+ }
|
|
|
262
|
+ ::std::result::Result::Ok(())
|
|
|
263
|
+ }
|
|
|
264
|
+
|
|
|
265
|
+ // Compute sizes of nested messages
|
|
|
266
|
+ #[allow(unused_variables)]
|
|
|
267
|
+ fn compute_size(&self) -> u32 {
|
|
|
268
|
+ let mut my_size = 0;
|
|
|
269
|
+ if !self.hbb_addr.is_empty() {
|
|
|
270
|
+ my_size += ::protobuf::rt::string_size(1, &self.hbb_addr);
|
|
|
271
|
+ }
|
|
|
272
|
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
|
|
273
|
+ self.cached_size.set(my_size);
|
|
|
274
|
+ my_size
|
|
|
275
|
+ }
|
|
|
276
|
+
|
|
|
277
|
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
|
278
|
+ if !self.hbb_addr.is_empty() {
|
|
|
279
|
+ os.write_string(1, &self.hbb_addr)?;
|
|
|
280
|
+ }
|
|
|
281
|
+ os.write_unknown_fields(self.get_unknown_fields())?;
|
|
|
282
|
+ ::std::result::Result::Ok(())
|
|
|
283
|
+ }
|
|
|
284
|
+
|
|
|
285
|
+ fn get_cached_size(&self) -> u32 {
|
|
|
286
|
+ self.cached_size.get()
|
|
|
287
|
+ }
|
|
|
288
|
+
|
|
|
289
|
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
|
|
290
|
+ &self.unknown_fields
|
|
|
291
|
+ }
|
|
|
292
|
+
|
|
|
293
|
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
|
|
294
|
+ &mut self.unknown_fields
|
|
|
295
|
+ }
|
|
|
296
|
+
|
|
|
297
|
+ fn as_any(&self) -> &dyn (::std::any::Any) {
|
|
|
298
|
+ self as &dyn (::std::any::Any)
|
|
|
299
|
+ }
|
|
|
300
|
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
|
|
301
|
+ self as &mut dyn (::std::any::Any)
|
|
|
302
|
+ }
|
|
|
303
|
+ fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
|
|
304
|
+ self
|
|
|
305
|
+ }
|
|
|
306
|
+
|
|
|
307
|
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
|
308
|
+ Self::descriptor_static()
|
|
|
309
|
+ }
|
|
|
310
|
+
|
|
|
311
|
+ fn new() -> PeekPeer {
|
|
|
312
|
+ PeekPeer::new()
|
|
|
313
|
+ }
|
|
|
314
|
+
|
|
|
315
|
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
|
316
|
+ static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
|
|
317
|
+ lock: ::protobuf::lazy::ONCE_INIT,
|
|
|
318
|
+ ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
|
|
319
|
+ };
|
|
|
320
|
+ unsafe {
|
|
|
321
|
+ descriptor.get(|| {
|
|
|
322
|
+ let mut fields = ::std::vec::Vec::new();
|
|
|
323
|
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
|
|
324
|
+ "hbb_addr",
|
|
|
325
|
+ |m: &PeekPeer| { &m.hbb_addr },
|
|
|
326
|
+ |m: &mut PeekPeer| { &mut m.hbb_addr },
|
|
|
327
|
+ ));
|
|
|
328
|
+ ::protobuf::reflect::MessageDescriptor::new::<PeekPeer>(
|
|
|
329
|
+ "PeekPeer",
|
|
|
330
|
+ fields,
|
|
|
331
|
+ file_descriptor_proto()
|
|
|
332
|
+ )
|
|
|
333
|
+ })
|
|
|
334
|
+ }
|
|
|
335
|
+ }
|
|
|
336
|
+
|
|
|
337
|
+ fn default_instance() -> &'static PeekPeer {
|
|
|
338
|
+ static mut instance: ::protobuf::lazy::Lazy<PeekPeer> = ::protobuf::lazy::Lazy {
|
|
|
339
|
+ lock: ::protobuf::lazy::ONCE_INIT,
|
|
|
340
|
+ ptr: 0 as *const PeekPeer,
|
|
|
341
|
+ };
|
|
|
342
|
+ unsafe {
|
|
|
343
|
+ instance.get(PeekPeer::new)
|
|
|
344
|
+ }
|
|
|
345
|
+ }
|
|
|
346
|
+}
|
|
|
347
|
+
|
|
|
348
|
+impl ::protobuf::Clear for PeekPeer {
|
|
|
349
|
+ fn clear(&mut self) {
|
|
|
350
|
+ self.hbb_addr.clear();
|
|
|
351
|
+ self.unknown_fields.clear();
|
|
|
352
|
+ }
|
|
|
353
|
+}
|
|
|
354
|
+
|
|
|
355
|
+impl ::std::fmt::Debug for PeekPeer {
|
|
|
356
|
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
|
|
357
|
+ ::protobuf::text_format::fmt(self, f)
|
|
|
358
|
+ }
|
|
|
359
|
+}
|
|
|
360
|
+
|
|
|
361
|
+impl ::protobuf::reflect::ProtobufValue for PeekPeer {
|
|
|
362
|
+ fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
|
363
|
+ ::protobuf::reflect::ProtobufValueRef::Message(self)
|
|
|
364
|
+ }
|
|
|
365
|
+}
|
|
|
366
|
+
|
|
|
367
|
+#[derive(PartialEq,Clone,Default)]
|
|
|
368
|
+pub struct PeekPeerResponse {
|
|
|
369
|
+ // message fields
|
|
|
370
|
+ pub socket_addr: ::std::vec::Vec<u8>,
|
|
|
371
|
+ // special fields
|
|
|
372
|
+ pub unknown_fields: ::protobuf::UnknownFields,
|
|
|
373
|
+ pub cached_size: ::protobuf::CachedSize,
|
|
|
374
|
+}
|
|
|
375
|
+
|
|
|
376
|
+impl<'a> ::std::default::Default for &'a PeekPeerResponse {
|
|
|
377
|
+ fn default() -> &'a PeekPeerResponse {
|
|
|
378
|
+ <PeekPeerResponse as ::protobuf::Message>::default_instance()
|
|
|
379
|
+ }
|
|
|
380
|
+}
|
|
|
381
|
+
|
|
|
382
|
+impl PeekPeerResponse {
|
|
|
383
|
+ pub fn new() -> PeekPeerResponse {
|
|
|
384
|
+ ::std::default::Default::default()
|
|
|
385
|
+ }
|
|
|
386
|
+
|
|
|
387
|
+ // bytes socket_addr = 1;
|
|
|
388
|
+
|
|
|
389
|
+
|
|
|
390
|
+ pub fn get_socket_addr(&self) -> &[u8] {
|
|
|
391
|
+ &self.socket_addr
|
|
|
392
|
+ }
|
|
|
393
|
+ pub fn clear_socket_addr(&mut self) {
|
|
|
394
|
+ self.socket_addr.clear();
|
|
|
395
|
+ }
|
|
|
396
|
+
|
|
|
397
|
+ // Param is passed by value, moved
|
|
|
398
|
+ pub fn set_socket_addr(&mut self, v: ::std::vec::Vec<u8>) {
|
|
|
399
|
+ self.socket_addr = v;
|
|
|
400
|
+ }
|
|
|
401
|
+
|
|
|
402
|
+ // Mutable pointer to the field.
|
|
|
403
|
+ // If field is not initialized, it is initialized with default value first.
|
|
|
404
|
+ pub fn mut_socket_addr(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
|
405
|
+ &mut self.socket_addr
|
|
|
406
|
+ }
|
|
|
407
|
+
|
|
|
408
|
+ // Take field
|
|
|
409
|
+ pub fn take_socket_addr(&mut self) -> ::std::vec::Vec<u8> {
|
|
|
410
|
+ ::std::mem::replace(&mut self.socket_addr, ::std::vec::Vec::new())
|
|
|
411
|
+ }
|
|
|
412
|
+}
|
|
|
413
|
+
|
|
|
414
|
+impl ::protobuf::Message for PeekPeerResponse {
|
|
|
415
|
+ fn is_initialized(&self) -> bool {
|
|
|
416
|
+ true
|
|
|
417
|
+ }
|
|
|
418
|
+
|
|
|
419
|
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
|
420
|
+ while !is.eof()? {
|
|
|
421
|
+ let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
|
422
|
+ match field_number {
|
|
|
423
|
+ 1 => {
|
|
|
424
|
+ ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.socket_addr)?;
|
|
|
425
|
+ },
|
|
|
426
|
+ _ => {
|
|
|
427
|
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
|
428
|
+ },
|
|
|
429
|
+ };
|
|
|
430
|
+ }
|
|
|
431
|
+ ::std::result::Result::Ok(())
|
|
|
432
|
+ }
|
|
|
433
|
+
|
|
|
434
|
+ // Compute sizes of nested messages
|
|
|
435
|
+ #[allow(unused_variables)]
|
|
|
436
|
+ fn compute_size(&self) -> u32 {
|
|
|
437
|
+ let mut my_size = 0;
|
|
|
438
|
+ if !self.socket_addr.is_empty() {
|
|
|
439
|
+ my_size += ::protobuf::rt::bytes_size(1, &self.socket_addr);
|
|
|
440
|
+ }
|
|
|
441
|
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
|
|
442
|
+ self.cached_size.set(my_size);
|
|
|
443
|
+ my_size
|
|
|
444
|
+ }
|
|
|
445
|
+
|
|
|
446
|
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
|
447
|
+ if !self.socket_addr.is_empty() {
|
|
|
448
|
+ os.write_bytes(1, &self.socket_addr)?;
|
|
|
449
|
+ }
|
|
|
450
|
+ os.write_unknown_fields(self.get_unknown_fields())?;
|
|
|
451
|
+ ::std::result::Result::Ok(())
|
|
|
452
|
+ }
|
|
|
453
|
+
|
|
|
454
|
+ fn get_cached_size(&self) -> u32 {
|
|
|
455
|
+ self.cached_size.get()
|
|
|
456
|
+ }
|
|
|
457
|
+
|
|
|
458
|
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
|
|
459
|
+ &self.unknown_fields
|
|
|
460
|
+ }
|
|
|
461
|
+
|
|
|
462
|
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
|
|
463
|
+ &mut self.unknown_fields
|
|
|
464
|
+ }
|
|
|
465
|
+
|
|
|
466
|
+ fn as_any(&self) -> &dyn (::std::any::Any) {
|
|
|
467
|
+ self as &dyn (::std::any::Any)
|
|
|
468
|
+ }
|
|
|
469
|
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
|
|
470
|
+ self as &mut dyn (::std::any::Any)
|
|
|
471
|
+ }
|
|
|
472
|
+ fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
|
|
473
|
+ self
|
|
|
474
|
+ }
|
|
|
475
|
+
|
|
|
476
|
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
|
477
|
+ Self::descriptor_static()
|
|
|
478
|
+ }
|
|
|
479
|
+
|
|
|
480
|
+ fn new() -> PeekPeerResponse {
|
|
|
481
|
+ PeekPeerResponse::new()
|
|
|
482
|
+ }
|
|
|
483
|
+
|
|
|
484
|
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
|
485
|
+ static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
|
|
486
|
+ lock: ::protobuf::lazy::ONCE_INIT,
|
|
|
487
|
+ ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
|
|
488
|
+ };
|
|
|
489
|
+ unsafe {
|
|
|
490
|
+ descriptor.get(|| {
|
|
|
491
|
+ let mut fields = ::std::vec::Vec::new();
|
|
|
492
|
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
|
493
|
+ "socket_addr",
|
|
|
494
|
+ |m: &PeekPeerResponse| { &m.socket_addr },
|
|
|
495
|
+ |m: &mut PeekPeerResponse| { &mut m.socket_addr },
|
|
|
496
|
+ ));
|
|
|
497
|
+ ::protobuf::reflect::MessageDescriptor::new::<PeekPeerResponse>(
|
|
|
498
|
+ "PeekPeerResponse",
|
|
|
499
|
+ fields,
|
|
|
500
|
+ file_descriptor_proto()
|
|
|
501
|
+ )
|
|
|
502
|
+ })
|
|
|
503
|
+ }
|
|
|
504
|
+ }
|
|
|
505
|
+
|
|
|
506
|
+ fn default_instance() -> &'static PeekPeerResponse {
|
|
|
507
|
+ static mut instance: ::protobuf::lazy::Lazy<PeekPeerResponse> = ::protobuf::lazy::Lazy {
|
|
|
508
|
+ lock: ::protobuf::lazy::ONCE_INIT,
|
|
|
509
|
+ ptr: 0 as *const PeekPeerResponse,
|
|
|
510
|
+ };
|
|
|
511
|
+ unsafe {
|
|
|
512
|
+ instance.get(PeekPeerResponse::new)
|
|
|
513
|
+ }
|
|
|
514
|
+ }
|
|
|
515
|
+}
|
|
|
516
|
+
|
|
|
517
|
+impl ::protobuf::Clear for PeekPeerResponse {
|
|
|
518
|
+ fn clear(&mut self) {
|
|
|
519
|
+ self.socket_addr.clear();
|
|
|
520
|
+ self.unknown_fields.clear();
|
|
|
521
|
+ }
|
|
|
522
|
+}
|
|
|
523
|
+
|
|
|
524
|
+impl ::std::fmt::Debug for PeekPeerResponse {
|
|
|
525
|
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
|
|
526
|
+ ::protobuf::text_format::fmt(self, f)
|
|
|
527
|
+ }
|
|
|
528
|
+}
|
|
|
529
|
+
|
|
|
530
|
+impl ::protobuf::reflect::ProtobufValue for PeekPeerResponse {
|
|
|
531
|
+ fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
|
532
|
+ ::protobuf::reflect::ProtobufValueRef::Message(self)
|
|
|
533
|
+ }
|
|
|
534
|
+}
|
|
|
535
|
+
|
|
|
536
|
+#[derive(PartialEq,Clone,Default)]
|
|
|
537
|
+pub struct Message {
|
|
33
|
538
|
// message oneof groups
|
|
34
|
539
|
pub union: ::std::option::Option<Message_oneof_union>,
|
|
35
|
540
|
// special fields
|
|
|
@@ -45,7 +550,9 @@ impl<'a> ::std::default::Default for &'a Message {
|
|
45
|
550
|
|
|
46
|
551
|
#[derive(Clone,PartialEq,Debug)]
|
|
47
|
552
|
pub enum Message_oneof_union {
|
|
48
|
|
- socket_addr(::std::vec::Vec<u8>),
|
|
|
553
|
+ register_peer(RegisterPeer),
|
|
|
554
|
+ peek_peer(PeekPeer),
|
|
|
555
|
+ peek_peer_response(PeekPeerResponse),
|
|
49
|
556
|
}
|
|
50
|
557
|
|
|
51
|
558
|
impl Message {
|
|
|
@@ -53,84 +560,171 @@ impl Message {
|
|
53
|
560
|
::std::default::Default::default()
|
|
54
|
561
|
}
|
|
55
|
562
|
|
|
56
|
|
- // string addr = 1;
|
|
|
563
|
+ // .hbb.RegisterPeer register_peer = 6;
|
|
57
|
564
|
|
|
58
|
565
|
|
|
59
|
|
- pub fn get_addr(&self) -> &str {
|
|
60
|
|
- &self.addr
|
|
|
566
|
+ pub fn get_register_peer(&self) -> &RegisterPeer {
|
|
|
567
|
+ match self.union {
|
|
|
568
|
+ ::std::option::Option::Some(Message_oneof_union::register_peer(ref v)) => v,
|
|
|
569
|
+ _ => RegisterPeer::default_instance(),
|
|
|
570
|
+ }
|
|
61
|
571
|
}
|
|
62
|
|
- pub fn clear_addr(&mut self) {
|
|
63
|
|
- self.addr.clear();
|
|
|
572
|
+ pub fn clear_register_peer(&mut self) {
|
|
|
573
|
+ self.union = ::std::option::Option::None;
|
|
|
574
|
+ }
|
|
|
575
|
+
|
|
|
576
|
+ pub fn has_register_peer(&self) -> bool {
|
|
|
577
|
+ match self.union {
|
|
|
578
|
+ ::std::option::Option::Some(Message_oneof_union::register_peer(..)) => true,
|
|
|
579
|
+ _ => false,
|
|
|
580
|
+ }
|
|
64
|
581
|
}
|
|
65
|
582
|
|
|
66
|
583
|
// Param is passed by value, moved
|
|
67
|
|
- pub fn set_addr(&mut self, v: ::std::string::String) {
|
|
68
|
|
- self.addr = v;
|
|
|
584
|
+ pub fn set_register_peer(&mut self, v: RegisterPeer) {
|
|
|
585
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::register_peer(v))
|
|
69
|
586
|
}
|
|
70
|
587
|
|
|
71
|
588
|
// Mutable pointer to the field.
|
|
72
|
|
- // If field is not initialized, it is initialized with default value first.
|
|
73
|
|
- pub fn mut_addr(&mut self) -> &mut ::std::string::String {
|
|
74
|
|
- &mut self.addr
|
|
|
589
|
+ pub fn mut_register_peer(&mut self) -> &mut RegisterPeer {
|
|
|
590
|
+ if let ::std::option::Option::Some(Message_oneof_union::register_peer(_)) = self.union {
|
|
|
591
|
+ } else {
|
|
|
592
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::register_peer(RegisterPeer::new()));
|
|
|
593
|
+ }
|
|
|
594
|
+ match self.union {
|
|
|
595
|
+ ::std::option::Option::Some(Message_oneof_union::register_peer(ref mut v)) => v,
|
|
|
596
|
+ _ => panic!(),
|
|
|
597
|
+ }
|
|
75
|
598
|
}
|
|
76
|
599
|
|
|
77
|
600
|
// Take field
|
|
78
|
|
- pub fn take_addr(&mut self) -> ::std::string::String {
|
|
79
|
|
- ::std::mem::replace(&mut self.addr, ::std::string::String::new())
|
|
|
601
|
+ pub fn take_register_peer(&mut self) -> RegisterPeer {
|
|
|
602
|
+ if self.has_register_peer() {
|
|
|
603
|
+ match self.union.take() {
|
|
|
604
|
+ ::std::option::Option::Some(Message_oneof_union::register_peer(v)) => v,
|
|
|
605
|
+ _ => panic!(),
|
|
|
606
|
+ }
|
|
|
607
|
+ } else {
|
|
|
608
|
+ RegisterPeer::new()
|
|
|
609
|
+ }
|
|
80
|
610
|
}
|
|
81
|
611
|
|
|
82
|
|
- // bytes socket_addr = 6;
|
|
|
612
|
+ // .hbb.PeekPeer peek_peer = 7;
|
|
83
|
613
|
|
|
84
|
614
|
|
|
85
|
|
- pub fn get_socket_addr(&self) -> &[u8] {
|
|
|
615
|
+ pub fn get_peek_peer(&self) -> &PeekPeer {
|
|
86
|
616
|
match self.union {
|
|
87
|
|
- ::std::option::Option::Some(Message_oneof_union::socket_addr(ref v)) => v,
|
|
88
|
|
- _ => &[],
|
|
|
617
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer(ref v)) => v,
|
|
|
618
|
+ _ => PeekPeer::default_instance(),
|
|
89
|
619
|
}
|
|
90
|
620
|
}
|
|
91
|
|
- pub fn clear_socket_addr(&mut self) {
|
|
|
621
|
+ pub fn clear_peek_peer(&mut self) {
|
|
92
|
622
|
self.union = ::std::option::Option::None;
|
|
93
|
623
|
}
|
|
94
|
624
|
|
|
95
|
|
- pub fn has_socket_addr(&self) -> bool {
|
|
|
625
|
+ pub fn has_peek_peer(&self) -> bool {
|
|
96
|
626
|
match self.union {
|
|
97
|
|
- ::std::option::Option::Some(Message_oneof_union::socket_addr(..)) => true,
|
|
|
627
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer(..)) => true,
|
|
98
|
628
|
_ => false,
|
|
99
|
629
|
}
|
|
100
|
630
|
}
|
|
101
|
631
|
|
|
102
|
632
|
// Param is passed by value, moved
|
|
103
|
|
- pub fn set_socket_addr(&mut self, v: ::std::vec::Vec<u8>) {
|
|
104
|
|
- self.union = ::std::option::Option::Some(Message_oneof_union::socket_addr(v))
|
|
|
633
|
+ pub fn set_peek_peer(&mut self, v: PeekPeer) {
|
|
|
634
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::peek_peer(v))
|
|
105
|
635
|
}
|
|
106
|
636
|
|
|
107
|
637
|
// Mutable pointer to the field.
|
|
108
|
|
- pub fn mut_socket_addr(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
109
|
|
- if let ::std::option::Option::Some(Message_oneof_union::socket_addr(_)) = self.union {
|
|
|
638
|
+ pub fn mut_peek_peer(&mut self) -> &mut PeekPeer {
|
|
|
639
|
+ if let ::std::option::Option::Some(Message_oneof_union::peek_peer(_)) = self.union {
|
|
110
|
640
|
} else {
|
|
111
|
|
- self.union = ::std::option::Option::Some(Message_oneof_union::socket_addr(::std::vec::Vec::new()));
|
|
|
641
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::peek_peer(PeekPeer::new()));
|
|
112
|
642
|
}
|
|
113
|
643
|
match self.union {
|
|
114
|
|
- ::std::option::Option::Some(Message_oneof_union::socket_addr(ref mut v)) => v,
|
|
|
644
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer(ref mut v)) => v,
|
|
115
|
645
|
_ => panic!(),
|
|
116
|
646
|
}
|
|
117
|
647
|
}
|
|
118
|
648
|
|
|
119
|
649
|
// Take field
|
|
120
|
|
- pub fn take_socket_addr(&mut self) -> ::std::vec::Vec<u8> {
|
|
121
|
|
- if self.has_socket_addr() {
|
|
|
650
|
+ pub fn take_peek_peer(&mut self) -> PeekPeer {
|
|
|
651
|
+ if self.has_peek_peer() {
|
|
122
|
652
|
match self.union.take() {
|
|
123
|
|
- ::std::option::Option::Some(Message_oneof_union::socket_addr(v)) => v,
|
|
|
653
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer(v)) => v,
|
|
124
|
654
|
_ => panic!(),
|
|
125
|
655
|
}
|
|
126
|
656
|
} else {
|
|
127
|
|
- ::std::vec::Vec::new()
|
|
|
657
|
+ PeekPeer::new()
|
|
|
658
|
+ }
|
|
|
659
|
+ }
|
|
|
660
|
+
|
|
|
661
|
+ // .hbb.PeekPeerResponse peek_peer_response = 8;
|
|
|
662
|
+
|
|
|
663
|
+
|
|
|
664
|
+ pub fn get_peek_peer_response(&self) -> &PeekPeerResponse {
|
|
|
665
|
+ match self.union {
|
|
|
666
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer_response(ref v)) => v,
|
|
|
667
|
+ _ => PeekPeerResponse::default_instance(),
|
|
|
668
|
+ }
|
|
|
669
|
+ }
|
|
|
670
|
+ pub fn clear_peek_peer_response(&mut self) {
|
|
|
671
|
+ self.union = ::std::option::Option::None;
|
|
|
672
|
+ }
|
|
|
673
|
+
|
|
|
674
|
+ pub fn has_peek_peer_response(&self) -> bool {
|
|
|
675
|
+ match self.union {
|
|
|
676
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer_response(..)) => true,
|
|
|
677
|
+ _ => false,
|
|
|
678
|
+ }
|
|
|
679
|
+ }
|
|
|
680
|
+
|
|
|
681
|
+ // Param is passed by value, moved
|
|
|
682
|
+ pub fn set_peek_peer_response(&mut self, v: PeekPeerResponse) {
|
|
|
683
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::peek_peer_response(v))
|
|
|
684
|
+ }
|
|
|
685
|
+
|
|
|
686
|
+ // Mutable pointer to the field.
|
|
|
687
|
+ pub fn mut_peek_peer_response(&mut self) -> &mut PeekPeerResponse {
|
|
|
688
|
+ if let ::std::option::Option::Some(Message_oneof_union::peek_peer_response(_)) = self.union {
|
|
|
689
|
+ } else {
|
|
|
690
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::peek_peer_response(PeekPeerResponse::new()));
|
|
|
691
|
+ }
|
|
|
692
|
+ match self.union {
|
|
|
693
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer_response(ref mut v)) => v,
|
|
|
694
|
+ _ => panic!(),
|
|
|
695
|
+ }
|
|
|
696
|
+ }
|
|
|
697
|
+
|
|
|
698
|
+ // Take field
|
|
|
699
|
+ pub fn take_peek_peer_response(&mut self) -> PeekPeerResponse {
|
|
|
700
|
+ if self.has_peek_peer_response() {
|
|
|
701
|
+ match self.union.take() {
|
|
|
702
|
+ ::std::option::Option::Some(Message_oneof_union::peek_peer_response(v)) => v,
|
|
|
703
|
+ _ => panic!(),
|
|
|
704
|
+ }
|
|
|
705
|
+ } else {
|
|
|
706
|
+ PeekPeerResponse::new()
|
|
128
|
707
|
}
|
|
129
|
708
|
}
|
|
130
|
709
|
}
|
|
131
|
710
|
|
|
132
|
711
|
impl ::protobuf::Message for Message {
|
|
133
|
712
|
fn is_initialized(&self) -> bool {
|
|
|
713
|
+ if let Some(Message_oneof_union::register_peer(ref v)) = self.union {
|
|
|
714
|
+ if !v.is_initialized() {
|
|
|
715
|
+ return false;
|
|
|
716
|
+ }
|
|
|
717
|
+ }
|
|
|
718
|
+ if let Some(Message_oneof_union::peek_peer(ref v)) = self.union {
|
|
|
719
|
+ if !v.is_initialized() {
|
|
|
720
|
+ return false;
|
|
|
721
|
+ }
|
|
|
722
|
+ }
|
|
|
723
|
+ if let Some(Message_oneof_union::peek_peer_response(ref v)) = self.union {
|
|
|
724
|
+ if !v.is_initialized() {
|
|
|
725
|
+ return false;
|
|
|
726
|
+ }
|
|
|
727
|
+ }
|
|
134
|
728
|
true
|
|
135
|
729
|
}
|
|
136
|
730
|
|
|
|
@@ -138,14 +732,23 @@ impl ::protobuf::Message for Message {
|
|
138
|
732
|
while !is.eof()? {
|
|
139
|
733
|
let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
140
|
734
|
match field_number {
|
|
141
|
|
- 1 => {
|
|
142
|
|
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.addr)?;
|
|
143
|
|
- },
|
|
144
|
735
|
6 => {
|
|
145
|
736
|
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
|
146
|
737
|
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
|
147
|
738
|
}
|
|
148
|
|
- self.union = ::std::option::Option::Some(Message_oneof_union::socket_addr(is.read_bytes()?));
|
|
|
739
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::register_peer(is.read_message()?));
|
|
|
740
|
+ },
|
|
|
741
|
+ 7 => {
|
|
|
742
|
+ if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
|
|
743
|
+ return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
|
|
744
|
+ }
|
|
|
745
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::peek_peer(is.read_message()?));
|
|
|
746
|
+ },
|
|
|
747
|
+ 8 => {
|
|
|
748
|
+ if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
|
|
749
|
+ return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
|
|
750
|
+ }
|
|
|
751
|
+ self.union = ::std::option::Option::Some(Message_oneof_union::peek_peer_response(is.read_message()?));
|
|
149
|
752
|
},
|
|
150
|
753
|
_ => {
|
|
151
|
754
|
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
|
@@ -159,13 +762,19 @@ impl ::protobuf::Message for Message {
|
|
159
|
762
|
#[allow(unused_variables)]
|
|
160
|
763
|
fn compute_size(&self) -> u32 {
|
|
161
|
764
|
let mut my_size = 0;
|
|
162
|
|
- if !self.addr.is_empty() {
|
|
163
|
|
- my_size += ::protobuf::rt::string_size(1, &self.addr);
|
|
164
|
|
- }
|
|
165
|
765
|
if let ::std::option::Option::Some(ref v) = self.union {
|
|
166
|
766
|
match v {
|
|
167
|
|
- &Message_oneof_union::socket_addr(ref v) => {
|
|
168
|
|
- my_size += ::protobuf::rt::bytes_size(6, &v);
|
|
|
767
|
+ &Message_oneof_union::register_peer(ref v) => {
|
|
|
768
|
+ let len = v.compute_size();
|
|
|
769
|
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
|
|
770
|
+ },
|
|
|
771
|
+ &Message_oneof_union::peek_peer(ref v) => {
|
|
|
772
|
+ let len = v.compute_size();
|
|
|
773
|
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
|
|
774
|
+ },
|
|
|
775
|
+ &Message_oneof_union::peek_peer_response(ref v) => {
|
|
|
776
|
+ let len = v.compute_size();
|
|
|
777
|
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
|
169
|
778
|
},
|
|
170
|
779
|
};
|
|
171
|
780
|
}
|
|
|
@@ -175,13 +784,22 @@ impl ::protobuf::Message for Message {
|
|
175
|
784
|
}
|
|
176
|
785
|
|
|
177
|
786
|
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
178
|
|
- if !self.addr.is_empty() {
|
|
179
|
|
- os.write_string(1, &self.addr)?;
|
|
180
|
|
- }
|
|
181
|
787
|
if let ::std::option::Option::Some(ref v) = self.union {
|
|
182
|
788
|
match v {
|
|
183
|
|
- &Message_oneof_union::socket_addr(ref v) => {
|
|
184
|
|
- os.write_bytes(6, v)?;
|
|
|
789
|
+ &Message_oneof_union::register_peer(ref v) => {
|
|
|
790
|
+ os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
|
|
791
|
+ os.write_raw_varint32(v.get_cached_size())?;
|
|
|
792
|
+ v.write_to_with_cached_sizes(os)?;
|
|
|
793
|
+ },
|
|
|
794
|
+ &Message_oneof_union::peek_peer(ref v) => {
|
|
|
795
|
+ os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
|
|
796
|
+ os.write_raw_varint32(v.get_cached_size())?;
|
|
|
797
|
+ v.write_to_with_cached_sizes(os)?;
|
|
|
798
|
+ },
|
|
|
799
|
+ &Message_oneof_union::peek_peer_response(ref v) => {
|
|
|
800
|
+ os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
|
|
801
|
+ os.write_raw_varint32(v.get_cached_size())?;
|
|
|
802
|
+ v.write_to_with_cached_sizes(os)?;
|
|
185
|
803
|
},
|
|
186
|
804
|
};
|
|
187
|
805
|
}
|
|
|
@@ -227,15 +845,20 @@ impl ::protobuf::Message for Message {
|
|
227
|
845
|
unsafe {
|
|
228
|
846
|
descriptor.get(|| {
|
|
229
|
847
|
let mut fields = ::std::vec::Vec::new();
|
|
230
|
|
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
|
231
|
|
- "addr",
|
|
232
|
|
- |m: &Message| { &m.addr },
|
|
233
|
|
- |m: &mut Message| { &mut m.addr },
|
|
|
848
|
+ fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RegisterPeer>(
|
|
|
849
|
+ "register_peer",
|
|
|
850
|
+ Message::has_register_peer,
|
|
|
851
|
+ Message::get_register_peer,
|
|
234
|
852
|
));
|
|
235
|
|
- fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
|
|
236
|
|
- "socket_addr",
|
|
237
|
|
- Message::has_socket_addr,
|
|
238
|
|
- Message::get_socket_addr,
|
|
|
853
|
+ fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, PeekPeer>(
|
|
|
854
|
+ "peek_peer",
|
|
|
855
|
+ Message::has_peek_peer,
|
|
|
856
|
+ Message::get_peek_peer,
|
|
|
857
|
+ ));
|
|
|
858
|
+ fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, PeekPeerResponse>(
|
|
|
859
|
+ "peek_peer_response",
|
|
|
860
|
+ Message::has_peek_peer_response,
|
|
|
861
|
+ Message::get_peek_peer_response,
|
|
239
|
862
|
));
|
|
240
|
863
|
::protobuf::reflect::MessageDescriptor::new::<Message>(
|
|
241
|
864
|
"Message",
|
|
|
@@ -259,7 +882,8 @@ impl ::protobuf::Message for Message {
|
|
259
|
882
|
|
|
260
|
883
|
impl ::protobuf::Clear for Message {
|
|
261
|
884
|
fn clear(&mut self) {
|
|
262
|
|
- self.addr.clear();
|
|
|
885
|
+ self.union = ::std::option::Option::None;
|
|
|
886
|
+ self.union = ::std::option::Option::None;
|
|
263
|
887
|
self.union = ::std::option::Option::None;
|
|
264
|
888
|
self.unknown_fields.clear();
|
|
265
|
889
|
}
|
|
|
@@ -278,9 +902,14 @@ impl ::protobuf::reflect::ProtobufValue for Message {
|
|
278
|
902
|
}
|
|
279
|
903
|
|
|
280
|
904
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
|
281
|
|
- \n\rmessage.proto\x12\x03hbb\"=\n\x07Message\x12\x0e\n\x04addr\x18\x01\
|
|
282
|
|
- \x20\x01(\tB\0\x12\x17\n\x0bsocket_addr\x18\x06\x20\x01(\x0cH\0B\0B\x07\
|
|
283
|
|
- \n\x05union:\0B\0b\x06proto3\
|
|
|
905
|
+ \n\rmessage.proto\x12\x03hbb\"$\n\x0cRegisterPeer\x12\x12\n\x08hbb_addr\
|
|
|
906
|
+ \x18\x01\x20\x01(\tB\0:\0\"\x20\n\x08PeekPeer\x12\x12\n\x08hbb_addr\x18\
|
|
|
907
|
+ \x01\x20\x01(\tB\0:\0\"+\n\x10PeekPeerResponse\x12\x15\n\x0bsocket_addr\
|
|
|
908
|
+ \x18\x01\x20\x01(\x0cB\0:\0\"\x9f\x01\n\x07Message\x12,\n\rregister_peer\
|
|
|
909
|
+ \x18\x06\x20\x01(\x0b2\x11.hbb.RegisterPeerH\0B\0\x12$\n\tpeek_peer\x18\
|
|
|
910
|
+ \x07\x20\x01(\x0b2\r.hbb.PeekPeerH\0B\0\x125\n\x12peek_peer_response\x18\
|
|
|
911
|
+ \x08\x20\x01(\x0b2\x15.hbb.PeekPeerResponseH\0B\0B\x07\n\x05union:\0B\0b\
|
|
|
912
|
+ \x06proto3\
|
|
284
|
913
|
";
|
|
285
|
914
|
|
|
286
|
915
|
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|