1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![cfg_attr(rustfmt, rustfmt_skip)]
9
10#![allow(box_pointers)]
11#![allow(dead_code)]
12#![allow(missing_docs)]
13#![allow(non_camel_case_types)]
14#![allow(non_snake_case)]
15#![allow(non_upper_case_globals)]
16#![allow(trivial_casts)]
17#![allow(unsafe_code)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20use protobuf::Message as Message_imported_for_functions;
23use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24
25#[derive(PartialEq,Clone,Default)]
30pub struct NoisePayload {
31 nonce: ::protobuf::SingularField<::std::vec::Vec<u8>>,
33 pub unknown_fields: ::protobuf::UnknownFields,
35 pub cached_size: ::protobuf::CachedSize,
36}
37
38impl<'a> ::std::default::Default for &'a NoisePayload {
39 fn default() -> &'a NoisePayload {
40 <NoisePayload as ::protobuf::Message>::default_instance()
41 }
42}
43
44impl NoisePayload {
45 pub fn new() -> NoisePayload {
46 ::std::default::Default::default()
47 }
48
49 pub fn get_nonce(&self) -> &[u8] {
53 match self.nonce.as_ref() {
54 Some(v) => &v,
55 None => &[],
56 }
57 }
58 pub fn clear_nonce(&mut self) {
59 self.nonce.clear();
60 }
61
62 pub fn has_nonce(&self) -> bool {
63 self.nonce.is_some()
64 }
65
66 pub fn set_nonce(&mut self, v: ::std::vec::Vec<u8>) {
68 self.nonce = ::protobuf::SingularField::some(v);
69 }
70
71 pub fn mut_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
74 if self.nonce.is_none() {
75 self.nonce.set_default();
76 }
77 self.nonce.as_mut().unwrap()
78 }
79
80 pub fn take_nonce(&mut self) -> ::std::vec::Vec<u8> {
82 self.nonce.take().unwrap_or_else(|| ::std::vec::Vec::new())
83 }
84}
85
86impl ::protobuf::Message for NoisePayload {
87 fn is_initialized(&self) -> bool {
88 if self.nonce.is_none() {
89 return false;
90 }
91 true
92 }
93
94 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
95 while !is.eof()? {
96 let (field_number, wire_type) = is.read_tag_unpack()?;
97 match field_number {
98 1 => {
99 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.nonce)?;
100 },
101 _ => {
102 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
103 },
104 };
105 }
106 ::std::result::Result::Ok(())
107 }
108
109 #[allow(unused_variables)]
111 fn compute_size(&self) -> u32 {
112 let mut my_size = 0;
113 if let Some(ref v) = self.nonce.as_ref() {
114 my_size += ::protobuf::rt::bytes_size(1, &v);
115 }
116 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
117 self.cached_size.set(my_size);
118 my_size
119 }
120
121 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
122 if let Some(ref v) = self.nonce.as_ref() {
123 os.write_bytes(1, &v)?;
124 }
125 os.write_unknown_fields(self.get_unknown_fields())?;
126 ::std::result::Result::Ok(())
127 }
128
129 fn get_cached_size(&self) -> u32 {
130 self.cached_size.get()
131 }
132
133 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
134 &self.unknown_fields
135 }
136
137 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
138 &mut self.unknown_fields
139 }
140
141 fn as_any(&self) -> &dyn (::std::any::Any) {
142 self as &dyn (::std::any::Any)
143 }
144 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
145 self as &mut dyn (::std::any::Any)
146 }
147 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
148 self
149 }
150
151 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
152 Self::descriptor_static()
153 }
154
155 fn new() -> NoisePayload {
156 NoisePayload::new()
157 }
158
159 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
160 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
161 lock: ::protobuf::lazy::ONCE_INIT,
162 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
163 };
164 unsafe {
165 descriptor.get(|| {
166 let mut fields = ::std::vec::Vec::new();
167 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
168 "nonce",
169 |m: &NoisePayload| { &m.nonce },
170 |m: &mut NoisePayload| { &mut m.nonce },
171 ));
172 ::protobuf::reflect::MessageDescriptor::new::<NoisePayload>(
173 "NoisePayload",
174 fields,
175 file_descriptor_proto()
176 )
177 })
178 }
179 }
180
181 fn default_instance() -> &'static NoisePayload {
182 static mut instance: ::protobuf::lazy::Lazy<NoisePayload> = ::protobuf::lazy::Lazy {
183 lock: ::protobuf::lazy::ONCE_INIT,
184 ptr: 0 as *const NoisePayload,
185 };
186 unsafe {
187 instance.get(NoisePayload::new)
188 }
189 }
190}
191
192impl ::protobuf::Clear for NoisePayload {
193 fn clear(&mut self) {
194 self.nonce.clear();
195 self.unknown_fields.clear();
196 }
197}
198
199impl ::std::fmt::Debug for NoisePayload {
200 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
201 ::protobuf::text_format::fmt(self, f)
202 }
203}
204
205impl ::protobuf::reflect::ProtobufValue for NoisePayload {
206 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
207 ::protobuf::reflect::ProtobufValueRef::Message(self)
208 }
209}
210
211#[derive(PartialEq,Clone,Default)]
212pub struct Open {
213 discoveryKey: ::protobuf::SingularField<::std::vec::Vec<u8>>,
215 capability: ::protobuf::SingularField<::std::vec::Vec<u8>>,
216 pub unknown_fields: ::protobuf::UnknownFields,
218 pub cached_size: ::protobuf::CachedSize,
219}
220
221impl<'a> ::std::default::Default for &'a Open {
222 fn default() -> &'a Open {
223 <Open as ::protobuf::Message>::default_instance()
224 }
225}
226
227impl Open {
228 pub fn new() -> Open {
229 ::std::default::Default::default()
230 }
231
232 pub fn get_discoveryKey(&self) -> &[u8] {
236 match self.discoveryKey.as_ref() {
237 Some(v) => &v,
238 None => &[],
239 }
240 }
241 pub fn clear_discoveryKey(&mut self) {
242 self.discoveryKey.clear();
243 }
244
245 pub fn has_discoveryKey(&self) -> bool {
246 self.discoveryKey.is_some()
247 }
248
249 pub fn set_discoveryKey(&mut self, v: ::std::vec::Vec<u8>) {
251 self.discoveryKey = ::protobuf::SingularField::some(v);
252 }
253
254 pub fn mut_discoveryKey(&mut self) -> &mut ::std::vec::Vec<u8> {
257 if self.discoveryKey.is_none() {
258 self.discoveryKey.set_default();
259 }
260 self.discoveryKey.as_mut().unwrap()
261 }
262
263 pub fn take_discoveryKey(&mut self) -> ::std::vec::Vec<u8> {
265 self.discoveryKey.take().unwrap_or_else(|| ::std::vec::Vec::new())
266 }
267
268 pub fn get_capability(&self) -> &[u8] {
272 match self.capability.as_ref() {
273 Some(v) => &v,
274 None => &[],
275 }
276 }
277 pub fn clear_capability(&mut self) {
278 self.capability.clear();
279 }
280
281 pub fn has_capability(&self) -> bool {
282 self.capability.is_some()
283 }
284
285 pub fn set_capability(&mut self, v: ::std::vec::Vec<u8>) {
287 self.capability = ::protobuf::SingularField::some(v);
288 }
289
290 pub fn mut_capability(&mut self) -> &mut ::std::vec::Vec<u8> {
293 if self.capability.is_none() {
294 self.capability.set_default();
295 }
296 self.capability.as_mut().unwrap()
297 }
298
299 pub fn take_capability(&mut self) -> ::std::vec::Vec<u8> {
301 self.capability.take().unwrap_or_else(|| ::std::vec::Vec::new())
302 }
303}
304
305impl ::protobuf::Message for Open {
306 fn is_initialized(&self) -> bool {
307 if self.discoveryKey.is_none() {
308 return false;
309 }
310 true
311 }
312
313 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
314 while !is.eof()? {
315 let (field_number, wire_type) = is.read_tag_unpack()?;
316 match field_number {
317 1 => {
318 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.discoveryKey)?;
319 },
320 2 => {
321 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.capability)?;
322 },
323 _ => {
324 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
325 },
326 };
327 }
328 ::std::result::Result::Ok(())
329 }
330
331 #[allow(unused_variables)]
333 fn compute_size(&self) -> u32 {
334 let mut my_size = 0;
335 if let Some(ref v) = self.discoveryKey.as_ref() {
336 my_size += ::protobuf::rt::bytes_size(1, &v);
337 }
338 if let Some(ref v) = self.capability.as_ref() {
339 my_size += ::protobuf::rt::bytes_size(2, &v);
340 }
341 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
342 self.cached_size.set(my_size);
343 my_size
344 }
345
346 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
347 if let Some(ref v) = self.discoveryKey.as_ref() {
348 os.write_bytes(1, &v)?;
349 }
350 if let Some(ref v) = self.capability.as_ref() {
351 os.write_bytes(2, &v)?;
352 }
353 os.write_unknown_fields(self.get_unknown_fields())?;
354 ::std::result::Result::Ok(())
355 }
356
357 fn get_cached_size(&self) -> u32 {
358 self.cached_size.get()
359 }
360
361 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
362 &self.unknown_fields
363 }
364
365 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
366 &mut self.unknown_fields
367 }
368
369 fn as_any(&self) -> &dyn (::std::any::Any) {
370 self as &dyn (::std::any::Any)
371 }
372 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
373 self as &mut dyn (::std::any::Any)
374 }
375 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
376 self
377 }
378
379 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
380 Self::descriptor_static()
381 }
382
383 fn new() -> Open {
384 Open::new()
385 }
386
387 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
388 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
389 lock: ::protobuf::lazy::ONCE_INIT,
390 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
391 };
392 unsafe {
393 descriptor.get(|| {
394 let mut fields = ::std::vec::Vec::new();
395 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
396 "discoveryKey",
397 |m: &Open| { &m.discoveryKey },
398 |m: &mut Open| { &mut m.discoveryKey },
399 ));
400 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
401 "capability",
402 |m: &Open| { &m.capability },
403 |m: &mut Open| { &mut m.capability },
404 ));
405 ::protobuf::reflect::MessageDescriptor::new::<Open>(
406 "Open",
407 fields,
408 file_descriptor_proto()
409 )
410 })
411 }
412 }
413
414 fn default_instance() -> &'static Open {
415 static mut instance: ::protobuf::lazy::Lazy<Open> = ::protobuf::lazy::Lazy {
416 lock: ::protobuf::lazy::ONCE_INIT,
417 ptr: 0 as *const Open,
418 };
419 unsafe {
420 instance.get(Open::new)
421 }
422 }
423}
424
425impl ::protobuf::Clear for Open {
426 fn clear(&mut self) {
427 self.discoveryKey.clear();
428 self.capability.clear();
429 self.unknown_fields.clear();
430 }
431}
432
433impl ::std::fmt::Debug for Open {
434 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
435 ::protobuf::text_format::fmt(self, f)
436 }
437}
438
439impl ::protobuf::reflect::ProtobufValue for Open {
440 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
441 ::protobuf::reflect::ProtobufValueRef::Message(self)
442 }
443}
444
445#[derive(PartialEq,Clone,Default)]
446pub struct Options {
447 extensions: ::protobuf::RepeatedField<::std::string::String>,
449 ack: ::std::option::Option<bool>,
450 pub unknown_fields: ::protobuf::UnknownFields,
452 pub cached_size: ::protobuf::CachedSize,
453}
454
455impl<'a> ::std::default::Default for &'a Options {
456 fn default() -> &'a Options {
457 <Options as ::protobuf::Message>::default_instance()
458 }
459}
460
461impl Options {
462 pub fn new() -> Options {
463 ::std::default::Default::default()
464 }
465
466 pub fn get_extensions(&self) -> &[::std::string::String] {
470 &self.extensions
471 }
472 pub fn clear_extensions(&mut self) {
473 self.extensions.clear();
474 }
475
476 pub fn set_extensions(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
478 self.extensions = v;
479 }
480
481 pub fn mut_extensions(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
483 &mut self.extensions
484 }
485
486 pub fn take_extensions(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
488 ::std::mem::replace(&mut self.extensions, ::protobuf::RepeatedField::new())
489 }
490
491 pub fn get_ack(&self) -> bool {
495 self.ack.unwrap_or(false)
496 }
497 pub fn clear_ack(&mut self) {
498 self.ack = ::std::option::Option::None;
499 }
500
501 pub fn has_ack(&self) -> bool {
502 self.ack.is_some()
503 }
504
505 pub fn set_ack(&mut self, v: bool) {
507 self.ack = ::std::option::Option::Some(v);
508 }
509}
510
511impl ::protobuf::Message for Options {
512 fn is_initialized(&self) -> bool {
513 true
514 }
515
516 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
517 while !is.eof()? {
518 let (field_number, wire_type) = is.read_tag_unpack()?;
519 match field_number {
520 1 => {
521 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.extensions)?;
522 },
523 2 => {
524 if wire_type != ::protobuf::wire_format::WireTypeVarint {
525 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
526 }
527 let tmp = is.read_bool()?;
528 self.ack = ::std::option::Option::Some(tmp);
529 },
530 _ => {
531 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
532 },
533 };
534 }
535 ::std::result::Result::Ok(())
536 }
537
538 #[allow(unused_variables)]
540 fn compute_size(&self) -> u32 {
541 let mut my_size = 0;
542 for value in &self.extensions {
543 my_size += ::protobuf::rt::string_size(1, &value);
544 };
545 if let Some(v) = self.ack {
546 my_size += 2;
547 }
548 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
549 self.cached_size.set(my_size);
550 my_size
551 }
552
553 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
554 for v in &self.extensions {
555 os.write_string(1, &v)?;
556 };
557 if let Some(v) = self.ack {
558 os.write_bool(2, v)?;
559 }
560 os.write_unknown_fields(self.get_unknown_fields())?;
561 ::std::result::Result::Ok(())
562 }
563
564 fn get_cached_size(&self) -> u32 {
565 self.cached_size.get()
566 }
567
568 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
569 &self.unknown_fields
570 }
571
572 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
573 &mut self.unknown_fields
574 }
575
576 fn as_any(&self) -> &dyn (::std::any::Any) {
577 self as &dyn (::std::any::Any)
578 }
579 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
580 self as &mut dyn (::std::any::Any)
581 }
582 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
583 self
584 }
585
586 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
587 Self::descriptor_static()
588 }
589
590 fn new() -> Options {
591 Options::new()
592 }
593
594 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
595 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
596 lock: ::protobuf::lazy::ONCE_INIT,
597 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
598 };
599 unsafe {
600 descriptor.get(|| {
601 let mut fields = ::std::vec::Vec::new();
602 fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
603 "extensions",
604 |m: &Options| { &m.extensions },
605 |m: &mut Options| { &mut m.extensions },
606 ));
607 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
608 "ack",
609 |m: &Options| { &m.ack },
610 |m: &mut Options| { &mut m.ack },
611 ));
612 ::protobuf::reflect::MessageDescriptor::new::<Options>(
613 "Options",
614 fields,
615 file_descriptor_proto()
616 )
617 })
618 }
619 }
620
621 fn default_instance() -> &'static Options {
622 static mut instance: ::protobuf::lazy::Lazy<Options> = ::protobuf::lazy::Lazy {
623 lock: ::protobuf::lazy::ONCE_INIT,
624 ptr: 0 as *const Options,
625 };
626 unsafe {
627 instance.get(Options::new)
628 }
629 }
630}
631
632impl ::protobuf::Clear for Options {
633 fn clear(&mut self) {
634 self.extensions.clear();
635 self.ack = ::std::option::Option::None;
636 self.unknown_fields.clear();
637 }
638}
639
640impl ::std::fmt::Debug for Options {
641 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
642 ::protobuf::text_format::fmt(self, f)
643 }
644}
645
646impl ::protobuf::reflect::ProtobufValue for Options {
647 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
648 ::protobuf::reflect::ProtobufValueRef::Message(self)
649 }
650}
651
652#[derive(PartialEq,Clone,Default)]
653pub struct Status {
654 uploading: ::std::option::Option<bool>,
656 downloading: ::std::option::Option<bool>,
657 pub unknown_fields: ::protobuf::UnknownFields,
659 pub cached_size: ::protobuf::CachedSize,
660}
661
662impl<'a> ::std::default::Default for &'a Status {
663 fn default() -> &'a Status {
664 <Status as ::protobuf::Message>::default_instance()
665 }
666}
667
668impl Status {
669 pub fn new() -> Status {
670 ::std::default::Default::default()
671 }
672
673 pub fn get_uploading(&self) -> bool {
677 self.uploading.unwrap_or(false)
678 }
679 pub fn clear_uploading(&mut self) {
680 self.uploading = ::std::option::Option::None;
681 }
682
683 pub fn has_uploading(&self) -> bool {
684 self.uploading.is_some()
685 }
686
687 pub fn set_uploading(&mut self, v: bool) {
689 self.uploading = ::std::option::Option::Some(v);
690 }
691
692 pub fn get_downloading(&self) -> bool {
696 self.downloading.unwrap_or(false)
697 }
698 pub fn clear_downloading(&mut self) {
699 self.downloading = ::std::option::Option::None;
700 }
701
702 pub fn has_downloading(&self) -> bool {
703 self.downloading.is_some()
704 }
705
706 pub fn set_downloading(&mut self, v: bool) {
708 self.downloading = ::std::option::Option::Some(v);
709 }
710}
711
712impl ::protobuf::Message for Status {
713 fn is_initialized(&self) -> bool {
714 true
715 }
716
717 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
718 while !is.eof()? {
719 let (field_number, wire_type) = is.read_tag_unpack()?;
720 match field_number {
721 1 => {
722 if wire_type != ::protobuf::wire_format::WireTypeVarint {
723 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
724 }
725 let tmp = is.read_bool()?;
726 self.uploading = ::std::option::Option::Some(tmp);
727 },
728 2 => {
729 if wire_type != ::protobuf::wire_format::WireTypeVarint {
730 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
731 }
732 let tmp = is.read_bool()?;
733 self.downloading = ::std::option::Option::Some(tmp);
734 },
735 _ => {
736 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
737 },
738 };
739 }
740 ::std::result::Result::Ok(())
741 }
742
743 #[allow(unused_variables)]
745 fn compute_size(&self) -> u32 {
746 let mut my_size = 0;
747 if let Some(v) = self.uploading {
748 my_size += 2;
749 }
750 if let Some(v) = self.downloading {
751 my_size += 2;
752 }
753 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
754 self.cached_size.set(my_size);
755 my_size
756 }
757
758 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
759 if let Some(v) = self.uploading {
760 os.write_bool(1, v)?;
761 }
762 if let Some(v) = self.downloading {
763 os.write_bool(2, v)?;
764 }
765 os.write_unknown_fields(self.get_unknown_fields())?;
766 ::std::result::Result::Ok(())
767 }
768
769 fn get_cached_size(&self) -> u32 {
770 self.cached_size.get()
771 }
772
773 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
774 &self.unknown_fields
775 }
776
777 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
778 &mut self.unknown_fields
779 }
780
781 fn as_any(&self) -> &dyn (::std::any::Any) {
782 self as &dyn (::std::any::Any)
783 }
784 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
785 self as &mut dyn (::std::any::Any)
786 }
787 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
788 self
789 }
790
791 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
792 Self::descriptor_static()
793 }
794
795 fn new() -> Status {
796 Status::new()
797 }
798
799 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
800 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
801 lock: ::protobuf::lazy::ONCE_INIT,
802 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
803 };
804 unsafe {
805 descriptor.get(|| {
806 let mut fields = ::std::vec::Vec::new();
807 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
808 "uploading",
809 |m: &Status| { &m.uploading },
810 |m: &mut Status| { &mut m.uploading },
811 ));
812 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
813 "downloading",
814 |m: &Status| { &m.downloading },
815 |m: &mut Status| { &mut m.downloading },
816 ));
817 ::protobuf::reflect::MessageDescriptor::new::<Status>(
818 "Status",
819 fields,
820 file_descriptor_proto()
821 )
822 })
823 }
824 }
825
826 fn default_instance() -> &'static Status {
827 static mut instance: ::protobuf::lazy::Lazy<Status> = ::protobuf::lazy::Lazy {
828 lock: ::protobuf::lazy::ONCE_INIT,
829 ptr: 0 as *const Status,
830 };
831 unsafe {
832 instance.get(Status::new)
833 }
834 }
835}
836
837impl ::protobuf::Clear for Status {
838 fn clear(&mut self) {
839 self.uploading = ::std::option::Option::None;
840 self.downloading = ::std::option::Option::None;
841 self.unknown_fields.clear();
842 }
843}
844
845impl ::std::fmt::Debug for Status {
846 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
847 ::protobuf::text_format::fmt(self, f)
848 }
849}
850
851impl ::protobuf::reflect::ProtobufValue for Status {
852 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
853 ::protobuf::reflect::ProtobufValueRef::Message(self)
854 }
855}
856
857#[derive(PartialEq,Clone,Default)]
858pub struct Have {
859 start: ::std::option::Option<u64>,
861 length: ::std::option::Option<u64>,
862 bitfield: ::protobuf::SingularField<::std::vec::Vec<u8>>,
863 ack: ::std::option::Option<bool>,
864 pub unknown_fields: ::protobuf::UnknownFields,
866 pub cached_size: ::protobuf::CachedSize,
867}
868
869impl<'a> ::std::default::Default for &'a Have {
870 fn default() -> &'a Have {
871 <Have as ::protobuf::Message>::default_instance()
872 }
873}
874
875impl Have {
876 pub fn new() -> Have {
877 ::std::default::Default::default()
878 }
879
880 pub fn get_start(&self) -> u64 {
884 self.start.unwrap_or(0)
885 }
886 pub fn clear_start(&mut self) {
887 self.start = ::std::option::Option::None;
888 }
889
890 pub fn has_start(&self) -> bool {
891 self.start.is_some()
892 }
893
894 pub fn set_start(&mut self, v: u64) {
896 self.start = ::std::option::Option::Some(v);
897 }
898
899 pub fn get_length(&self) -> u64 {
903 self.length.unwrap_or(1u64)
904 }
905 pub fn clear_length(&mut self) {
906 self.length = ::std::option::Option::None;
907 }
908
909 pub fn has_length(&self) -> bool {
910 self.length.is_some()
911 }
912
913 pub fn set_length(&mut self, v: u64) {
915 self.length = ::std::option::Option::Some(v);
916 }
917
918 pub fn get_bitfield(&self) -> &[u8] {
922 match self.bitfield.as_ref() {
923 Some(v) => &v,
924 None => &[],
925 }
926 }
927 pub fn clear_bitfield(&mut self) {
928 self.bitfield.clear();
929 }
930
931 pub fn has_bitfield(&self) -> bool {
932 self.bitfield.is_some()
933 }
934
935 pub fn set_bitfield(&mut self, v: ::std::vec::Vec<u8>) {
937 self.bitfield = ::protobuf::SingularField::some(v);
938 }
939
940 pub fn mut_bitfield(&mut self) -> &mut ::std::vec::Vec<u8> {
943 if self.bitfield.is_none() {
944 self.bitfield.set_default();
945 }
946 self.bitfield.as_mut().unwrap()
947 }
948
949 pub fn take_bitfield(&mut self) -> ::std::vec::Vec<u8> {
951 self.bitfield.take().unwrap_or_else(|| ::std::vec::Vec::new())
952 }
953
954 pub fn get_ack(&self) -> bool {
958 self.ack.unwrap_or(false)
959 }
960 pub fn clear_ack(&mut self) {
961 self.ack = ::std::option::Option::None;
962 }
963
964 pub fn has_ack(&self) -> bool {
965 self.ack.is_some()
966 }
967
968 pub fn set_ack(&mut self, v: bool) {
970 self.ack = ::std::option::Option::Some(v);
971 }
972}
973
974impl ::protobuf::Message for Have {
975 fn is_initialized(&self) -> bool {
976 if self.start.is_none() {
977 return false;
978 }
979 true
980 }
981
982 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
983 while !is.eof()? {
984 let (field_number, wire_type) = is.read_tag_unpack()?;
985 match field_number {
986 1 => {
987 if wire_type != ::protobuf::wire_format::WireTypeVarint {
988 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
989 }
990 let tmp = is.read_uint64()?;
991 self.start = ::std::option::Option::Some(tmp);
992 },
993 2 => {
994 if wire_type != ::protobuf::wire_format::WireTypeVarint {
995 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
996 }
997 let tmp = is.read_uint64()?;
998 self.length = ::std::option::Option::Some(tmp);
999 },
1000 3 => {
1001 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.bitfield)?;
1002 },
1003 4 => {
1004 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1005 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1006 }
1007 let tmp = is.read_bool()?;
1008 self.ack = ::std::option::Option::Some(tmp);
1009 },
1010 _ => {
1011 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1012 },
1013 };
1014 }
1015 ::std::result::Result::Ok(())
1016 }
1017
1018 #[allow(unused_variables)]
1020 fn compute_size(&self) -> u32 {
1021 let mut my_size = 0;
1022 if let Some(v) = self.start {
1023 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1024 }
1025 if let Some(v) = self.length {
1026 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
1027 }
1028 if let Some(ref v) = self.bitfield.as_ref() {
1029 my_size += ::protobuf::rt::bytes_size(3, &v);
1030 }
1031 if let Some(v) = self.ack {
1032 my_size += 2;
1033 }
1034 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1035 self.cached_size.set(my_size);
1036 my_size
1037 }
1038
1039 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1040 if let Some(v) = self.start {
1041 os.write_uint64(1, v)?;
1042 }
1043 if let Some(v) = self.length {
1044 os.write_uint64(2, v)?;
1045 }
1046 if let Some(ref v) = self.bitfield.as_ref() {
1047 os.write_bytes(3, &v)?;
1048 }
1049 if let Some(v) = self.ack {
1050 os.write_bool(4, v)?;
1051 }
1052 os.write_unknown_fields(self.get_unknown_fields())?;
1053 ::std::result::Result::Ok(())
1054 }
1055
1056 fn get_cached_size(&self) -> u32 {
1057 self.cached_size.get()
1058 }
1059
1060 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1061 &self.unknown_fields
1062 }
1063
1064 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1065 &mut self.unknown_fields
1066 }
1067
1068 fn as_any(&self) -> &dyn (::std::any::Any) {
1069 self as &dyn (::std::any::Any)
1070 }
1071 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1072 self as &mut dyn (::std::any::Any)
1073 }
1074 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1075 self
1076 }
1077
1078 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1079 Self::descriptor_static()
1080 }
1081
1082 fn new() -> Have {
1083 Have::new()
1084 }
1085
1086 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1087 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1088 lock: ::protobuf::lazy::ONCE_INIT,
1089 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1090 };
1091 unsafe {
1092 descriptor.get(|| {
1093 let mut fields = ::std::vec::Vec::new();
1094 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1095 "start",
1096 |m: &Have| { &m.start },
1097 |m: &mut Have| { &mut m.start },
1098 ));
1099 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1100 "length",
1101 |m: &Have| { &m.length },
1102 |m: &mut Have| { &mut m.length },
1103 ));
1104 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
1105 "bitfield",
1106 |m: &Have| { &m.bitfield },
1107 |m: &mut Have| { &mut m.bitfield },
1108 ));
1109 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
1110 "ack",
1111 |m: &Have| { &m.ack },
1112 |m: &mut Have| { &mut m.ack },
1113 ));
1114 ::protobuf::reflect::MessageDescriptor::new::<Have>(
1115 "Have",
1116 fields,
1117 file_descriptor_proto()
1118 )
1119 })
1120 }
1121 }
1122
1123 fn default_instance() -> &'static Have {
1124 static mut instance: ::protobuf::lazy::Lazy<Have> = ::protobuf::lazy::Lazy {
1125 lock: ::protobuf::lazy::ONCE_INIT,
1126 ptr: 0 as *const Have,
1127 };
1128 unsafe {
1129 instance.get(Have::new)
1130 }
1131 }
1132}
1133
1134impl ::protobuf::Clear for Have {
1135 fn clear(&mut self) {
1136 self.start = ::std::option::Option::None;
1137 self.length = ::std::option::Option::None;
1138 self.bitfield.clear();
1139 self.ack = ::std::option::Option::None;
1140 self.unknown_fields.clear();
1141 }
1142}
1143
1144impl ::std::fmt::Debug for Have {
1145 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1146 ::protobuf::text_format::fmt(self, f)
1147 }
1148}
1149
1150impl ::protobuf::reflect::ProtobufValue for Have {
1151 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1152 ::protobuf::reflect::ProtobufValueRef::Message(self)
1153 }
1154}
1155
1156#[derive(PartialEq,Clone,Default)]
1157pub struct Unhave {
1158 start: ::std::option::Option<u64>,
1160 length: ::std::option::Option<u64>,
1161 pub unknown_fields: ::protobuf::UnknownFields,
1163 pub cached_size: ::protobuf::CachedSize,
1164}
1165
1166impl<'a> ::std::default::Default for &'a Unhave {
1167 fn default() -> &'a Unhave {
1168 <Unhave as ::protobuf::Message>::default_instance()
1169 }
1170}
1171
1172impl Unhave {
1173 pub fn new() -> Unhave {
1174 ::std::default::Default::default()
1175 }
1176
1177 pub fn get_start(&self) -> u64 {
1181 self.start.unwrap_or(0)
1182 }
1183 pub fn clear_start(&mut self) {
1184 self.start = ::std::option::Option::None;
1185 }
1186
1187 pub fn has_start(&self) -> bool {
1188 self.start.is_some()
1189 }
1190
1191 pub fn set_start(&mut self, v: u64) {
1193 self.start = ::std::option::Option::Some(v);
1194 }
1195
1196 pub fn get_length(&self) -> u64 {
1200 self.length.unwrap_or(1u64)
1201 }
1202 pub fn clear_length(&mut self) {
1203 self.length = ::std::option::Option::None;
1204 }
1205
1206 pub fn has_length(&self) -> bool {
1207 self.length.is_some()
1208 }
1209
1210 pub fn set_length(&mut self, v: u64) {
1212 self.length = ::std::option::Option::Some(v);
1213 }
1214}
1215
1216impl ::protobuf::Message for Unhave {
1217 fn is_initialized(&self) -> bool {
1218 if self.start.is_none() {
1219 return false;
1220 }
1221 true
1222 }
1223
1224 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1225 while !is.eof()? {
1226 let (field_number, wire_type) = is.read_tag_unpack()?;
1227 match field_number {
1228 1 => {
1229 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1230 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1231 }
1232 let tmp = is.read_uint64()?;
1233 self.start = ::std::option::Option::Some(tmp);
1234 },
1235 2 => {
1236 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1237 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1238 }
1239 let tmp = is.read_uint64()?;
1240 self.length = ::std::option::Option::Some(tmp);
1241 },
1242 _ => {
1243 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1244 },
1245 };
1246 }
1247 ::std::result::Result::Ok(())
1248 }
1249
1250 #[allow(unused_variables)]
1252 fn compute_size(&self) -> u32 {
1253 let mut my_size = 0;
1254 if let Some(v) = self.start {
1255 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1256 }
1257 if let Some(v) = self.length {
1258 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
1259 }
1260 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1261 self.cached_size.set(my_size);
1262 my_size
1263 }
1264
1265 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1266 if let Some(v) = self.start {
1267 os.write_uint64(1, v)?;
1268 }
1269 if let Some(v) = self.length {
1270 os.write_uint64(2, v)?;
1271 }
1272 os.write_unknown_fields(self.get_unknown_fields())?;
1273 ::std::result::Result::Ok(())
1274 }
1275
1276 fn get_cached_size(&self) -> u32 {
1277 self.cached_size.get()
1278 }
1279
1280 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1281 &self.unknown_fields
1282 }
1283
1284 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1285 &mut self.unknown_fields
1286 }
1287
1288 fn as_any(&self) -> &dyn (::std::any::Any) {
1289 self as &dyn (::std::any::Any)
1290 }
1291 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1292 self as &mut dyn (::std::any::Any)
1293 }
1294 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1295 self
1296 }
1297
1298 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1299 Self::descriptor_static()
1300 }
1301
1302 fn new() -> Unhave {
1303 Unhave::new()
1304 }
1305
1306 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1307 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1308 lock: ::protobuf::lazy::ONCE_INIT,
1309 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1310 };
1311 unsafe {
1312 descriptor.get(|| {
1313 let mut fields = ::std::vec::Vec::new();
1314 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1315 "start",
1316 |m: &Unhave| { &m.start },
1317 |m: &mut Unhave| { &mut m.start },
1318 ));
1319 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1320 "length",
1321 |m: &Unhave| { &m.length },
1322 |m: &mut Unhave| { &mut m.length },
1323 ));
1324 ::protobuf::reflect::MessageDescriptor::new::<Unhave>(
1325 "Unhave",
1326 fields,
1327 file_descriptor_proto()
1328 )
1329 })
1330 }
1331 }
1332
1333 fn default_instance() -> &'static Unhave {
1334 static mut instance: ::protobuf::lazy::Lazy<Unhave> = ::protobuf::lazy::Lazy {
1335 lock: ::protobuf::lazy::ONCE_INIT,
1336 ptr: 0 as *const Unhave,
1337 };
1338 unsafe {
1339 instance.get(Unhave::new)
1340 }
1341 }
1342}
1343
1344impl ::protobuf::Clear for Unhave {
1345 fn clear(&mut self) {
1346 self.start = ::std::option::Option::None;
1347 self.length = ::std::option::Option::None;
1348 self.unknown_fields.clear();
1349 }
1350}
1351
1352impl ::std::fmt::Debug for Unhave {
1353 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1354 ::protobuf::text_format::fmt(self, f)
1355 }
1356}
1357
1358impl ::protobuf::reflect::ProtobufValue for Unhave {
1359 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1360 ::protobuf::reflect::ProtobufValueRef::Message(self)
1361 }
1362}
1363
1364#[derive(PartialEq,Clone,Default)]
1365pub struct Want {
1366 start: ::std::option::Option<u64>,
1368 length: ::std::option::Option<u64>,
1369 pub unknown_fields: ::protobuf::UnknownFields,
1371 pub cached_size: ::protobuf::CachedSize,
1372}
1373
1374impl<'a> ::std::default::Default for &'a Want {
1375 fn default() -> &'a Want {
1376 <Want as ::protobuf::Message>::default_instance()
1377 }
1378}
1379
1380impl Want {
1381 pub fn new() -> Want {
1382 ::std::default::Default::default()
1383 }
1384
1385 pub fn get_start(&self) -> u64 {
1389 self.start.unwrap_or(0)
1390 }
1391 pub fn clear_start(&mut self) {
1392 self.start = ::std::option::Option::None;
1393 }
1394
1395 pub fn has_start(&self) -> bool {
1396 self.start.is_some()
1397 }
1398
1399 pub fn set_start(&mut self, v: u64) {
1401 self.start = ::std::option::Option::Some(v);
1402 }
1403
1404 pub fn get_length(&self) -> u64 {
1408 self.length.unwrap_or(0)
1409 }
1410 pub fn clear_length(&mut self) {
1411 self.length = ::std::option::Option::None;
1412 }
1413
1414 pub fn has_length(&self) -> bool {
1415 self.length.is_some()
1416 }
1417
1418 pub fn set_length(&mut self, v: u64) {
1420 self.length = ::std::option::Option::Some(v);
1421 }
1422}
1423
1424impl ::protobuf::Message for Want {
1425 fn is_initialized(&self) -> bool {
1426 if self.start.is_none() {
1427 return false;
1428 }
1429 true
1430 }
1431
1432 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1433 while !is.eof()? {
1434 let (field_number, wire_type) = is.read_tag_unpack()?;
1435 match field_number {
1436 1 => {
1437 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1438 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1439 }
1440 let tmp = is.read_uint64()?;
1441 self.start = ::std::option::Option::Some(tmp);
1442 },
1443 2 => {
1444 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1445 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1446 }
1447 let tmp = is.read_uint64()?;
1448 self.length = ::std::option::Option::Some(tmp);
1449 },
1450 _ => {
1451 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1452 },
1453 };
1454 }
1455 ::std::result::Result::Ok(())
1456 }
1457
1458 #[allow(unused_variables)]
1460 fn compute_size(&self) -> u32 {
1461 let mut my_size = 0;
1462 if let Some(v) = self.start {
1463 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1464 }
1465 if let Some(v) = self.length {
1466 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
1467 }
1468 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1469 self.cached_size.set(my_size);
1470 my_size
1471 }
1472
1473 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1474 if let Some(v) = self.start {
1475 os.write_uint64(1, v)?;
1476 }
1477 if let Some(v) = self.length {
1478 os.write_uint64(2, v)?;
1479 }
1480 os.write_unknown_fields(self.get_unknown_fields())?;
1481 ::std::result::Result::Ok(())
1482 }
1483
1484 fn get_cached_size(&self) -> u32 {
1485 self.cached_size.get()
1486 }
1487
1488 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1489 &self.unknown_fields
1490 }
1491
1492 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1493 &mut self.unknown_fields
1494 }
1495
1496 fn as_any(&self) -> &dyn (::std::any::Any) {
1497 self as &dyn (::std::any::Any)
1498 }
1499 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1500 self as &mut dyn (::std::any::Any)
1501 }
1502 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1503 self
1504 }
1505
1506 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1507 Self::descriptor_static()
1508 }
1509
1510 fn new() -> Want {
1511 Want::new()
1512 }
1513
1514 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1515 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1516 lock: ::protobuf::lazy::ONCE_INIT,
1517 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1518 };
1519 unsafe {
1520 descriptor.get(|| {
1521 let mut fields = ::std::vec::Vec::new();
1522 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1523 "start",
1524 |m: &Want| { &m.start },
1525 |m: &mut Want| { &mut m.start },
1526 ));
1527 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1528 "length",
1529 |m: &Want| { &m.length },
1530 |m: &mut Want| { &mut m.length },
1531 ));
1532 ::protobuf::reflect::MessageDescriptor::new::<Want>(
1533 "Want",
1534 fields,
1535 file_descriptor_proto()
1536 )
1537 })
1538 }
1539 }
1540
1541 fn default_instance() -> &'static Want {
1542 static mut instance: ::protobuf::lazy::Lazy<Want> = ::protobuf::lazy::Lazy {
1543 lock: ::protobuf::lazy::ONCE_INIT,
1544 ptr: 0 as *const Want,
1545 };
1546 unsafe {
1547 instance.get(Want::new)
1548 }
1549 }
1550}
1551
1552impl ::protobuf::Clear for Want {
1553 fn clear(&mut self) {
1554 self.start = ::std::option::Option::None;
1555 self.length = ::std::option::Option::None;
1556 self.unknown_fields.clear();
1557 }
1558}
1559
1560impl ::std::fmt::Debug for Want {
1561 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1562 ::protobuf::text_format::fmt(self, f)
1563 }
1564}
1565
1566impl ::protobuf::reflect::ProtobufValue for Want {
1567 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1568 ::protobuf::reflect::ProtobufValueRef::Message(self)
1569 }
1570}
1571
1572#[derive(PartialEq,Clone,Default)]
1573pub struct Unwant {
1574 start: ::std::option::Option<u64>,
1576 length: ::std::option::Option<u64>,
1577 pub unknown_fields: ::protobuf::UnknownFields,
1579 pub cached_size: ::protobuf::CachedSize,
1580}
1581
1582impl<'a> ::std::default::Default for &'a Unwant {
1583 fn default() -> &'a Unwant {
1584 <Unwant as ::protobuf::Message>::default_instance()
1585 }
1586}
1587
1588impl Unwant {
1589 pub fn new() -> Unwant {
1590 ::std::default::Default::default()
1591 }
1592
1593 pub fn get_start(&self) -> u64 {
1597 self.start.unwrap_or(0)
1598 }
1599 pub fn clear_start(&mut self) {
1600 self.start = ::std::option::Option::None;
1601 }
1602
1603 pub fn has_start(&self) -> bool {
1604 self.start.is_some()
1605 }
1606
1607 pub fn set_start(&mut self, v: u64) {
1609 self.start = ::std::option::Option::Some(v);
1610 }
1611
1612 pub fn get_length(&self) -> u64 {
1616 self.length.unwrap_or(0)
1617 }
1618 pub fn clear_length(&mut self) {
1619 self.length = ::std::option::Option::None;
1620 }
1621
1622 pub fn has_length(&self) -> bool {
1623 self.length.is_some()
1624 }
1625
1626 pub fn set_length(&mut self, v: u64) {
1628 self.length = ::std::option::Option::Some(v);
1629 }
1630}
1631
1632impl ::protobuf::Message for Unwant {
1633 fn is_initialized(&self) -> bool {
1634 if self.start.is_none() {
1635 return false;
1636 }
1637 true
1638 }
1639
1640 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1641 while !is.eof()? {
1642 let (field_number, wire_type) = is.read_tag_unpack()?;
1643 match field_number {
1644 1 => {
1645 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1646 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1647 }
1648 let tmp = is.read_uint64()?;
1649 self.start = ::std::option::Option::Some(tmp);
1650 },
1651 2 => {
1652 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1653 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1654 }
1655 let tmp = is.read_uint64()?;
1656 self.length = ::std::option::Option::Some(tmp);
1657 },
1658 _ => {
1659 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1660 },
1661 };
1662 }
1663 ::std::result::Result::Ok(())
1664 }
1665
1666 #[allow(unused_variables)]
1668 fn compute_size(&self) -> u32 {
1669 let mut my_size = 0;
1670 if let Some(v) = self.start {
1671 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1672 }
1673 if let Some(v) = self.length {
1674 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
1675 }
1676 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1677 self.cached_size.set(my_size);
1678 my_size
1679 }
1680
1681 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1682 if let Some(v) = self.start {
1683 os.write_uint64(1, v)?;
1684 }
1685 if let Some(v) = self.length {
1686 os.write_uint64(2, v)?;
1687 }
1688 os.write_unknown_fields(self.get_unknown_fields())?;
1689 ::std::result::Result::Ok(())
1690 }
1691
1692 fn get_cached_size(&self) -> u32 {
1693 self.cached_size.get()
1694 }
1695
1696 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1697 &self.unknown_fields
1698 }
1699
1700 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1701 &mut self.unknown_fields
1702 }
1703
1704 fn as_any(&self) -> &dyn (::std::any::Any) {
1705 self as &dyn (::std::any::Any)
1706 }
1707 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1708 self as &mut dyn (::std::any::Any)
1709 }
1710 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1711 self
1712 }
1713
1714 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1715 Self::descriptor_static()
1716 }
1717
1718 fn new() -> Unwant {
1719 Unwant::new()
1720 }
1721
1722 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1723 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1724 lock: ::protobuf::lazy::ONCE_INIT,
1725 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1726 };
1727 unsafe {
1728 descriptor.get(|| {
1729 let mut fields = ::std::vec::Vec::new();
1730 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1731 "start",
1732 |m: &Unwant| { &m.start },
1733 |m: &mut Unwant| { &mut m.start },
1734 ));
1735 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1736 "length",
1737 |m: &Unwant| { &m.length },
1738 |m: &mut Unwant| { &mut m.length },
1739 ));
1740 ::protobuf::reflect::MessageDescriptor::new::<Unwant>(
1741 "Unwant",
1742 fields,
1743 file_descriptor_proto()
1744 )
1745 })
1746 }
1747 }
1748
1749 fn default_instance() -> &'static Unwant {
1750 static mut instance: ::protobuf::lazy::Lazy<Unwant> = ::protobuf::lazy::Lazy {
1751 lock: ::protobuf::lazy::ONCE_INIT,
1752 ptr: 0 as *const Unwant,
1753 };
1754 unsafe {
1755 instance.get(Unwant::new)
1756 }
1757 }
1758}
1759
1760impl ::protobuf::Clear for Unwant {
1761 fn clear(&mut self) {
1762 self.start = ::std::option::Option::None;
1763 self.length = ::std::option::Option::None;
1764 self.unknown_fields.clear();
1765 }
1766}
1767
1768impl ::std::fmt::Debug for Unwant {
1769 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1770 ::protobuf::text_format::fmt(self, f)
1771 }
1772}
1773
1774impl ::protobuf::reflect::ProtobufValue for Unwant {
1775 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1776 ::protobuf::reflect::ProtobufValueRef::Message(self)
1777 }
1778}
1779
1780#[derive(PartialEq,Clone,Default)]
1781pub struct Request {
1782 index: ::std::option::Option<u64>,
1784 bytes: ::std::option::Option<u64>,
1785 hash: ::std::option::Option<bool>,
1786 nodes: ::std::option::Option<u64>,
1787 pub unknown_fields: ::protobuf::UnknownFields,
1789 pub cached_size: ::protobuf::CachedSize,
1790}
1791
1792impl<'a> ::std::default::Default for &'a Request {
1793 fn default() -> &'a Request {
1794 <Request as ::protobuf::Message>::default_instance()
1795 }
1796}
1797
1798impl Request {
1799 pub fn new() -> Request {
1800 ::std::default::Default::default()
1801 }
1802
1803 pub fn get_index(&self) -> u64 {
1807 self.index.unwrap_or(0)
1808 }
1809 pub fn clear_index(&mut self) {
1810 self.index = ::std::option::Option::None;
1811 }
1812
1813 pub fn has_index(&self) -> bool {
1814 self.index.is_some()
1815 }
1816
1817 pub fn set_index(&mut self, v: u64) {
1819 self.index = ::std::option::Option::Some(v);
1820 }
1821
1822 pub fn get_bytes(&self) -> u64 {
1826 self.bytes.unwrap_or(0)
1827 }
1828 pub fn clear_bytes(&mut self) {
1829 self.bytes = ::std::option::Option::None;
1830 }
1831
1832 pub fn has_bytes(&self) -> bool {
1833 self.bytes.is_some()
1834 }
1835
1836 pub fn set_bytes(&mut self, v: u64) {
1838 self.bytes = ::std::option::Option::Some(v);
1839 }
1840
1841 pub fn get_hash(&self) -> bool {
1845 self.hash.unwrap_or(false)
1846 }
1847 pub fn clear_hash(&mut self) {
1848 self.hash = ::std::option::Option::None;
1849 }
1850
1851 pub fn has_hash(&self) -> bool {
1852 self.hash.is_some()
1853 }
1854
1855 pub fn set_hash(&mut self, v: bool) {
1857 self.hash = ::std::option::Option::Some(v);
1858 }
1859
1860 pub fn get_nodes(&self) -> u64 {
1864 self.nodes.unwrap_or(0)
1865 }
1866 pub fn clear_nodes(&mut self) {
1867 self.nodes = ::std::option::Option::None;
1868 }
1869
1870 pub fn has_nodes(&self) -> bool {
1871 self.nodes.is_some()
1872 }
1873
1874 pub fn set_nodes(&mut self, v: u64) {
1876 self.nodes = ::std::option::Option::Some(v);
1877 }
1878}
1879
1880impl ::protobuf::Message for Request {
1881 fn is_initialized(&self) -> bool {
1882 if self.index.is_none() {
1883 return false;
1884 }
1885 true
1886 }
1887
1888 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1889 while !is.eof()? {
1890 let (field_number, wire_type) = is.read_tag_unpack()?;
1891 match field_number {
1892 1 => {
1893 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1894 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1895 }
1896 let tmp = is.read_uint64()?;
1897 self.index = ::std::option::Option::Some(tmp);
1898 },
1899 2 => {
1900 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1901 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1902 }
1903 let tmp = is.read_uint64()?;
1904 self.bytes = ::std::option::Option::Some(tmp);
1905 },
1906 3 => {
1907 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1908 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1909 }
1910 let tmp = is.read_bool()?;
1911 self.hash = ::std::option::Option::Some(tmp);
1912 },
1913 4 => {
1914 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1915 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1916 }
1917 let tmp = is.read_uint64()?;
1918 self.nodes = ::std::option::Option::Some(tmp);
1919 },
1920 _ => {
1921 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1922 },
1923 };
1924 }
1925 ::std::result::Result::Ok(())
1926 }
1927
1928 #[allow(unused_variables)]
1930 fn compute_size(&self) -> u32 {
1931 let mut my_size = 0;
1932 if let Some(v) = self.index {
1933 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1934 }
1935 if let Some(v) = self.bytes {
1936 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
1937 }
1938 if let Some(v) = self.hash {
1939 my_size += 2;
1940 }
1941 if let Some(v) = self.nodes {
1942 my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
1943 }
1944 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1945 self.cached_size.set(my_size);
1946 my_size
1947 }
1948
1949 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1950 if let Some(v) = self.index {
1951 os.write_uint64(1, v)?;
1952 }
1953 if let Some(v) = self.bytes {
1954 os.write_uint64(2, v)?;
1955 }
1956 if let Some(v) = self.hash {
1957 os.write_bool(3, v)?;
1958 }
1959 if let Some(v) = self.nodes {
1960 os.write_uint64(4, v)?;
1961 }
1962 os.write_unknown_fields(self.get_unknown_fields())?;
1963 ::std::result::Result::Ok(())
1964 }
1965
1966 fn get_cached_size(&self) -> u32 {
1967 self.cached_size.get()
1968 }
1969
1970 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1971 &self.unknown_fields
1972 }
1973
1974 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1975 &mut self.unknown_fields
1976 }
1977
1978 fn as_any(&self) -> &dyn (::std::any::Any) {
1979 self as &dyn (::std::any::Any)
1980 }
1981 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1982 self as &mut dyn (::std::any::Any)
1983 }
1984 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1985 self
1986 }
1987
1988 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1989 Self::descriptor_static()
1990 }
1991
1992 fn new() -> Request {
1993 Request::new()
1994 }
1995
1996 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1997 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1998 lock: ::protobuf::lazy::ONCE_INIT,
1999 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
2000 };
2001 unsafe {
2002 descriptor.get(|| {
2003 let mut fields = ::std::vec::Vec::new();
2004 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2005 "index",
2006 |m: &Request| { &m.index },
2007 |m: &mut Request| { &mut m.index },
2008 ));
2009 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2010 "bytes",
2011 |m: &Request| { &m.bytes },
2012 |m: &mut Request| { &mut m.bytes },
2013 ));
2014 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
2015 "hash",
2016 |m: &Request| { &m.hash },
2017 |m: &mut Request| { &mut m.hash },
2018 ));
2019 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2020 "nodes",
2021 |m: &Request| { &m.nodes },
2022 |m: &mut Request| { &mut m.nodes },
2023 ));
2024 ::protobuf::reflect::MessageDescriptor::new::<Request>(
2025 "Request",
2026 fields,
2027 file_descriptor_proto()
2028 )
2029 })
2030 }
2031 }
2032
2033 fn default_instance() -> &'static Request {
2034 static mut instance: ::protobuf::lazy::Lazy<Request> = ::protobuf::lazy::Lazy {
2035 lock: ::protobuf::lazy::ONCE_INIT,
2036 ptr: 0 as *const Request,
2037 };
2038 unsafe {
2039 instance.get(Request::new)
2040 }
2041 }
2042}
2043
2044impl ::protobuf::Clear for Request {
2045 fn clear(&mut self) {
2046 self.index = ::std::option::Option::None;
2047 self.bytes = ::std::option::Option::None;
2048 self.hash = ::std::option::Option::None;
2049 self.nodes = ::std::option::Option::None;
2050 self.unknown_fields.clear();
2051 }
2052}
2053
2054impl ::std::fmt::Debug for Request {
2055 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2056 ::protobuf::text_format::fmt(self, f)
2057 }
2058}
2059
2060impl ::protobuf::reflect::ProtobufValue for Request {
2061 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2062 ::protobuf::reflect::ProtobufValueRef::Message(self)
2063 }
2064}
2065
2066#[derive(PartialEq,Clone,Default)]
2067pub struct Cancel {
2068 index: ::std::option::Option<u64>,
2070 bytes: ::std::option::Option<u64>,
2071 hash: ::std::option::Option<bool>,
2072 pub unknown_fields: ::protobuf::UnknownFields,
2074 pub cached_size: ::protobuf::CachedSize,
2075}
2076
2077impl<'a> ::std::default::Default for &'a Cancel {
2078 fn default() -> &'a Cancel {
2079 <Cancel as ::protobuf::Message>::default_instance()
2080 }
2081}
2082
2083impl Cancel {
2084 pub fn new() -> Cancel {
2085 ::std::default::Default::default()
2086 }
2087
2088 pub fn get_index(&self) -> u64 {
2092 self.index.unwrap_or(0)
2093 }
2094 pub fn clear_index(&mut self) {
2095 self.index = ::std::option::Option::None;
2096 }
2097
2098 pub fn has_index(&self) -> bool {
2099 self.index.is_some()
2100 }
2101
2102 pub fn set_index(&mut self, v: u64) {
2104 self.index = ::std::option::Option::Some(v);
2105 }
2106
2107 pub fn get_bytes(&self) -> u64 {
2111 self.bytes.unwrap_or(0)
2112 }
2113 pub fn clear_bytes(&mut self) {
2114 self.bytes = ::std::option::Option::None;
2115 }
2116
2117 pub fn has_bytes(&self) -> bool {
2118 self.bytes.is_some()
2119 }
2120
2121 pub fn set_bytes(&mut self, v: u64) {
2123 self.bytes = ::std::option::Option::Some(v);
2124 }
2125
2126 pub fn get_hash(&self) -> bool {
2130 self.hash.unwrap_or(false)
2131 }
2132 pub fn clear_hash(&mut self) {
2133 self.hash = ::std::option::Option::None;
2134 }
2135
2136 pub fn has_hash(&self) -> bool {
2137 self.hash.is_some()
2138 }
2139
2140 pub fn set_hash(&mut self, v: bool) {
2142 self.hash = ::std::option::Option::Some(v);
2143 }
2144}
2145
2146impl ::protobuf::Message for Cancel {
2147 fn is_initialized(&self) -> bool {
2148 if self.index.is_none() {
2149 return false;
2150 }
2151 true
2152 }
2153
2154 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2155 while !is.eof()? {
2156 let (field_number, wire_type) = is.read_tag_unpack()?;
2157 match field_number {
2158 1 => {
2159 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2160 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2161 }
2162 let tmp = is.read_uint64()?;
2163 self.index = ::std::option::Option::Some(tmp);
2164 },
2165 2 => {
2166 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2167 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2168 }
2169 let tmp = is.read_uint64()?;
2170 self.bytes = ::std::option::Option::Some(tmp);
2171 },
2172 3 => {
2173 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2174 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2175 }
2176 let tmp = is.read_bool()?;
2177 self.hash = ::std::option::Option::Some(tmp);
2178 },
2179 _ => {
2180 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2181 },
2182 };
2183 }
2184 ::std::result::Result::Ok(())
2185 }
2186
2187 #[allow(unused_variables)]
2189 fn compute_size(&self) -> u32 {
2190 let mut my_size = 0;
2191 if let Some(v) = self.index {
2192 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
2193 }
2194 if let Some(v) = self.bytes {
2195 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
2196 }
2197 if let Some(v) = self.hash {
2198 my_size += 2;
2199 }
2200 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2201 self.cached_size.set(my_size);
2202 my_size
2203 }
2204
2205 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2206 if let Some(v) = self.index {
2207 os.write_uint64(1, v)?;
2208 }
2209 if let Some(v) = self.bytes {
2210 os.write_uint64(2, v)?;
2211 }
2212 if let Some(v) = self.hash {
2213 os.write_bool(3, v)?;
2214 }
2215 os.write_unknown_fields(self.get_unknown_fields())?;
2216 ::std::result::Result::Ok(())
2217 }
2218
2219 fn get_cached_size(&self) -> u32 {
2220 self.cached_size.get()
2221 }
2222
2223 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2224 &self.unknown_fields
2225 }
2226
2227 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2228 &mut self.unknown_fields
2229 }
2230
2231 fn as_any(&self) -> &dyn (::std::any::Any) {
2232 self as &dyn (::std::any::Any)
2233 }
2234 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2235 self as &mut dyn (::std::any::Any)
2236 }
2237 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2238 self
2239 }
2240
2241 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2242 Self::descriptor_static()
2243 }
2244
2245 fn new() -> Cancel {
2246 Cancel::new()
2247 }
2248
2249 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2250 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
2251 lock: ::protobuf::lazy::ONCE_INIT,
2252 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
2253 };
2254 unsafe {
2255 descriptor.get(|| {
2256 let mut fields = ::std::vec::Vec::new();
2257 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2258 "index",
2259 |m: &Cancel| { &m.index },
2260 |m: &mut Cancel| { &mut m.index },
2261 ));
2262 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2263 "bytes",
2264 |m: &Cancel| { &m.bytes },
2265 |m: &mut Cancel| { &mut m.bytes },
2266 ));
2267 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
2268 "hash",
2269 |m: &Cancel| { &m.hash },
2270 |m: &mut Cancel| { &mut m.hash },
2271 ));
2272 ::protobuf::reflect::MessageDescriptor::new::<Cancel>(
2273 "Cancel",
2274 fields,
2275 file_descriptor_proto()
2276 )
2277 })
2278 }
2279 }
2280
2281 fn default_instance() -> &'static Cancel {
2282 static mut instance: ::protobuf::lazy::Lazy<Cancel> = ::protobuf::lazy::Lazy {
2283 lock: ::protobuf::lazy::ONCE_INIT,
2284 ptr: 0 as *const Cancel,
2285 };
2286 unsafe {
2287 instance.get(Cancel::new)
2288 }
2289 }
2290}
2291
2292impl ::protobuf::Clear for Cancel {
2293 fn clear(&mut self) {
2294 self.index = ::std::option::Option::None;
2295 self.bytes = ::std::option::Option::None;
2296 self.hash = ::std::option::Option::None;
2297 self.unknown_fields.clear();
2298 }
2299}
2300
2301impl ::std::fmt::Debug for Cancel {
2302 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2303 ::protobuf::text_format::fmt(self, f)
2304 }
2305}
2306
2307impl ::protobuf::reflect::ProtobufValue for Cancel {
2308 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2309 ::protobuf::reflect::ProtobufValueRef::Message(self)
2310 }
2311}
2312
2313#[derive(PartialEq,Clone,Default)]
2314pub struct Data {
2315 index: ::std::option::Option<u64>,
2317 value: ::protobuf::SingularField<::std::vec::Vec<u8>>,
2318 nodes: ::protobuf::RepeatedField<Data_Node>,
2319 signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
2320 pub unknown_fields: ::protobuf::UnknownFields,
2322 pub cached_size: ::protobuf::CachedSize,
2323}
2324
2325impl<'a> ::std::default::Default for &'a Data {
2326 fn default() -> &'a Data {
2327 <Data as ::protobuf::Message>::default_instance()
2328 }
2329}
2330
2331impl Data {
2332 pub fn new() -> Data {
2333 ::std::default::Default::default()
2334 }
2335
2336 pub fn get_index(&self) -> u64 {
2340 self.index.unwrap_or(0)
2341 }
2342 pub fn clear_index(&mut self) {
2343 self.index = ::std::option::Option::None;
2344 }
2345
2346 pub fn has_index(&self) -> bool {
2347 self.index.is_some()
2348 }
2349
2350 pub fn set_index(&mut self, v: u64) {
2352 self.index = ::std::option::Option::Some(v);
2353 }
2354
2355 pub fn get_value(&self) -> &[u8] {
2359 match self.value.as_ref() {
2360 Some(v) => &v,
2361 None => &[],
2362 }
2363 }
2364 pub fn clear_value(&mut self) {
2365 self.value.clear();
2366 }
2367
2368 pub fn has_value(&self) -> bool {
2369 self.value.is_some()
2370 }
2371
2372 pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
2374 self.value = ::protobuf::SingularField::some(v);
2375 }
2376
2377 pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
2380 if self.value.is_none() {
2381 self.value.set_default();
2382 }
2383 self.value.as_mut().unwrap()
2384 }
2385
2386 pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
2388 self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
2389 }
2390
2391 pub fn get_nodes(&self) -> &[Data_Node] {
2395 &self.nodes
2396 }
2397 pub fn clear_nodes(&mut self) {
2398 self.nodes.clear();
2399 }
2400
2401 pub fn set_nodes(&mut self, v: ::protobuf::RepeatedField<Data_Node>) {
2403 self.nodes = v;
2404 }
2405
2406 pub fn mut_nodes(&mut self) -> &mut ::protobuf::RepeatedField<Data_Node> {
2408 &mut self.nodes
2409 }
2410
2411 pub fn take_nodes(&mut self) -> ::protobuf::RepeatedField<Data_Node> {
2413 ::std::mem::replace(&mut self.nodes, ::protobuf::RepeatedField::new())
2414 }
2415
2416 pub fn get_signature(&self) -> &[u8] {
2420 match self.signature.as_ref() {
2421 Some(v) => &v,
2422 None => &[],
2423 }
2424 }
2425 pub fn clear_signature(&mut self) {
2426 self.signature.clear();
2427 }
2428
2429 pub fn has_signature(&self) -> bool {
2430 self.signature.is_some()
2431 }
2432
2433 pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
2435 self.signature = ::protobuf::SingularField::some(v);
2436 }
2437
2438 pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
2441 if self.signature.is_none() {
2442 self.signature.set_default();
2443 }
2444 self.signature.as_mut().unwrap()
2445 }
2446
2447 pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
2449 self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
2450 }
2451}
2452
2453impl ::protobuf::Message for Data {
2454 fn is_initialized(&self) -> bool {
2455 if self.index.is_none() {
2456 return false;
2457 }
2458 for v in &self.nodes {
2459 if !v.is_initialized() {
2460 return false;
2461 }
2462 };
2463 true
2464 }
2465
2466 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2467 while !is.eof()? {
2468 let (field_number, wire_type) = is.read_tag_unpack()?;
2469 match field_number {
2470 1 => {
2471 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2472 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2473 }
2474 let tmp = is.read_uint64()?;
2475 self.index = ::std::option::Option::Some(tmp);
2476 },
2477 2 => {
2478 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.value)?;
2479 },
2480 3 => {
2481 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.nodes)?;
2482 },
2483 4 => {
2484 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?;
2485 },
2486 _ => {
2487 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2488 },
2489 };
2490 }
2491 ::std::result::Result::Ok(())
2492 }
2493
2494 #[allow(unused_variables)]
2496 fn compute_size(&self) -> u32 {
2497 let mut my_size = 0;
2498 if let Some(v) = self.index {
2499 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
2500 }
2501 if let Some(ref v) = self.value.as_ref() {
2502 my_size += ::protobuf::rt::bytes_size(2, &v);
2503 }
2504 for value in &self.nodes {
2505 let len = value.compute_size();
2506 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2507 };
2508 if let Some(ref v) = self.signature.as_ref() {
2509 my_size += ::protobuf::rt::bytes_size(4, &v);
2510 }
2511 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2512 self.cached_size.set(my_size);
2513 my_size
2514 }
2515
2516 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2517 if let Some(v) = self.index {
2518 os.write_uint64(1, v)?;
2519 }
2520 if let Some(ref v) = self.value.as_ref() {
2521 os.write_bytes(2, &v)?;
2522 }
2523 for v in &self.nodes {
2524 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2525 os.write_raw_varint32(v.get_cached_size())?;
2526 v.write_to_with_cached_sizes(os)?;
2527 };
2528 if let Some(ref v) = self.signature.as_ref() {
2529 os.write_bytes(4, &v)?;
2530 }
2531 os.write_unknown_fields(self.get_unknown_fields())?;
2532 ::std::result::Result::Ok(())
2533 }
2534
2535 fn get_cached_size(&self) -> u32 {
2536 self.cached_size.get()
2537 }
2538
2539 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2540 &self.unknown_fields
2541 }
2542
2543 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2544 &mut self.unknown_fields
2545 }
2546
2547 fn as_any(&self) -> &dyn (::std::any::Any) {
2548 self as &dyn (::std::any::Any)
2549 }
2550 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2551 self as &mut dyn (::std::any::Any)
2552 }
2553 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2554 self
2555 }
2556
2557 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2558 Self::descriptor_static()
2559 }
2560
2561 fn new() -> Data {
2562 Data::new()
2563 }
2564
2565 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2566 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
2567 lock: ::protobuf::lazy::ONCE_INIT,
2568 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
2569 };
2570 unsafe {
2571 descriptor.get(|| {
2572 let mut fields = ::std::vec::Vec::new();
2573 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2574 "index",
2575 |m: &Data| { &m.index },
2576 |m: &mut Data| { &mut m.index },
2577 ));
2578 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
2579 "value",
2580 |m: &Data| { &m.value },
2581 |m: &mut Data| { &mut m.value },
2582 ));
2583 fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Data_Node>>(
2584 "nodes",
2585 |m: &Data| { &m.nodes },
2586 |m: &mut Data| { &mut m.nodes },
2587 ));
2588 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
2589 "signature",
2590 |m: &Data| { &m.signature },
2591 |m: &mut Data| { &mut m.signature },
2592 ));
2593 ::protobuf::reflect::MessageDescriptor::new::<Data>(
2594 "Data",
2595 fields,
2596 file_descriptor_proto()
2597 )
2598 })
2599 }
2600 }
2601
2602 fn default_instance() -> &'static Data {
2603 static mut instance: ::protobuf::lazy::Lazy<Data> = ::protobuf::lazy::Lazy {
2604 lock: ::protobuf::lazy::ONCE_INIT,
2605 ptr: 0 as *const Data,
2606 };
2607 unsafe {
2608 instance.get(Data::new)
2609 }
2610 }
2611}
2612
2613impl ::protobuf::Clear for Data {
2614 fn clear(&mut self) {
2615 self.index = ::std::option::Option::None;
2616 self.value.clear();
2617 self.nodes.clear();
2618 self.signature.clear();
2619 self.unknown_fields.clear();
2620 }
2621}
2622
2623impl ::std::fmt::Debug for Data {
2624 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2625 ::protobuf::text_format::fmt(self, f)
2626 }
2627}
2628
2629impl ::protobuf::reflect::ProtobufValue for Data {
2630 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2631 ::protobuf::reflect::ProtobufValueRef::Message(self)
2632 }
2633}
2634
2635#[derive(PartialEq,Clone,Default)]
2636pub struct Data_Node {
2637 index: ::std::option::Option<u64>,
2639 hash: ::protobuf::SingularField<::std::vec::Vec<u8>>,
2640 size: ::std::option::Option<u64>,
2641 pub unknown_fields: ::protobuf::UnknownFields,
2643 pub cached_size: ::protobuf::CachedSize,
2644}
2645
2646impl<'a> ::std::default::Default for &'a Data_Node {
2647 fn default() -> &'a Data_Node {
2648 <Data_Node as ::protobuf::Message>::default_instance()
2649 }
2650}
2651
2652impl Data_Node {
2653 pub fn new() -> Data_Node {
2654 ::std::default::Default::default()
2655 }
2656
2657 pub fn get_index(&self) -> u64 {
2661 self.index.unwrap_or(0)
2662 }
2663 pub fn clear_index(&mut self) {
2664 self.index = ::std::option::Option::None;
2665 }
2666
2667 pub fn has_index(&self) -> bool {
2668 self.index.is_some()
2669 }
2670
2671 pub fn set_index(&mut self, v: u64) {
2673 self.index = ::std::option::Option::Some(v);
2674 }
2675
2676 pub fn get_hash(&self) -> &[u8] {
2680 match self.hash.as_ref() {
2681 Some(v) => &v,
2682 None => &[],
2683 }
2684 }
2685 pub fn clear_hash(&mut self) {
2686 self.hash.clear();
2687 }
2688
2689 pub fn has_hash(&self) -> bool {
2690 self.hash.is_some()
2691 }
2692
2693 pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
2695 self.hash = ::protobuf::SingularField::some(v);
2696 }
2697
2698 pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
2701 if self.hash.is_none() {
2702 self.hash.set_default();
2703 }
2704 self.hash.as_mut().unwrap()
2705 }
2706
2707 pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
2709 self.hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
2710 }
2711
2712 pub fn get_size(&self) -> u64 {
2716 self.size.unwrap_or(0)
2717 }
2718 pub fn clear_size(&mut self) {
2719 self.size = ::std::option::Option::None;
2720 }
2721
2722 pub fn has_size(&self) -> bool {
2723 self.size.is_some()
2724 }
2725
2726 pub fn set_size(&mut self, v: u64) {
2728 self.size = ::std::option::Option::Some(v);
2729 }
2730}
2731
2732impl ::protobuf::Message for Data_Node {
2733 fn is_initialized(&self) -> bool {
2734 if self.index.is_none() {
2735 return false;
2736 }
2737 if self.hash.is_none() {
2738 return false;
2739 }
2740 if self.size.is_none() {
2741 return false;
2742 }
2743 true
2744 }
2745
2746 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2747 while !is.eof()? {
2748 let (field_number, wire_type) = is.read_tag_unpack()?;
2749 match field_number {
2750 1 => {
2751 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2752 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2753 }
2754 let tmp = is.read_uint64()?;
2755 self.index = ::std::option::Option::Some(tmp);
2756 },
2757 2 => {
2758 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hash)?;
2759 },
2760 3 => {
2761 if wire_type != ::protobuf::wire_format::WireTypeVarint {
2762 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
2763 }
2764 let tmp = is.read_uint64()?;
2765 self.size = ::std::option::Option::Some(tmp);
2766 },
2767 _ => {
2768 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2769 },
2770 };
2771 }
2772 ::std::result::Result::Ok(())
2773 }
2774
2775 #[allow(unused_variables)]
2777 fn compute_size(&self) -> u32 {
2778 let mut my_size = 0;
2779 if let Some(v) = self.index {
2780 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
2781 }
2782 if let Some(ref v) = self.hash.as_ref() {
2783 my_size += ::protobuf::rt::bytes_size(2, &v);
2784 }
2785 if let Some(v) = self.size {
2786 my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
2787 }
2788 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2789 self.cached_size.set(my_size);
2790 my_size
2791 }
2792
2793 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2794 if let Some(v) = self.index {
2795 os.write_uint64(1, v)?;
2796 }
2797 if let Some(ref v) = self.hash.as_ref() {
2798 os.write_bytes(2, &v)?;
2799 }
2800 if let Some(v) = self.size {
2801 os.write_uint64(3, v)?;
2802 }
2803 os.write_unknown_fields(self.get_unknown_fields())?;
2804 ::std::result::Result::Ok(())
2805 }
2806
2807 fn get_cached_size(&self) -> u32 {
2808 self.cached_size.get()
2809 }
2810
2811 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2812 &self.unknown_fields
2813 }
2814
2815 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2816 &mut self.unknown_fields
2817 }
2818
2819 fn as_any(&self) -> &dyn (::std::any::Any) {
2820 self as &dyn (::std::any::Any)
2821 }
2822 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2823 self as &mut dyn (::std::any::Any)
2824 }
2825 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2826 self
2827 }
2828
2829 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2830 Self::descriptor_static()
2831 }
2832
2833 fn new() -> Data_Node {
2834 Data_Node::new()
2835 }
2836
2837 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2838 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
2839 lock: ::protobuf::lazy::ONCE_INIT,
2840 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
2841 };
2842 unsafe {
2843 descriptor.get(|| {
2844 let mut fields = ::std::vec::Vec::new();
2845 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2846 "index",
2847 |m: &Data_Node| { &m.index },
2848 |m: &mut Data_Node| { &mut m.index },
2849 ));
2850 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
2851 "hash",
2852 |m: &Data_Node| { &m.hash },
2853 |m: &mut Data_Node| { &mut m.hash },
2854 ));
2855 fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
2856 "size",
2857 |m: &Data_Node| { &m.size },
2858 |m: &mut Data_Node| { &mut m.size },
2859 ));
2860 ::protobuf::reflect::MessageDescriptor::new::<Data_Node>(
2861 "Data_Node",
2862 fields,
2863 file_descriptor_proto()
2864 )
2865 })
2866 }
2867 }
2868
2869 fn default_instance() -> &'static Data_Node {
2870 static mut instance: ::protobuf::lazy::Lazy<Data_Node> = ::protobuf::lazy::Lazy {
2871 lock: ::protobuf::lazy::ONCE_INIT,
2872 ptr: 0 as *const Data_Node,
2873 };
2874 unsafe {
2875 instance.get(Data_Node::new)
2876 }
2877 }
2878}
2879
2880impl ::protobuf::Clear for Data_Node {
2881 fn clear(&mut self) {
2882 self.index = ::std::option::Option::None;
2883 self.hash.clear();
2884 self.size = ::std::option::Option::None;
2885 self.unknown_fields.clear();
2886 }
2887}
2888
2889impl ::std::fmt::Debug for Data_Node {
2890 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2891 ::protobuf::text_format::fmt(self, f)
2892 }
2893}
2894
2895impl ::protobuf::reflect::ProtobufValue for Data_Node {
2896 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2897 ::protobuf::reflect::ProtobufValueRef::Message(self)
2898 }
2899}
2900
2901#[derive(PartialEq,Clone,Default)]
2902pub struct Close {
2903 discoveryKey: ::protobuf::SingularField<::std::vec::Vec<u8>>,
2905 pub unknown_fields: ::protobuf::UnknownFields,
2907 pub cached_size: ::protobuf::CachedSize,
2908}
2909
2910impl<'a> ::std::default::Default for &'a Close {
2911 fn default() -> &'a Close {
2912 <Close as ::protobuf::Message>::default_instance()
2913 }
2914}
2915
2916impl Close {
2917 pub fn new() -> Close {
2918 ::std::default::Default::default()
2919 }
2920
2921 pub fn get_discoveryKey(&self) -> &[u8] {
2925 match self.discoveryKey.as_ref() {
2926 Some(v) => &v,
2927 None => &[],
2928 }
2929 }
2930 pub fn clear_discoveryKey(&mut self) {
2931 self.discoveryKey.clear();
2932 }
2933
2934 pub fn has_discoveryKey(&self) -> bool {
2935 self.discoveryKey.is_some()
2936 }
2937
2938 pub fn set_discoveryKey(&mut self, v: ::std::vec::Vec<u8>) {
2940 self.discoveryKey = ::protobuf::SingularField::some(v);
2941 }
2942
2943 pub fn mut_discoveryKey(&mut self) -> &mut ::std::vec::Vec<u8> {
2946 if self.discoveryKey.is_none() {
2947 self.discoveryKey.set_default();
2948 }
2949 self.discoveryKey.as_mut().unwrap()
2950 }
2951
2952 pub fn take_discoveryKey(&mut self) -> ::std::vec::Vec<u8> {
2954 self.discoveryKey.take().unwrap_or_else(|| ::std::vec::Vec::new())
2955 }
2956}
2957
2958impl ::protobuf::Message for Close {
2959 fn is_initialized(&self) -> bool {
2960 true
2961 }
2962
2963 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2964 while !is.eof()? {
2965 let (field_number, wire_type) = is.read_tag_unpack()?;
2966 match field_number {
2967 1 => {
2968 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.discoveryKey)?;
2969 },
2970 _ => {
2971 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2972 },
2973 };
2974 }
2975 ::std::result::Result::Ok(())
2976 }
2977
2978 #[allow(unused_variables)]
2980 fn compute_size(&self) -> u32 {
2981 let mut my_size = 0;
2982 if let Some(ref v) = self.discoveryKey.as_ref() {
2983 my_size += ::protobuf::rt::bytes_size(1, &v);
2984 }
2985 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2986 self.cached_size.set(my_size);
2987 my_size
2988 }
2989
2990 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2991 if let Some(ref v) = self.discoveryKey.as_ref() {
2992 os.write_bytes(1, &v)?;
2993 }
2994 os.write_unknown_fields(self.get_unknown_fields())?;
2995 ::std::result::Result::Ok(())
2996 }
2997
2998 fn get_cached_size(&self) -> u32 {
2999 self.cached_size.get()
3000 }
3001
3002 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
3003 &self.unknown_fields
3004 }
3005
3006 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
3007 &mut self.unknown_fields
3008 }
3009
3010 fn as_any(&self) -> &dyn (::std::any::Any) {
3011 self as &dyn (::std::any::Any)
3012 }
3013 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3014 self as &mut dyn (::std::any::Any)
3015 }
3016 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
3017 self
3018 }
3019
3020 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
3021 Self::descriptor_static()
3022 }
3023
3024 fn new() -> Close {
3025 Close::new()
3026 }
3027
3028 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
3029 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
3030 lock: ::protobuf::lazy::ONCE_INIT,
3031 ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
3032 };
3033 unsafe {
3034 descriptor.get(|| {
3035 let mut fields = ::std::vec::Vec::new();
3036 fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
3037 "discoveryKey",
3038 |m: &Close| { &m.discoveryKey },
3039 |m: &mut Close| { &mut m.discoveryKey },
3040 ));
3041 ::protobuf::reflect::MessageDescriptor::new::<Close>(
3042 "Close",
3043 fields,
3044 file_descriptor_proto()
3045 )
3046 })
3047 }
3048 }
3049
3050 fn default_instance() -> &'static Close {
3051 static mut instance: ::protobuf::lazy::Lazy<Close> = ::protobuf::lazy::Lazy {
3052 lock: ::protobuf::lazy::ONCE_INIT,
3053 ptr: 0 as *const Close,
3054 };
3055 unsafe {
3056 instance.get(Close::new)
3057 }
3058 }
3059}
3060
3061impl ::protobuf::Clear for Close {
3062 fn clear(&mut self) {
3063 self.discoveryKey.clear();
3064 self.unknown_fields.clear();
3065 }
3066}
3067
3068impl ::std::fmt::Debug for Close {
3069 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3070 ::protobuf::text_format::fmt(self, f)
3071 }
3072}
3073
3074impl ::protobuf::reflect::ProtobufValue for Close {
3075 fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
3076 ::protobuf::reflect::ProtobufValueRef::Message(self)
3077 }
3078}
3079
3080static file_descriptor_proto_data: &'static [u8] = b"\
3081 \n\tlib.proto\x12\0\"!\n\x0cNoisePayload\x12\x0f\n\x05nonce\x18\x01\x20\
3082 \x02(\x0cB\0:\0\"6\n\x04Open\x12\x16\n\x0cdiscoveryKey\x18\x01\x20\x02(\
3083 \x0cB\0\x12\x14\n\ncapability\x18\x02\x20\x01(\x0cB\0:\0\"0\n\x07Options\
3084 \x12\x14\n\nextensions\x18\x01\x20\x03(\tB\0\x12\r\n\x03ack\x18\x02\x20\
3085 \x01(\x08B\0:\0\"6\n\x06Status\x12\x13\n\tuploading\x18\x01\x20\x01(\x08\
3086 B\0\x12\x15\n\x0bdownloading\x18\x02\x20\x01(\x08B\0:\0\"Q\n\x04Have\x12\
3087 \x0f\n\x05start\x18\x01\x20\x02(\x04B\0\x12\x13\n\x06length\x18\x02\x20\
3088 \x01(\x04:\x011B\0\x12\x12\n\x08bitfield\x18\x03\x20\x01(\x0cB\0\x12\r\n\
3089 \x03ack\x18\x04\x20\x01(\x08B\0:\0\"0\n\x06Unhave\x12\x0f\n\x05start\x18\
3090 \x01\x20\x02(\x04B\0\x12\x13\n\x06length\x18\x02\x20\x01(\x04:\x011B\0:\
3091 \0\"+\n\x04Want\x12\x0f\n\x05start\x18\x01\x20\x02(\x04B\0\x12\x10\n\x06\
3092 length\x18\x02\x20\x01(\x04B\0:\0\"-\n\x06Unwant\x12\x0f\n\x05start\x18\
3093 \x01\x20\x02(\x04B\0\x12\x10\n\x06length\x18\x02\x20\x01(\x04B\0:\0\"N\n\
3094 \x07Request\x12\x0f\n\x05index\x18\x01\x20\x02(\x04B\0\x12\x0f\n\x05byte\
3095 s\x18\x02\x20\x01(\x04B\0\x12\x0e\n\x04hash\x18\x03\x20\x01(\x08B\0\x12\
3096 \x0f\n\x05nodes\x18\x04\x20\x01(\x04B\0:\0\"<\n\x06Cancel\x12\x0f\n\x05i\
3097 ndex\x18\x01\x20\x02(\x04B\0\x12\x0f\n\x05bytes\x18\x02\x20\x01(\x04B\0\
3098 \x12\x0e\n\x04hash\x18\x03\x20\x01(\x08B\0:\0\"\x97\x01\n\x04Data\x12\
3099 \x0f\n\x05index\x18\x01\x20\x02(\x04B\0\x12\x0f\n\x05value\x18\x02\x20\
3100 \x01(\x0cB\0\x12\x1b\n\x05nodes\x18\x03\x20\x03(\x0b2\n.Data.NodeB\0\x12\
3101 \x13\n\tsignature\x18\x04\x20\x01(\x0cB\0\x1a9\n\x04Node\x12\x0f\n\x05in\
3102 dex\x18\x01\x20\x02(\x04B\0\x12\x0e\n\x04hash\x18\x02\x20\x02(\x0cB\0\
3103 \x12\x0e\n\x04size\x18\x03\x20\x02(\x04B\0:\0:\0\"!\n\x05Close\x12\x16\n\
3104 \x0cdiscoveryKey\x18\x01\x20\x01(\x0cB\0:\0B\0b\x06proto2\
3105";
3106
3107static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
3108 lock: ::protobuf::lazy::ONCE_INIT,
3109 ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
3110};
3111
3112fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
3113 ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
3114}
3115
3116pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
3117 unsafe {
3118 file_descriptor_proto_lazy.get(|| {
3119 parse_descriptor_proto()
3120 })
3121 }
3122}