1#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(PartialEq,Clone,Default,Debug)]
29pub struct Endpoint {
30 pub address: ::std::vec::Vec<u8>,
33 pub port: i32,
35 pub nodeId: ::std::vec::Vec<u8>,
37 pub addressIpv6: ::std::vec::Vec<u8>,
39 pub special_fields: ::protobuf::SpecialFields,
42}
43
44impl<'a> ::std::default::Default for &'a Endpoint {
45 fn default() -> &'a Endpoint {
46 <Endpoint as ::protobuf::Message>::default_instance()
47 }
48}
49
50impl Endpoint {
51 pub fn new() -> Endpoint {
52 ::std::default::Default::default()
53 }
54
55 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
56 let mut fields = ::std::vec::Vec::with_capacity(4);
57 let mut oneofs = ::std::vec::Vec::with_capacity(0);
58 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
59 "address",
60 |m: &Endpoint| { &m.address },
61 |m: &mut Endpoint| { &mut m.address },
62 ));
63 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
64 "port",
65 |m: &Endpoint| { &m.port },
66 |m: &mut Endpoint| { &mut m.port },
67 ));
68 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
69 "nodeId",
70 |m: &Endpoint| { &m.nodeId },
71 |m: &mut Endpoint| { &mut m.nodeId },
72 ));
73 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
74 "addressIpv6",
75 |m: &Endpoint| { &m.addressIpv6 },
76 |m: &mut Endpoint| { &mut m.addressIpv6 },
77 ));
78 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Endpoint>(
79 "Endpoint",
80 fields,
81 oneofs,
82 )
83 }
84}
85
86impl ::protobuf::Message for Endpoint {
87 const NAME: &'static str = "Endpoint";
88
89 fn is_initialized(&self) -> bool {
90 true
91 }
92
93 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
94 while let Some(tag) = is.read_raw_tag_or_eof()? {
95 match tag {
96 10 => {
97 self.address = is.read_bytes()?;
98 },
99 16 => {
100 self.port = is.read_int32()?;
101 },
102 26 => {
103 self.nodeId = is.read_bytes()?;
104 },
105 34 => {
106 self.addressIpv6 = is.read_bytes()?;
107 },
108 tag => {
109 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
110 },
111 };
112 }
113 ::std::result::Result::Ok(())
114 }
115
116 #[allow(unused_variables)]
118 fn compute_size(&self) -> u64 {
119 let mut my_size = 0;
120 if !self.address.is_empty() {
121 my_size += ::protobuf::rt::bytes_size(1, &self.address);
122 }
123 if self.port != 0 {
124 my_size += ::protobuf::rt::int32_size(2, self.port);
125 }
126 if !self.nodeId.is_empty() {
127 my_size += ::protobuf::rt::bytes_size(3, &self.nodeId);
128 }
129 if !self.addressIpv6.is_empty() {
130 my_size += ::protobuf::rt::bytes_size(4, &self.addressIpv6);
131 }
132 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
133 self.special_fields.cached_size().set(my_size as u32);
134 my_size
135 }
136
137 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
138 if !self.address.is_empty() {
139 os.write_bytes(1, &self.address)?;
140 }
141 if self.port != 0 {
142 os.write_int32(2, self.port)?;
143 }
144 if !self.nodeId.is_empty() {
145 os.write_bytes(3, &self.nodeId)?;
146 }
147 if !self.addressIpv6.is_empty() {
148 os.write_bytes(4, &self.addressIpv6)?;
149 }
150 os.write_unknown_fields(self.special_fields.unknown_fields())?;
151 ::std::result::Result::Ok(())
152 }
153
154 fn special_fields(&self) -> &::protobuf::SpecialFields {
155 &self.special_fields
156 }
157
158 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
159 &mut self.special_fields
160 }
161
162 fn new() -> Endpoint {
163 Endpoint::new()
164 }
165
166 fn clear(&mut self) {
167 self.address.clear();
168 self.port = 0;
169 self.nodeId.clear();
170 self.addressIpv6.clear();
171 self.special_fields.clear();
172 }
173
174 fn default_instance() -> &'static Endpoint {
175 static instance: Endpoint = Endpoint {
176 address: ::std::vec::Vec::new(),
177 port: 0,
178 nodeId: ::std::vec::Vec::new(),
179 addressIpv6: ::std::vec::Vec::new(),
180 special_fields: ::protobuf::SpecialFields::new(),
181 };
182 &instance
183 }
184}
185
186impl ::protobuf::MessageFull for Endpoint {
187 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
188 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
189 descriptor.get(|| file_descriptor().message_by_package_relative_name("Endpoint").unwrap()).clone()
190 }
191}
192
193impl ::std::fmt::Display for Endpoint {
194 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
195 ::protobuf::text_format::fmt(self, f)
196 }
197}
198
199impl ::protobuf::reflect::ProtobufValue for Endpoint {
200 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
201}
202
203#[derive(PartialEq,Clone,Default,Debug)]
205pub struct PingMessage {
206 pub from: ::protobuf::MessageField<Endpoint>,
209 pub to: ::protobuf::MessageField<Endpoint>,
211 pub version: i32,
213 pub timestamp: i64,
215 pub special_fields: ::protobuf::SpecialFields,
218}
219
220impl<'a> ::std::default::Default for &'a PingMessage {
221 fn default() -> &'a PingMessage {
222 <PingMessage as ::protobuf::Message>::default_instance()
223 }
224}
225
226impl PingMessage {
227 pub fn new() -> PingMessage {
228 ::std::default::Default::default()
229 }
230
231 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
232 let mut fields = ::std::vec::Vec::with_capacity(4);
233 let mut oneofs = ::std::vec::Vec::with_capacity(0);
234 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Endpoint>(
235 "from",
236 |m: &PingMessage| { &m.from },
237 |m: &mut PingMessage| { &mut m.from },
238 ));
239 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Endpoint>(
240 "to",
241 |m: &PingMessage| { &m.to },
242 |m: &mut PingMessage| { &mut m.to },
243 ));
244 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
245 "version",
246 |m: &PingMessage| { &m.version },
247 |m: &mut PingMessage| { &mut m.version },
248 ));
249 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
250 "timestamp",
251 |m: &PingMessage| { &m.timestamp },
252 |m: &mut PingMessage| { &mut m.timestamp },
253 ));
254 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PingMessage>(
255 "PingMessage",
256 fields,
257 oneofs,
258 )
259 }
260}
261
262impl ::protobuf::Message for PingMessage {
263 const NAME: &'static str = "PingMessage";
264
265 fn is_initialized(&self) -> bool {
266 true
267 }
268
269 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
270 while let Some(tag) = is.read_raw_tag_or_eof()? {
271 match tag {
272 10 => {
273 ::protobuf::rt::read_singular_message_into_field(is, &mut self.from)?;
274 },
275 18 => {
276 ::protobuf::rt::read_singular_message_into_field(is, &mut self.to)?;
277 },
278 24 => {
279 self.version = is.read_int32()?;
280 },
281 32 => {
282 self.timestamp = is.read_int64()?;
283 },
284 tag => {
285 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
286 },
287 };
288 }
289 ::std::result::Result::Ok(())
290 }
291
292 #[allow(unused_variables)]
294 fn compute_size(&self) -> u64 {
295 let mut my_size = 0;
296 if let Some(v) = self.from.as_ref() {
297 let len = v.compute_size();
298 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
299 }
300 if let Some(v) = self.to.as_ref() {
301 let len = v.compute_size();
302 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
303 }
304 if self.version != 0 {
305 my_size += ::protobuf::rt::int32_size(3, self.version);
306 }
307 if self.timestamp != 0 {
308 my_size += ::protobuf::rt::int64_size(4, self.timestamp);
309 }
310 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
311 self.special_fields.cached_size().set(my_size as u32);
312 my_size
313 }
314
315 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
316 if let Some(v) = self.from.as_ref() {
317 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
318 }
319 if let Some(v) = self.to.as_ref() {
320 ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
321 }
322 if self.version != 0 {
323 os.write_int32(3, self.version)?;
324 }
325 if self.timestamp != 0 {
326 os.write_int64(4, self.timestamp)?;
327 }
328 os.write_unknown_fields(self.special_fields.unknown_fields())?;
329 ::std::result::Result::Ok(())
330 }
331
332 fn special_fields(&self) -> &::protobuf::SpecialFields {
333 &self.special_fields
334 }
335
336 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
337 &mut self.special_fields
338 }
339
340 fn new() -> PingMessage {
341 PingMessage::new()
342 }
343
344 fn clear(&mut self) {
345 self.from.clear();
346 self.to.clear();
347 self.version = 0;
348 self.timestamp = 0;
349 self.special_fields.clear();
350 }
351
352 fn default_instance() -> &'static PingMessage {
353 static instance: PingMessage = PingMessage {
354 from: ::protobuf::MessageField::none(),
355 to: ::protobuf::MessageField::none(),
356 version: 0,
357 timestamp: 0,
358 special_fields: ::protobuf::SpecialFields::new(),
359 };
360 &instance
361 }
362}
363
364impl ::protobuf::MessageFull for PingMessage {
365 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
366 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
367 descriptor.get(|| file_descriptor().message_by_package_relative_name("PingMessage").unwrap()).clone()
368 }
369}
370
371impl ::std::fmt::Display for PingMessage {
372 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
373 ::protobuf::text_format::fmt(self, f)
374 }
375}
376
377impl ::protobuf::reflect::ProtobufValue for PingMessage {
378 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
379}
380
381#[derive(PartialEq,Clone,Default,Debug)]
383pub struct PongMessage {
384 pub from: ::protobuf::MessageField<Endpoint>,
387 pub echo: i32,
389 pub timestamp: i64,
391 pub special_fields: ::protobuf::SpecialFields,
394}
395
396impl<'a> ::std::default::Default for &'a PongMessage {
397 fn default() -> &'a PongMessage {
398 <PongMessage as ::protobuf::Message>::default_instance()
399 }
400}
401
402impl PongMessage {
403 pub fn new() -> PongMessage {
404 ::std::default::Default::default()
405 }
406
407 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
408 let mut fields = ::std::vec::Vec::with_capacity(3);
409 let mut oneofs = ::std::vec::Vec::with_capacity(0);
410 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Endpoint>(
411 "from",
412 |m: &PongMessage| { &m.from },
413 |m: &mut PongMessage| { &mut m.from },
414 ));
415 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
416 "echo",
417 |m: &PongMessage| { &m.echo },
418 |m: &mut PongMessage| { &mut m.echo },
419 ));
420 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
421 "timestamp",
422 |m: &PongMessage| { &m.timestamp },
423 |m: &mut PongMessage| { &mut m.timestamp },
424 ));
425 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PongMessage>(
426 "PongMessage",
427 fields,
428 oneofs,
429 )
430 }
431}
432
433impl ::protobuf::Message for PongMessage {
434 const NAME: &'static str = "PongMessage";
435
436 fn is_initialized(&self) -> bool {
437 true
438 }
439
440 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
441 while let Some(tag) = is.read_raw_tag_or_eof()? {
442 match tag {
443 10 => {
444 ::protobuf::rt::read_singular_message_into_field(is, &mut self.from)?;
445 },
446 16 => {
447 self.echo = is.read_int32()?;
448 },
449 24 => {
450 self.timestamp = is.read_int64()?;
451 },
452 tag => {
453 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
454 },
455 };
456 }
457 ::std::result::Result::Ok(())
458 }
459
460 #[allow(unused_variables)]
462 fn compute_size(&self) -> u64 {
463 let mut my_size = 0;
464 if let Some(v) = self.from.as_ref() {
465 let len = v.compute_size();
466 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
467 }
468 if self.echo != 0 {
469 my_size += ::protobuf::rt::int32_size(2, self.echo);
470 }
471 if self.timestamp != 0 {
472 my_size += ::protobuf::rt::int64_size(3, self.timestamp);
473 }
474 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
475 self.special_fields.cached_size().set(my_size as u32);
476 my_size
477 }
478
479 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
480 if let Some(v) = self.from.as_ref() {
481 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
482 }
483 if self.echo != 0 {
484 os.write_int32(2, self.echo)?;
485 }
486 if self.timestamp != 0 {
487 os.write_int64(3, self.timestamp)?;
488 }
489 os.write_unknown_fields(self.special_fields.unknown_fields())?;
490 ::std::result::Result::Ok(())
491 }
492
493 fn special_fields(&self) -> &::protobuf::SpecialFields {
494 &self.special_fields
495 }
496
497 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
498 &mut self.special_fields
499 }
500
501 fn new() -> PongMessage {
502 PongMessage::new()
503 }
504
505 fn clear(&mut self) {
506 self.from.clear();
507 self.echo = 0;
508 self.timestamp = 0;
509 self.special_fields.clear();
510 }
511
512 fn default_instance() -> &'static PongMessage {
513 static instance: PongMessage = PongMessage {
514 from: ::protobuf::MessageField::none(),
515 echo: 0,
516 timestamp: 0,
517 special_fields: ::protobuf::SpecialFields::new(),
518 };
519 &instance
520 }
521}
522
523impl ::protobuf::MessageFull for PongMessage {
524 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
525 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
526 descriptor.get(|| file_descriptor().message_by_package_relative_name("PongMessage").unwrap()).clone()
527 }
528}
529
530impl ::std::fmt::Display for PongMessage {
531 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
532 ::protobuf::text_format::fmt(self, f)
533 }
534}
535
536impl ::protobuf::reflect::ProtobufValue for PongMessage {
537 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
538}
539
540#[derive(PartialEq,Clone,Default,Debug)]
542pub struct FindNeighbours {
543 pub from: ::protobuf::MessageField<Endpoint>,
546 pub targetId: ::std::vec::Vec<u8>,
548 pub timestamp: i64,
550 pub special_fields: ::protobuf::SpecialFields,
553}
554
555impl<'a> ::std::default::Default for &'a FindNeighbours {
556 fn default() -> &'a FindNeighbours {
557 <FindNeighbours as ::protobuf::Message>::default_instance()
558 }
559}
560
561impl FindNeighbours {
562 pub fn new() -> FindNeighbours {
563 ::std::default::Default::default()
564 }
565
566 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
567 let mut fields = ::std::vec::Vec::with_capacity(3);
568 let mut oneofs = ::std::vec::Vec::with_capacity(0);
569 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Endpoint>(
570 "from",
571 |m: &FindNeighbours| { &m.from },
572 |m: &mut FindNeighbours| { &mut m.from },
573 ));
574 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
575 "targetId",
576 |m: &FindNeighbours| { &m.targetId },
577 |m: &mut FindNeighbours| { &mut m.targetId },
578 ));
579 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
580 "timestamp",
581 |m: &FindNeighbours| { &m.timestamp },
582 |m: &mut FindNeighbours| { &mut m.timestamp },
583 ));
584 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<FindNeighbours>(
585 "FindNeighbours",
586 fields,
587 oneofs,
588 )
589 }
590}
591
592impl ::protobuf::Message for FindNeighbours {
593 const NAME: &'static str = "FindNeighbours";
594
595 fn is_initialized(&self) -> bool {
596 true
597 }
598
599 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
600 while let Some(tag) = is.read_raw_tag_or_eof()? {
601 match tag {
602 10 => {
603 ::protobuf::rt::read_singular_message_into_field(is, &mut self.from)?;
604 },
605 18 => {
606 self.targetId = is.read_bytes()?;
607 },
608 24 => {
609 self.timestamp = is.read_int64()?;
610 },
611 tag => {
612 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
613 },
614 };
615 }
616 ::std::result::Result::Ok(())
617 }
618
619 #[allow(unused_variables)]
621 fn compute_size(&self) -> u64 {
622 let mut my_size = 0;
623 if let Some(v) = self.from.as_ref() {
624 let len = v.compute_size();
625 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
626 }
627 if !self.targetId.is_empty() {
628 my_size += ::protobuf::rt::bytes_size(2, &self.targetId);
629 }
630 if self.timestamp != 0 {
631 my_size += ::protobuf::rt::int64_size(3, self.timestamp);
632 }
633 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
634 self.special_fields.cached_size().set(my_size as u32);
635 my_size
636 }
637
638 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
639 if let Some(v) = self.from.as_ref() {
640 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
641 }
642 if !self.targetId.is_empty() {
643 os.write_bytes(2, &self.targetId)?;
644 }
645 if self.timestamp != 0 {
646 os.write_int64(3, self.timestamp)?;
647 }
648 os.write_unknown_fields(self.special_fields.unknown_fields())?;
649 ::std::result::Result::Ok(())
650 }
651
652 fn special_fields(&self) -> &::protobuf::SpecialFields {
653 &self.special_fields
654 }
655
656 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
657 &mut self.special_fields
658 }
659
660 fn new() -> FindNeighbours {
661 FindNeighbours::new()
662 }
663
664 fn clear(&mut self) {
665 self.from.clear();
666 self.targetId.clear();
667 self.timestamp = 0;
668 self.special_fields.clear();
669 }
670
671 fn default_instance() -> &'static FindNeighbours {
672 static instance: FindNeighbours = FindNeighbours {
673 from: ::protobuf::MessageField::none(),
674 targetId: ::std::vec::Vec::new(),
675 timestamp: 0,
676 special_fields: ::protobuf::SpecialFields::new(),
677 };
678 &instance
679 }
680}
681
682impl ::protobuf::MessageFull for FindNeighbours {
683 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
684 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
685 descriptor.get(|| file_descriptor().message_by_package_relative_name("FindNeighbours").unwrap()).clone()
686 }
687}
688
689impl ::std::fmt::Display for FindNeighbours {
690 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
691 ::protobuf::text_format::fmt(self, f)
692 }
693}
694
695impl ::protobuf::reflect::ProtobufValue for FindNeighbours {
696 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
697}
698
699#[derive(PartialEq,Clone,Default,Debug)]
701pub struct Neighbours {
702 pub from: ::protobuf::MessageField<Endpoint>,
705 pub neighbours: ::std::vec::Vec<Endpoint>,
707 pub timestamp: i64,
709 pub special_fields: ::protobuf::SpecialFields,
712}
713
714impl<'a> ::std::default::Default for &'a Neighbours {
715 fn default() -> &'a Neighbours {
716 <Neighbours as ::protobuf::Message>::default_instance()
717 }
718}
719
720impl Neighbours {
721 pub fn new() -> Neighbours {
722 ::std::default::Default::default()
723 }
724
725 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
726 let mut fields = ::std::vec::Vec::with_capacity(3);
727 let mut oneofs = ::std::vec::Vec::with_capacity(0);
728 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Endpoint>(
729 "from",
730 |m: &Neighbours| { &m.from },
731 |m: &mut Neighbours| { &mut m.from },
732 ));
733 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
734 "neighbours",
735 |m: &Neighbours| { &m.neighbours },
736 |m: &mut Neighbours| { &mut m.neighbours },
737 ));
738 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
739 "timestamp",
740 |m: &Neighbours| { &m.timestamp },
741 |m: &mut Neighbours| { &mut m.timestamp },
742 ));
743 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Neighbours>(
744 "Neighbours",
745 fields,
746 oneofs,
747 )
748 }
749}
750
751impl ::protobuf::Message for Neighbours {
752 const NAME: &'static str = "Neighbours";
753
754 fn is_initialized(&self) -> bool {
755 true
756 }
757
758 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
759 while let Some(tag) = is.read_raw_tag_or_eof()? {
760 match tag {
761 10 => {
762 ::protobuf::rt::read_singular_message_into_field(is, &mut self.from)?;
763 },
764 18 => {
765 self.neighbours.push(is.read_message()?);
766 },
767 24 => {
768 self.timestamp = is.read_int64()?;
769 },
770 tag => {
771 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
772 },
773 };
774 }
775 ::std::result::Result::Ok(())
776 }
777
778 #[allow(unused_variables)]
780 fn compute_size(&self) -> u64 {
781 let mut my_size = 0;
782 if let Some(v) = self.from.as_ref() {
783 let len = v.compute_size();
784 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
785 }
786 for value in &self.neighbours {
787 let len = value.compute_size();
788 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
789 };
790 if self.timestamp != 0 {
791 my_size += ::protobuf::rt::int64_size(3, self.timestamp);
792 }
793 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
794 self.special_fields.cached_size().set(my_size as u32);
795 my_size
796 }
797
798 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
799 if let Some(v) = self.from.as_ref() {
800 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
801 }
802 for v in &self.neighbours {
803 ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
804 };
805 if self.timestamp != 0 {
806 os.write_int64(3, self.timestamp)?;
807 }
808 os.write_unknown_fields(self.special_fields.unknown_fields())?;
809 ::std::result::Result::Ok(())
810 }
811
812 fn special_fields(&self) -> &::protobuf::SpecialFields {
813 &self.special_fields
814 }
815
816 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
817 &mut self.special_fields
818 }
819
820 fn new() -> Neighbours {
821 Neighbours::new()
822 }
823
824 fn clear(&mut self) {
825 self.from.clear();
826 self.neighbours.clear();
827 self.timestamp = 0;
828 self.special_fields.clear();
829 }
830
831 fn default_instance() -> &'static Neighbours {
832 static instance: Neighbours = Neighbours {
833 from: ::protobuf::MessageField::none(),
834 neighbours: ::std::vec::Vec::new(),
835 timestamp: 0,
836 special_fields: ::protobuf::SpecialFields::new(),
837 };
838 &instance
839 }
840}
841
842impl ::protobuf::MessageFull for Neighbours {
843 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
844 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
845 descriptor.get(|| file_descriptor().message_by_package_relative_name("Neighbours").unwrap()).clone()
846 }
847}
848
849impl ::std::fmt::Display for Neighbours {
850 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
851 ::protobuf::text_format::fmt(self, f)
852 }
853}
854
855impl ::protobuf::reflect::ProtobufValue for Neighbours {
856 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
857}
858
859#[derive(PartialEq,Clone,Default,Debug)]
861pub struct BackupMessage {
862 pub flag: bool,
865 pub priority: i32,
867 pub special_fields: ::protobuf::SpecialFields,
870}
871
872impl<'a> ::std::default::Default for &'a BackupMessage {
873 fn default() -> &'a BackupMessage {
874 <BackupMessage as ::protobuf::Message>::default_instance()
875 }
876}
877
878impl BackupMessage {
879 pub fn new() -> BackupMessage {
880 ::std::default::Default::default()
881 }
882
883 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
884 let mut fields = ::std::vec::Vec::with_capacity(2);
885 let mut oneofs = ::std::vec::Vec::with_capacity(0);
886 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
887 "flag",
888 |m: &BackupMessage| { &m.flag },
889 |m: &mut BackupMessage| { &mut m.flag },
890 ));
891 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
892 "priority",
893 |m: &BackupMessage| { &m.priority },
894 |m: &mut BackupMessage| { &mut m.priority },
895 ));
896 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BackupMessage>(
897 "BackupMessage",
898 fields,
899 oneofs,
900 )
901 }
902}
903
904impl ::protobuf::Message for BackupMessage {
905 const NAME: &'static str = "BackupMessage";
906
907 fn is_initialized(&self) -> bool {
908 true
909 }
910
911 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
912 while let Some(tag) = is.read_raw_tag_or_eof()? {
913 match tag {
914 8 => {
915 self.flag = is.read_bool()?;
916 },
917 16 => {
918 self.priority = is.read_int32()?;
919 },
920 tag => {
921 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
922 },
923 };
924 }
925 ::std::result::Result::Ok(())
926 }
927
928 #[allow(unused_variables)]
930 fn compute_size(&self) -> u64 {
931 let mut my_size = 0;
932 if self.flag != false {
933 my_size += 1 + 1;
934 }
935 if self.priority != 0 {
936 my_size += ::protobuf::rt::int32_size(2, self.priority);
937 }
938 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
939 self.special_fields.cached_size().set(my_size as u32);
940 my_size
941 }
942
943 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
944 if self.flag != false {
945 os.write_bool(1, self.flag)?;
946 }
947 if self.priority != 0 {
948 os.write_int32(2, self.priority)?;
949 }
950 os.write_unknown_fields(self.special_fields.unknown_fields())?;
951 ::std::result::Result::Ok(())
952 }
953
954 fn special_fields(&self) -> &::protobuf::SpecialFields {
955 &self.special_fields
956 }
957
958 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
959 &mut self.special_fields
960 }
961
962 fn new() -> BackupMessage {
963 BackupMessage::new()
964 }
965
966 fn clear(&mut self) {
967 self.flag = false;
968 self.priority = 0;
969 self.special_fields.clear();
970 }
971
972 fn default_instance() -> &'static BackupMessage {
973 static instance: BackupMessage = BackupMessage {
974 flag: false,
975 priority: 0,
976 special_fields: ::protobuf::SpecialFields::new(),
977 };
978 &instance
979 }
980}
981
982impl ::protobuf::MessageFull for BackupMessage {
983 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
984 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
985 descriptor.get(|| file_descriptor().message_by_package_relative_name("BackupMessage").unwrap()).clone()
986 }
987}
988
989impl ::std::fmt::Display for BackupMessage {
990 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
991 ::protobuf::text_format::fmt(self, f)
992 }
993}
994
995impl ::protobuf::reflect::ProtobufValue for BackupMessage {
996 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
997}
998
999static file_descriptor_proto_data: &'static [u8] = b"\
1000 \n\x13core/Discover.proto\x12\x08protocol\"r\n\x08Endpoint\x12\x18\n\x07\
1001 address\x18\x01\x20\x01(\x0cR\x07address\x12\x12\n\x04port\x18\x02\x20\
1002 \x01(\x05R\x04port\x12\x16\n\x06nodeId\x18\x03\x20\x01(\x0cR\x06nodeId\
1003 \x12\x20\n\x0baddressIpv6\x18\x04\x20\x01(\x0cR\x0baddressIpv6\"\x91\x01\
1004 \n\x0bPingMessage\x12&\n\x04from\x18\x01\x20\x01(\x0b2\x12.protocol.Endp\
1005 ointR\x04from\x12\"\n\x02to\x18\x02\x20\x01(\x0b2\x12.protocol.EndpointR\
1006 \x02to\x12\x18\n\x07version\x18\x03\x20\x01(\x05R\x07version\x12\x1c\n\t\
1007 timestamp\x18\x04\x20\x01(\x03R\ttimestamp\"g\n\x0bPongMessage\x12&\n\
1008 \x04from\x18\x01\x20\x01(\x0b2\x12.protocol.EndpointR\x04from\x12\x12\n\
1009 \x04echo\x18\x02\x20\x01(\x05R\x04echo\x12\x1c\n\ttimestamp\x18\x03\x20\
1010 \x01(\x03R\ttimestamp\"r\n\x0eFindNeighbours\x12&\n\x04from\x18\x01\x20\
1011 \x01(\x0b2\x12.protocol.EndpointR\x04from\x12\x1a\n\x08targetId\x18\x02\
1012 \x20\x01(\x0cR\x08targetId\x12\x1c\n\ttimestamp\x18\x03\x20\x01(\x03R\tt\
1013 imestamp\"\x86\x01\n\nNeighbours\x12&\n\x04from\x18\x01\x20\x01(\x0b2\
1014 \x12.protocol.EndpointR\x04from\x122\n\nneighbours\x18\x02\x20\x03(\x0b2\
1015 \x12.protocol.EndpointR\nneighbours\x12\x1c\n\ttimestamp\x18\x03\x20\x01\
1016 (\x03R\ttimestamp\"?\n\rBackupMessage\x12\x12\n\x04flag\x18\x01\x20\x01(\
1017 \x08R\x04flag\x12\x1a\n\x08priority\x18\x02\x20\x01(\x05R\x08priorityBF\
1018 \n\x0forg.tron.protosB\x08DiscoverZ)github.com/tronprotocol/grpc-gateway\
1019 /coreJ\x81\x0b\n\x06\x12\x04\0\0,\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\
1020 \x08\n\x01\x02\x12\x03\x02\0\x11\n\x08\n\x01\x08\x12\x03\x05\0(\nH\n\x02\
1021 \x08\x01\x12\x03\x05\0(\"=Specify\x20the\x20name\x20of\x20the\x20package\
1022 \x20that\x20generated\x20the\x20Java\x20file\n\n\x08\n\x01\x08\x12\x03\
1023 \x06\0)\n=\n\x02\x08\x08\x12\x03\x06\0)\"2Specify\x20the\x20class\x20nam\
1024 e\x20of\x20the\x20generated\x20Java\x20file\n\n\x08\n\x01\x08\x12\x03\
1025 \x07\0@\n\t\n\x02\x08\x0b\x12\x03\x07\0@\n\n\n\x02\x04\0\x12\x04\t\0\x0e\
1026 \x01\n\n\n\x03\x04\0\x01\x12\x03\t\x08\x10\n\x0b\n\x04\x04\0\x02\0\x12\
1027 \x03\n\x02\x14\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\n\x02\x07\n\x0c\n\x05\
1028 \x04\0\x02\0\x01\x12\x03\n\x08\x0f\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\n\
1029 \x12\x13\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x0b\x02\x11\n\x0c\n\x05\x04\0\
1030 \x02\x01\x05\x12\x03\x0b\x02\x07\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\
1031 \x0b\x08\x0c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x0b\x0f\x10\n\x0b\n\
1032 \x04\x04\0\x02\x02\x12\x03\x0c\x02\x13\n\x0c\n\x05\x04\0\x02\x02\x05\x12\
1033 \x03\x0c\x02\x07\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x0c\x08\x0e\n\x0c\
1034 \n\x05\x04\0\x02\x02\x03\x12\x03\x0c\x11\x12\n\x0b\n\x04\x04\0\x02\x03\
1035 \x12\x03\r\x02\x18\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\r\x02\x07\n\x0c\
1036 \n\x05\x04\0\x02\x03\x01\x12\x03\r\x08\x13\n\x0c\n\x05\x04\0\x02\x03\x03\
1037 \x12\x03\r\x16\x17\n\n\n\x02\x04\x01\x12\x04\x10\0\x15\x01\n\n\n\x03\x04\
1038 \x01\x01\x12\x03\x10\x08\x13\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x11\x02\
1039 \x14\n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x11\x02\n\n\x0c\n\x05\x04\x01\
1040 \x02\0\x01\x12\x03\x11\x0b\x0f\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x11\
1041 \x12\x13\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x12\x02\x12\n\x0c\n\x05\x04\
1042 \x01\x02\x01\x06\x12\x03\x12\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\
1043 \x03\x12\x0b\r\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x12\x10\x11\n\x0b\
1044 \n\x04\x04\x01\x02\x02\x12\x03\x13\x02\x14\n\x0c\n\x05\x04\x01\x02\x02\
1045 \x05\x12\x03\x13\x02\x07\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x13\x08\
1046 \x0f\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x13\x12\x13\n\x0b\n\x04\x04\
1047 \x01\x02\x03\x12\x03\x14\x02\x16\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03\
1048 \x14\x02\x07\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x14\x08\x11\n\x0c\n\
1049 \x05\x04\x01\x02\x03\x03\x12\x03\x14\x14\x15\n\n\n\x02\x04\x02\x12\x04\
1050 \x17\0\x1b\x01\n\n\n\x03\x04\x02\x01\x12\x03\x17\x08\x13\n\x0b\n\x04\x04\
1051 \x02\x02\0\x12\x03\x18\x02\x14\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x03\x18\
1052 \x02\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x18\x0b\x0f\n\x0c\n\x05\x04\
1053 \x02\x02\0\x03\x12\x03\x18\x12\x13\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\
1054 \x19\x02\x11\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x19\x02\x07\n\x0c\n\
1055 \x05\x04\x02\x02\x01\x01\x12\x03\x19\x08\x0c\n\x0c\n\x05\x04\x02\x02\x01\
1056 \x03\x12\x03\x19\x0f\x10\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\x1a\x02\x16\
1057 \n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x1a\x02\x07\n\x0c\n\x05\x04\x02\
1058 \x02\x02\x01\x12\x03\x1a\x08\x11\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\
1059 \x1a\x14\x15\n\n\n\x02\x04\x03\x12\x04\x1d\0!\x01\n\n\n\x03\x04\x03\x01\
1060 \x12\x03\x1d\x08\x16\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x1e\x02\x14\n\x0c\
1061 \n\x05\x04\x03\x02\0\x06\x12\x03\x1e\x02\n\n\x0c\n\x05\x04\x03\x02\0\x01\
1062 \x12\x03\x1e\x0b\x0f\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x1e\x12\x13\n\
1063 \x0b\n\x04\x04\x03\x02\x01\x12\x03\x1f\x02\x15\n\x0c\n\x05\x04\x03\x02\
1064 \x01\x05\x12\x03\x1f\x02\x07\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x03\x1f\
1065 \x08\x10\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x1f\x13\x14\n\x0b\n\x04\
1066 \x04\x03\x02\x02\x12\x03\x20\x02\x16\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\
1067 \x03\x20\x02\x07\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03\x20\x08\x11\n\
1068 \x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x20\x14\x15\n\n\n\x02\x04\x04\x12\
1069 \x04#\0'\x01\n\n\n\x03\x04\x04\x01\x12\x03#\x08\x12\n\x0b\n\x04\x04\x04\
1070 \x02\0\x12\x03$\x02\x14\n\x0c\n\x05\x04\x04\x02\0\x06\x12\x03$\x02\n\n\
1071 \x0c\n\x05\x04\x04\x02\0\x01\x12\x03$\x0b\x0f\n\x0c\n\x05\x04\x04\x02\0\
1072 \x03\x12\x03$\x12\x13\n\x0b\n\x04\x04\x04\x02\x01\x12\x03%\x02#\n\x0c\n\
1073 \x05\x04\x04\x02\x01\x04\x12\x03%\x02\n\n\x0c\n\x05\x04\x04\x02\x01\x06\
1074 \x12\x03%\x0b\x13\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03%\x14\x1e\n\x0c\
1075 \n\x05\x04\x04\x02\x01\x03\x12\x03%!\"\n\x0b\n\x04\x04\x04\x02\x02\x12\
1076 \x03&\x02\x16\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\x03&\x02\x07\n\x0c\n\
1077 \x05\x04\x04\x02\x02\x01\x12\x03&\x08\x11\n\x0c\n\x05\x04\x04\x02\x02\
1078 \x03\x12\x03&\x14\x15\n\n\n\x02\x04\x05\x12\x04)\0,\x01\n\n\n\x03\x04\
1079 \x05\x01\x12\x03)\x08\x15\n\x0b\n\x04\x04\x05\x02\0\x12\x03*\x02\x10\n\
1080 \x0c\n\x05\x04\x05\x02\0\x05\x12\x03*\x02\x06\n\x0c\n\x05\x04\x05\x02\0\
1081 \x01\x12\x03*\x07\x0b\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03*\x0e\x0f\n\
1082 \x0b\n\x04\x04\x05\x02\x01\x12\x03+\x02\x15\n\x0c\n\x05\x04\x05\x02\x01\
1083 \x05\x12\x03+\x02\x07\n\x0c\n\x05\x04\x05\x02\x01\x01\x12\x03+\x08\x10\n\
1084 \x0c\n\x05\x04\x05\x02\x01\x03\x12\x03+\x13\x14b\x06proto3\
1085";
1086
1087fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
1089 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
1090 file_descriptor_proto_lazy.get(|| {
1091 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
1092 })
1093}
1094
1095pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
1097 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
1098 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
1099 file_descriptor.get(|| {
1100 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
1101 let mut deps = ::std::vec::Vec::with_capacity(0);
1102 let mut messages = ::std::vec::Vec::with_capacity(6);
1103 messages.push(Endpoint::generated_message_descriptor_data());
1104 messages.push(PingMessage::generated_message_descriptor_data());
1105 messages.push(PongMessage::generated_message_descriptor_data());
1106 messages.push(FindNeighbours::generated_message_descriptor_data());
1107 messages.push(Neighbours::generated_message_descriptor_data());
1108 messages.push(BackupMessage::generated_message_descriptor_data());
1109 let mut enums = ::std::vec::Vec::with_capacity(0);
1110 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
1111 file_descriptor_proto(),
1112 deps,
1113 messages,
1114 enums,
1115 )
1116 });
1117 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
1118 })
1119}