mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-31 11:41:21 +00:00
* *: Consolidate protobuf generation scripts * *: Update to rust-protobuf 2.8.1 * *: Mark protobuf generated modules with '_proto'
1265 lines
46 KiB
Rust
1265 lines
46 KiB
Rust
// This file is generated by rust-protobuf 2.8.1. Do not edit
|
|
// @generated
|
|
|
|
// https://github.com/Manishearth/rust-clippy/issues/702
|
|
#![allow(unknown_lints)]
|
|
#![allow(clippy::all)]
|
|
|
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
|
|
|
#![allow(box_pointers)]
|
|
#![allow(dead_code)]
|
|
#![allow(missing_docs)]
|
|
#![allow(non_camel_case_types)]
|
|
#![allow(non_snake_case)]
|
|
#![allow(non_upper_case_globals)]
|
|
#![allow(trivial_casts)]
|
|
#![allow(unsafe_code)]
|
|
#![allow(unused_imports)]
|
|
#![allow(unused_results)]
|
|
//! Generated file from `src/dht.proto`
|
|
|
|
use protobuf::Message as Message_imported_for_functions;
|
|
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
|
|
|
/// Generated files are compatible only with the same version
|
|
/// of protobuf runtime.
|
|
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1;
|
|
|
|
#[derive(PartialEq,Clone,Default)]
|
|
pub struct Record {
|
|
// message fields
|
|
pub key: ::std::vec::Vec<u8>,
|
|
pub value: ::std::vec::Vec<u8>,
|
|
pub timeReceived: ::std::string::String,
|
|
pub publisher: ::std::vec::Vec<u8>,
|
|
pub ttl: u32,
|
|
// special fields
|
|
pub unknown_fields: ::protobuf::UnknownFields,
|
|
pub cached_size: ::protobuf::CachedSize,
|
|
}
|
|
|
|
impl<'a> ::std::default::Default for &'a Record {
|
|
fn default() -> &'a Record {
|
|
<Record as ::protobuf::Message>::default_instance()
|
|
}
|
|
}
|
|
|
|
impl Record {
|
|
pub fn new() -> Record {
|
|
::std::default::Default::default()
|
|
}
|
|
|
|
// bytes key = 1;
|
|
|
|
|
|
pub fn get_key(&self) -> &[u8] {
|
|
&self.key
|
|
}
|
|
pub fn clear_key(&mut self) {
|
|
self.key.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_key(&mut self, v: ::std::vec::Vec<u8>) {
|
|
self.key = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_key(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
&mut self.key
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_key(&mut self) -> ::std::vec::Vec<u8> {
|
|
::std::mem::replace(&mut self.key, ::std::vec::Vec::new())
|
|
}
|
|
|
|
// bytes value = 2;
|
|
|
|
|
|
pub fn get_value(&self) -> &[u8] {
|
|
&self.value
|
|
}
|
|
pub fn clear_value(&mut self) {
|
|
self.value.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
|
|
self.value = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
&mut self.value
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
|
|
::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
|
|
}
|
|
|
|
// string timeReceived = 5;
|
|
|
|
|
|
pub fn get_timeReceived(&self) -> &str {
|
|
&self.timeReceived
|
|
}
|
|
pub fn clear_timeReceived(&mut self) {
|
|
self.timeReceived.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_timeReceived(&mut self, v: ::std::string::String) {
|
|
self.timeReceived = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_timeReceived(&mut self) -> &mut ::std::string::String {
|
|
&mut self.timeReceived
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_timeReceived(&mut self) -> ::std::string::String {
|
|
::std::mem::replace(&mut self.timeReceived, ::std::string::String::new())
|
|
}
|
|
|
|
// bytes publisher = 666;
|
|
|
|
|
|
pub fn get_publisher(&self) -> &[u8] {
|
|
&self.publisher
|
|
}
|
|
pub fn clear_publisher(&mut self) {
|
|
self.publisher.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_publisher(&mut self, v: ::std::vec::Vec<u8>) {
|
|
self.publisher = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_publisher(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
&mut self.publisher
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_publisher(&mut self) -> ::std::vec::Vec<u8> {
|
|
::std::mem::replace(&mut self.publisher, ::std::vec::Vec::new())
|
|
}
|
|
|
|
// uint32 ttl = 777;
|
|
|
|
|
|
pub fn get_ttl(&self) -> u32 {
|
|
self.ttl
|
|
}
|
|
pub fn clear_ttl(&mut self) {
|
|
self.ttl = 0;
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_ttl(&mut self, v: u32) {
|
|
self.ttl = v;
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::Message for Record {
|
|
fn is_initialized(&self) -> bool {
|
|
true
|
|
}
|
|
|
|
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
while !is.eof()? {
|
|
let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
match field_number {
|
|
1 => {
|
|
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?;
|
|
},
|
|
2 => {
|
|
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
|
|
},
|
|
5 => {
|
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.timeReceived)?;
|
|
},
|
|
666 => {
|
|
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.publisher)?;
|
|
},
|
|
777 => {
|
|
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
|
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
|
}
|
|
let tmp = is.read_uint32()?;
|
|
self.ttl = tmp;
|
|
},
|
|
_ => {
|
|
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
},
|
|
};
|
|
}
|
|
::std::result::Result::Ok(())
|
|
}
|
|
|
|
// Compute sizes of nested messages
|
|
#[allow(unused_variables)]
|
|
fn compute_size(&self) -> u32 {
|
|
let mut my_size = 0;
|
|
if !self.key.is_empty() {
|
|
my_size += ::protobuf::rt::bytes_size(1, &self.key);
|
|
}
|
|
if !self.value.is_empty() {
|
|
my_size += ::protobuf::rt::bytes_size(2, &self.value);
|
|
}
|
|
if !self.timeReceived.is_empty() {
|
|
my_size += ::protobuf::rt::string_size(5, &self.timeReceived);
|
|
}
|
|
if !self.publisher.is_empty() {
|
|
my_size += ::protobuf::rt::bytes_size(666, &self.publisher);
|
|
}
|
|
if self.ttl != 0 {
|
|
my_size += ::protobuf::rt::value_size(777, self.ttl, ::protobuf::wire_format::WireTypeVarint);
|
|
}
|
|
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
|
self.cached_size.set(my_size);
|
|
my_size
|
|
}
|
|
|
|
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
if !self.key.is_empty() {
|
|
os.write_bytes(1, &self.key)?;
|
|
}
|
|
if !self.value.is_empty() {
|
|
os.write_bytes(2, &self.value)?;
|
|
}
|
|
if !self.timeReceived.is_empty() {
|
|
os.write_string(5, &self.timeReceived)?;
|
|
}
|
|
if !self.publisher.is_empty() {
|
|
os.write_bytes(666, &self.publisher)?;
|
|
}
|
|
if self.ttl != 0 {
|
|
os.write_uint32(777, self.ttl)?;
|
|
}
|
|
os.write_unknown_fields(self.get_unknown_fields())?;
|
|
::std::result::Result::Ok(())
|
|
}
|
|
|
|
fn get_cached_size(&self) -> u32 {
|
|
self.cached_size.get()
|
|
}
|
|
|
|
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
|
&self.unknown_fields
|
|
}
|
|
|
|
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
|
&mut self.unknown_fields
|
|
}
|
|
|
|
fn as_any(&self) -> &dyn (::std::any::Any) {
|
|
self as &dyn (::std::any::Any)
|
|
}
|
|
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
|
self as &mut dyn (::std::any::Any)
|
|
}
|
|
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
|
self
|
|
}
|
|
|
|
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
Self::descriptor_static()
|
|
}
|
|
|
|
fn new() -> Record {
|
|
Record::new()
|
|
}
|
|
|
|
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
|
};
|
|
unsafe {
|
|
descriptor.get(|| {
|
|
let mut fields = ::std::vec::Vec::new();
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
"key",
|
|
|m: &Record| { &m.key },
|
|
|m: &mut Record| { &mut m.key },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
"value",
|
|
|m: &Record| { &m.value },
|
|
|m: &mut Record| { &mut m.value },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
|
"timeReceived",
|
|
|m: &Record| { &m.timeReceived },
|
|
|m: &mut Record| { &mut m.timeReceived },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
"publisher",
|
|
|m: &Record| { &m.publisher },
|
|
|m: &mut Record| { &mut m.publisher },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
|
|
"ttl",
|
|
|m: &Record| { &m.ttl },
|
|
|m: &mut Record| { &mut m.ttl },
|
|
));
|
|
::protobuf::reflect::MessageDescriptor::new::<Record>(
|
|
"Record",
|
|
fields,
|
|
file_descriptor_proto()
|
|
)
|
|
})
|
|
}
|
|
}
|
|
|
|
fn default_instance() -> &'static Record {
|
|
static mut instance: ::protobuf::lazy::Lazy<Record> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const Record,
|
|
};
|
|
unsafe {
|
|
instance.get(Record::new)
|
|
}
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::Clear for Record {
|
|
fn clear(&mut self) {
|
|
self.key.clear();
|
|
self.value.clear();
|
|
self.timeReceived.clear();
|
|
self.publisher.clear();
|
|
self.ttl = 0;
|
|
self.unknown_fields.clear();
|
|
}
|
|
}
|
|
|
|
impl ::std::fmt::Debug for Record {
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
|
::protobuf::text_format::fmt(self, f)
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::reflect::ProtobufValue for Record {
|
|
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
::protobuf::reflect::ProtobufValueRef::Message(self)
|
|
}
|
|
}
|
|
|
|
#[derive(PartialEq,Clone,Default)]
|
|
pub struct Message {
|
|
// message fields
|
|
pub field_type: Message_MessageType,
|
|
pub clusterLevelRaw: i32,
|
|
pub key: ::std::vec::Vec<u8>,
|
|
pub record: ::protobuf::SingularPtrField<Record>,
|
|
pub closerPeers: ::protobuf::RepeatedField<Message_Peer>,
|
|
pub providerPeers: ::protobuf::RepeatedField<Message_Peer>,
|
|
// special fields
|
|
pub unknown_fields: ::protobuf::UnknownFields,
|
|
pub cached_size: ::protobuf::CachedSize,
|
|
}
|
|
|
|
impl<'a> ::std::default::Default for &'a Message {
|
|
fn default() -> &'a Message {
|
|
<Message as ::protobuf::Message>::default_instance()
|
|
}
|
|
}
|
|
|
|
impl Message {
|
|
pub fn new() -> Message {
|
|
::std::default::Default::default()
|
|
}
|
|
|
|
// .dht.pb.Message.MessageType type = 1;
|
|
|
|
|
|
pub fn get_field_type(&self) -> Message_MessageType {
|
|
self.field_type
|
|
}
|
|
pub fn clear_field_type(&mut self) {
|
|
self.field_type = Message_MessageType::PUT_VALUE;
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_field_type(&mut self, v: Message_MessageType) {
|
|
self.field_type = v;
|
|
}
|
|
|
|
// int32 clusterLevelRaw = 10;
|
|
|
|
|
|
pub fn get_clusterLevelRaw(&self) -> i32 {
|
|
self.clusterLevelRaw
|
|
}
|
|
pub fn clear_clusterLevelRaw(&mut self) {
|
|
self.clusterLevelRaw = 0;
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_clusterLevelRaw(&mut self, v: i32) {
|
|
self.clusterLevelRaw = v;
|
|
}
|
|
|
|
// bytes key = 2;
|
|
|
|
|
|
pub fn get_key(&self) -> &[u8] {
|
|
&self.key
|
|
}
|
|
pub fn clear_key(&mut self) {
|
|
self.key.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_key(&mut self, v: ::std::vec::Vec<u8>) {
|
|
self.key = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_key(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
&mut self.key
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_key(&mut self) -> ::std::vec::Vec<u8> {
|
|
::std::mem::replace(&mut self.key, ::std::vec::Vec::new())
|
|
}
|
|
|
|
// .dht.pb.Record record = 3;
|
|
|
|
|
|
pub fn get_record(&self) -> &Record {
|
|
self.record.as_ref().unwrap_or_else(|| Record::default_instance())
|
|
}
|
|
pub fn clear_record(&mut self) {
|
|
self.record.clear();
|
|
}
|
|
|
|
pub fn has_record(&self) -> bool {
|
|
self.record.is_some()
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_record(&mut self, v: Record) {
|
|
self.record = ::protobuf::SingularPtrField::some(v);
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_record(&mut self) -> &mut Record {
|
|
if self.record.is_none() {
|
|
self.record.set_default();
|
|
}
|
|
self.record.as_mut().unwrap()
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_record(&mut self) -> Record {
|
|
self.record.take().unwrap_or_else(|| Record::new())
|
|
}
|
|
|
|
// repeated .dht.pb.Message.Peer closerPeers = 8;
|
|
|
|
|
|
pub fn get_closerPeers(&self) -> &[Message_Peer] {
|
|
&self.closerPeers
|
|
}
|
|
pub fn clear_closerPeers(&mut self) {
|
|
self.closerPeers.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_closerPeers(&mut self, v: ::protobuf::RepeatedField<Message_Peer>) {
|
|
self.closerPeers = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
pub fn mut_closerPeers(&mut self) -> &mut ::protobuf::RepeatedField<Message_Peer> {
|
|
&mut self.closerPeers
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_closerPeers(&mut self) -> ::protobuf::RepeatedField<Message_Peer> {
|
|
::std::mem::replace(&mut self.closerPeers, ::protobuf::RepeatedField::new())
|
|
}
|
|
|
|
// repeated .dht.pb.Message.Peer providerPeers = 9;
|
|
|
|
|
|
pub fn get_providerPeers(&self) -> &[Message_Peer] {
|
|
&self.providerPeers
|
|
}
|
|
pub fn clear_providerPeers(&mut self) {
|
|
self.providerPeers.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_providerPeers(&mut self, v: ::protobuf::RepeatedField<Message_Peer>) {
|
|
self.providerPeers = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
pub fn mut_providerPeers(&mut self) -> &mut ::protobuf::RepeatedField<Message_Peer> {
|
|
&mut self.providerPeers
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_providerPeers(&mut self) -> ::protobuf::RepeatedField<Message_Peer> {
|
|
::std::mem::replace(&mut self.providerPeers, ::protobuf::RepeatedField::new())
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::Message for Message {
|
|
fn is_initialized(&self) -> bool {
|
|
for v in &self.record {
|
|
if !v.is_initialized() {
|
|
return false;
|
|
}
|
|
};
|
|
for v in &self.closerPeers {
|
|
if !v.is_initialized() {
|
|
return false;
|
|
}
|
|
};
|
|
for v in &self.providerPeers {
|
|
if !v.is_initialized() {
|
|
return false;
|
|
}
|
|
};
|
|
true
|
|
}
|
|
|
|
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
while !is.eof()? {
|
|
let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
match field_number {
|
|
1 => {
|
|
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)?
|
|
},
|
|
10 => {
|
|
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
|
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
|
}
|
|
let tmp = is.read_int32()?;
|
|
self.clusterLevelRaw = tmp;
|
|
},
|
|
2 => {
|
|
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?;
|
|
},
|
|
3 => {
|
|
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.record)?;
|
|
},
|
|
8 => {
|
|
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.closerPeers)?;
|
|
},
|
|
9 => {
|
|
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.providerPeers)?;
|
|
},
|
|
_ => {
|
|
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
},
|
|
};
|
|
}
|
|
::std::result::Result::Ok(())
|
|
}
|
|
|
|
// Compute sizes of nested messages
|
|
#[allow(unused_variables)]
|
|
fn compute_size(&self) -> u32 {
|
|
let mut my_size = 0;
|
|
if self.field_type != Message_MessageType::PUT_VALUE {
|
|
my_size += ::protobuf::rt::enum_size(1, self.field_type);
|
|
}
|
|
if self.clusterLevelRaw != 0 {
|
|
my_size += ::protobuf::rt::value_size(10, self.clusterLevelRaw, ::protobuf::wire_format::WireTypeVarint);
|
|
}
|
|
if !self.key.is_empty() {
|
|
my_size += ::protobuf::rt::bytes_size(2, &self.key);
|
|
}
|
|
if let Some(ref v) = self.record.as_ref() {
|
|
let len = v.compute_size();
|
|
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
|
}
|
|
for value in &self.closerPeers {
|
|
let len = value.compute_size();
|
|
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
|
};
|
|
for value in &self.providerPeers {
|
|
let len = value.compute_size();
|
|
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
|
};
|
|
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
|
self.cached_size.set(my_size);
|
|
my_size
|
|
}
|
|
|
|
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
if self.field_type != Message_MessageType::PUT_VALUE {
|
|
os.write_enum(1, self.field_type.value())?;
|
|
}
|
|
if self.clusterLevelRaw != 0 {
|
|
os.write_int32(10, self.clusterLevelRaw)?;
|
|
}
|
|
if !self.key.is_empty() {
|
|
os.write_bytes(2, &self.key)?;
|
|
}
|
|
if let Some(ref v) = self.record.as_ref() {
|
|
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
|
os.write_raw_varint32(v.get_cached_size())?;
|
|
v.write_to_with_cached_sizes(os)?;
|
|
}
|
|
for v in &self.closerPeers {
|
|
os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
|
os.write_raw_varint32(v.get_cached_size())?;
|
|
v.write_to_with_cached_sizes(os)?;
|
|
};
|
|
for v in &self.providerPeers {
|
|
os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
|
os.write_raw_varint32(v.get_cached_size())?;
|
|
v.write_to_with_cached_sizes(os)?;
|
|
};
|
|
os.write_unknown_fields(self.get_unknown_fields())?;
|
|
::std::result::Result::Ok(())
|
|
}
|
|
|
|
fn get_cached_size(&self) -> u32 {
|
|
self.cached_size.get()
|
|
}
|
|
|
|
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
|
&self.unknown_fields
|
|
}
|
|
|
|
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
|
&mut self.unknown_fields
|
|
}
|
|
|
|
fn as_any(&self) -> &dyn (::std::any::Any) {
|
|
self as &dyn (::std::any::Any)
|
|
}
|
|
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
|
self as &mut dyn (::std::any::Any)
|
|
}
|
|
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
|
self
|
|
}
|
|
|
|
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
Self::descriptor_static()
|
|
}
|
|
|
|
fn new() -> Message {
|
|
Message::new()
|
|
}
|
|
|
|
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
|
};
|
|
unsafe {
|
|
descriptor.get(|| {
|
|
let mut fields = ::std::vec::Vec::new();
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Message_MessageType>>(
|
|
"type",
|
|
|m: &Message| { &m.field_type },
|
|
|m: &mut Message| { &mut m.field_type },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
|
|
"clusterLevelRaw",
|
|
|m: &Message| { &m.clusterLevelRaw },
|
|
|m: &mut Message| { &mut m.clusterLevelRaw },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
"key",
|
|
|m: &Message| { &m.key },
|
|
|m: &mut Message| { &mut m.key },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Record>>(
|
|
"record",
|
|
|m: &Message| { &m.record },
|
|
|m: &mut Message| { &mut m.record },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Message_Peer>>(
|
|
"closerPeers",
|
|
|m: &Message| { &m.closerPeers },
|
|
|m: &mut Message| { &mut m.closerPeers },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Message_Peer>>(
|
|
"providerPeers",
|
|
|m: &Message| { &m.providerPeers },
|
|
|m: &mut Message| { &mut m.providerPeers },
|
|
));
|
|
::protobuf::reflect::MessageDescriptor::new::<Message>(
|
|
"Message",
|
|
fields,
|
|
file_descriptor_proto()
|
|
)
|
|
})
|
|
}
|
|
}
|
|
|
|
fn default_instance() -> &'static Message {
|
|
static mut instance: ::protobuf::lazy::Lazy<Message> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const Message,
|
|
};
|
|
unsafe {
|
|
instance.get(Message::new)
|
|
}
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::Clear for Message {
|
|
fn clear(&mut self) {
|
|
self.field_type = Message_MessageType::PUT_VALUE;
|
|
self.clusterLevelRaw = 0;
|
|
self.key.clear();
|
|
self.record.clear();
|
|
self.closerPeers.clear();
|
|
self.providerPeers.clear();
|
|
self.unknown_fields.clear();
|
|
}
|
|
}
|
|
|
|
impl ::std::fmt::Debug for Message {
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
|
::protobuf::text_format::fmt(self, f)
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::reflect::ProtobufValue for Message {
|
|
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
::protobuf::reflect::ProtobufValueRef::Message(self)
|
|
}
|
|
}
|
|
|
|
#[derive(PartialEq,Clone,Default)]
|
|
pub struct Message_Peer {
|
|
// message fields
|
|
pub id: ::std::vec::Vec<u8>,
|
|
pub addrs: ::protobuf::RepeatedField<::std::vec::Vec<u8>>,
|
|
pub connection: Message_ConnectionType,
|
|
// special fields
|
|
pub unknown_fields: ::protobuf::UnknownFields,
|
|
pub cached_size: ::protobuf::CachedSize,
|
|
}
|
|
|
|
impl<'a> ::std::default::Default for &'a Message_Peer {
|
|
fn default() -> &'a Message_Peer {
|
|
<Message_Peer as ::protobuf::Message>::default_instance()
|
|
}
|
|
}
|
|
|
|
impl Message_Peer {
|
|
pub fn new() -> Message_Peer {
|
|
::std::default::Default::default()
|
|
}
|
|
|
|
// bytes id = 1;
|
|
|
|
|
|
pub fn get_id(&self) -> &[u8] {
|
|
&self.id
|
|
}
|
|
pub fn clear_id(&mut self) {
|
|
self.id.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_id(&mut self, v: ::std::vec::Vec<u8>) {
|
|
self.id = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
// If field is not initialized, it is initialized with default value first.
|
|
pub fn mut_id(&mut self) -> &mut ::std::vec::Vec<u8> {
|
|
&mut self.id
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_id(&mut self) -> ::std::vec::Vec<u8> {
|
|
::std::mem::replace(&mut self.id, ::std::vec::Vec::new())
|
|
}
|
|
|
|
// repeated bytes addrs = 2;
|
|
|
|
|
|
pub fn get_addrs(&self) -> &[::std::vec::Vec<u8>] {
|
|
&self.addrs
|
|
}
|
|
pub fn clear_addrs(&mut self) {
|
|
self.addrs.clear();
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_addrs(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec<u8>>) {
|
|
self.addrs = v;
|
|
}
|
|
|
|
// Mutable pointer to the field.
|
|
pub fn mut_addrs(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
|
|
&mut self.addrs
|
|
}
|
|
|
|
// Take field
|
|
pub fn take_addrs(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
|
|
::std::mem::replace(&mut self.addrs, ::protobuf::RepeatedField::new())
|
|
}
|
|
|
|
// .dht.pb.Message.ConnectionType connection = 3;
|
|
|
|
|
|
pub fn get_connection(&self) -> Message_ConnectionType {
|
|
self.connection
|
|
}
|
|
pub fn clear_connection(&mut self) {
|
|
self.connection = Message_ConnectionType::NOT_CONNECTED;
|
|
}
|
|
|
|
// Param is passed by value, moved
|
|
pub fn set_connection(&mut self, v: Message_ConnectionType) {
|
|
self.connection = v;
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::Message for Message_Peer {
|
|
fn is_initialized(&self) -> bool {
|
|
true
|
|
}
|
|
|
|
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
while !is.eof()? {
|
|
let (field_number, wire_type) = is.read_tag_unpack()?;
|
|
match field_number {
|
|
1 => {
|
|
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.id)?;
|
|
},
|
|
2 => {
|
|
::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.addrs)?;
|
|
},
|
|
3 => {
|
|
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.connection, 3, &mut self.unknown_fields)?
|
|
},
|
|
_ => {
|
|
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
|
},
|
|
};
|
|
}
|
|
::std::result::Result::Ok(())
|
|
}
|
|
|
|
// Compute sizes of nested messages
|
|
#[allow(unused_variables)]
|
|
fn compute_size(&self) -> u32 {
|
|
let mut my_size = 0;
|
|
if !self.id.is_empty() {
|
|
my_size += ::protobuf::rt::bytes_size(1, &self.id);
|
|
}
|
|
for value in &self.addrs {
|
|
my_size += ::protobuf::rt::bytes_size(2, &value);
|
|
};
|
|
if self.connection != Message_ConnectionType::NOT_CONNECTED {
|
|
my_size += ::protobuf::rt::enum_size(3, self.connection);
|
|
}
|
|
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
|
self.cached_size.set(my_size);
|
|
my_size
|
|
}
|
|
|
|
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
|
if !self.id.is_empty() {
|
|
os.write_bytes(1, &self.id)?;
|
|
}
|
|
for v in &self.addrs {
|
|
os.write_bytes(2, &v)?;
|
|
};
|
|
if self.connection != Message_ConnectionType::NOT_CONNECTED {
|
|
os.write_enum(3, self.connection.value())?;
|
|
}
|
|
os.write_unknown_fields(self.get_unknown_fields())?;
|
|
::std::result::Result::Ok(())
|
|
}
|
|
|
|
fn get_cached_size(&self) -> u32 {
|
|
self.cached_size.get()
|
|
}
|
|
|
|
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
|
&self.unknown_fields
|
|
}
|
|
|
|
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
|
&mut self.unknown_fields
|
|
}
|
|
|
|
fn as_any(&self) -> &dyn (::std::any::Any) {
|
|
self as &dyn (::std::any::Any)
|
|
}
|
|
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
|
self as &mut dyn (::std::any::Any)
|
|
}
|
|
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
|
self
|
|
}
|
|
|
|
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
Self::descriptor_static()
|
|
}
|
|
|
|
fn new() -> Message_Peer {
|
|
Message_Peer::new()
|
|
}
|
|
|
|
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
|
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
|
};
|
|
unsafe {
|
|
descriptor.get(|| {
|
|
let mut fields = ::std::vec::Vec::new();
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
"id",
|
|
|m: &Message_Peer| { &m.id },
|
|
|m: &mut Message_Peer| { &mut m.id },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
"addrs",
|
|
|m: &Message_Peer| { &m.addrs },
|
|
|m: &mut Message_Peer| { &mut m.addrs },
|
|
));
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Message_ConnectionType>>(
|
|
"connection",
|
|
|m: &Message_Peer| { &m.connection },
|
|
|m: &mut Message_Peer| { &mut m.connection },
|
|
));
|
|
::protobuf::reflect::MessageDescriptor::new::<Message_Peer>(
|
|
"Message_Peer",
|
|
fields,
|
|
file_descriptor_proto()
|
|
)
|
|
})
|
|
}
|
|
}
|
|
|
|
fn default_instance() -> &'static Message_Peer {
|
|
static mut instance: ::protobuf::lazy::Lazy<Message_Peer> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const Message_Peer,
|
|
};
|
|
unsafe {
|
|
instance.get(Message_Peer::new)
|
|
}
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::Clear for Message_Peer {
|
|
fn clear(&mut self) {
|
|
self.id.clear();
|
|
self.addrs.clear();
|
|
self.connection = Message_ConnectionType::NOT_CONNECTED;
|
|
self.unknown_fields.clear();
|
|
}
|
|
}
|
|
|
|
impl ::std::fmt::Debug for Message_Peer {
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
|
::protobuf::text_format::fmt(self, f)
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::reflect::ProtobufValue for Message_Peer {
|
|
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
::protobuf::reflect::ProtobufValueRef::Message(self)
|
|
}
|
|
}
|
|
|
|
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
|
pub enum Message_MessageType {
|
|
PUT_VALUE = 0,
|
|
GET_VALUE = 1,
|
|
ADD_PROVIDER = 2,
|
|
GET_PROVIDERS = 3,
|
|
FIND_NODE = 4,
|
|
PING = 5,
|
|
}
|
|
|
|
impl ::protobuf::ProtobufEnum for Message_MessageType {
|
|
fn value(&self) -> i32 {
|
|
*self as i32
|
|
}
|
|
|
|
fn from_i32(value: i32) -> ::std::option::Option<Message_MessageType> {
|
|
match value {
|
|
0 => ::std::option::Option::Some(Message_MessageType::PUT_VALUE),
|
|
1 => ::std::option::Option::Some(Message_MessageType::GET_VALUE),
|
|
2 => ::std::option::Option::Some(Message_MessageType::ADD_PROVIDER),
|
|
3 => ::std::option::Option::Some(Message_MessageType::GET_PROVIDERS),
|
|
4 => ::std::option::Option::Some(Message_MessageType::FIND_NODE),
|
|
5 => ::std::option::Option::Some(Message_MessageType::PING),
|
|
_ => ::std::option::Option::None
|
|
}
|
|
}
|
|
|
|
fn values() -> &'static [Self] {
|
|
static values: &'static [Message_MessageType] = &[
|
|
Message_MessageType::PUT_VALUE,
|
|
Message_MessageType::GET_VALUE,
|
|
Message_MessageType::ADD_PROVIDER,
|
|
Message_MessageType::GET_PROVIDERS,
|
|
Message_MessageType::FIND_NODE,
|
|
Message_MessageType::PING,
|
|
];
|
|
values
|
|
}
|
|
|
|
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
|
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
|
};
|
|
unsafe {
|
|
descriptor.get(|| {
|
|
::protobuf::reflect::EnumDescriptor::new("Message_MessageType", file_descriptor_proto())
|
|
})
|
|
}
|
|
}
|
|
}
|
|
|
|
impl ::std::marker::Copy for Message_MessageType {
|
|
}
|
|
|
|
impl ::std::default::Default for Message_MessageType {
|
|
fn default() -> Self {
|
|
Message_MessageType::PUT_VALUE
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::reflect::ProtobufValue for Message_MessageType {
|
|
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
|
}
|
|
}
|
|
|
|
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
|
pub enum Message_ConnectionType {
|
|
NOT_CONNECTED = 0,
|
|
CONNECTED = 1,
|
|
CAN_CONNECT = 2,
|
|
CANNOT_CONNECT = 3,
|
|
}
|
|
|
|
impl ::protobuf::ProtobufEnum for Message_ConnectionType {
|
|
fn value(&self) -> i32 {
|
|
*self as i32
|
|
}
|
|
|
|
fn from_i32(value: i32) -> ::std::option::Option<Message_ConnectionType> {
|
|
match value {
|
|
0 => ::std::option::Option::Some(Message_ConnectionType::NOT_CONNECTED),
|
|
1 => ::std::option::Option::Some(Message_ConnectionType::CONNECTED),
|
|
2 => ::std::option::Option::Some(Message_ConnectionType::CAN_CONNECT),
|
|
3 => ::std::option::Option::Some(Message_ConnectionType::CANNOT_CONNECT),
|
|
_ => ::std::option::Option::None
|
|
}
|
|
}
|
|
|
|
fn values() -> &'static [Self] {
|
|
static values: &'static [Message_ConnectionType] = &[
|
|
Message_ConnectionType::NOT_CONNECTED,
|
|
Message_ConnectionType::CONNECTED,
|
|
Message_ConnectionType::CAN_CONNECT,
|
|
Message_ConnectionType::CANNOT_CONNECT,
|
|
];
|
|
values
|
|
}
|
|
|
|
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
|
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
|
};
|
|
unsafe {
|
|
descriptor.get(|| {
|
|
::protobuf::reflect::EnumDescriptor::new("Message_ConnectionType", file_descriptor_proto())
|
|
})
|
|
}
|
|
}
|
|
}
|
|
|
|
impl ::std::marker::Copy for Message_ConnectionType {
|
|
}
|
|
|
|
impl ::std::default::Default for Message_ConnectionType {
|
|
fn default() -> Self {
|
|
Message_ConnectionType::NOT_CONNECTED
|
|
}
|
|
}
|
|
|
|
impl ::protobuf::reflect::ProtobufValue for Message_ConnectionType {
|
|
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
|
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
|
}
|
|
}
|
|
|
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
|
\n\rsrc/dht.proto\x12\x06dht.pb\"\x86\x01\n\x06Record\x12\x10\n\x03key\
|
|
\x18\x01\x20\x01(\x0cR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\x0cR\
|
|
\x05value\x12\"\n\x0ctimeReceived\x18\x05\x20\x01(\tR\x0ctimeReceived\
|
|
\x12\x1d\n\tpublisher\x18\x9a\x05\x20\x01(\x0cR\tpublisher\x12\x11\n\x03\
|
|
ttl\x18\x89\x06\x20\x01(\rR\x03ttl\"\xc4\x04\n\x07Message\x12/\n\x04type\
|
|
\x18\x01\x20\x01(\x0e2\x1b.dht.pb.Message.MessageTypeR\x04type\x12(\n\
|
|
\x0fclusterLevelRaw\x18\n\x20\x01(\x05R\x0fclusterLevelRaw\x12\x10\n\x03\
|
|
key\x18\x02\x20\x01(\x0cR\x03key\x12&\n\x06record\x18\x03\x20\x01(\x0b2\
|
|
\x0e.dht.pb.RecordR\x06record\x126\n\x0bcloserPeers\x18\x08\x20\x03(\x0b\
|
|
2\x14.dht.pb.Message.PeerR\x0bcloserPeers\x12:\n\rproviderPeers\x18\t\
|
|
\x20\x03(\x0b2\x14.dht.pb.Message.PeerR\rproviderPeers\x1al\n\x04Peer\
|
|
\x12\x0e\n\x02id\x18\x01\x20\x01(\x0cR\x02id\x12\x14\n\x05addrs\x18\x02\
|
|
\x20\x03(\x0cR\x05addrs\x12>\n\nconnection\x18\x03\x20\x01(\x0e2\x1e.dht\
|
|
.pb.Message.ConnectionTypeR\nconnection\"i\n\x0bMessageType\x12\r\n\tPUT\
|
|
_VALUE\x10\0\x12\r\n\tGET_VALUE\x10\x01\x12\x10\n\x0cADD_PROVIDER\x10\
|
|
\x02\x12\x11\n\rGET_PROVIDERS\x10\x03\x12\r\n\tFIND_NODE\x10\x04\x12\x08\
|
|
\n\x04PING\x10\x05\"W\n\x0eConnectionType\x12\x11\n\rNOT_CONNECTED\x10\0\
|
|
\x12\r\n\tCONNECTED\x10\x01\x12\x0f\n\x0bCAN_CONNECT\x10\x02\x12\x12\n\
|
|
\x0eCANNOT_CONNECT\x10\x03J\xbe\x18\n\x06\x12\x04\0\0X\x01\n\x08\n\x01\
|
|
\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x01\x08\x0e\nX\n\x02\x04\0\
|
|
\x12\x04\x05\0\x1c\x01\x1aL\x20Record\x20represents\x20a\x20dht\x20recor\
|
|
d\x20that\x20contains\x20a\x20value\n\x20for\x20a\x20key\x20value\x20pai\
|
|
r\n\n\n\n\x03\x04\0\x01\x12\x03\x05\x08\x0e\n2\n\x04\x04\0\x02\0\x12\x03\
|
|
\x07\x08\x16\x1a%\x20The\x20key\x20that\x20references\x20this\x20record\
|
|
\n\n\r\n\x05\x04\0\x02\0\x04\x12\x04\x07\x08\x05\x10\n\x0c\n\x05\x04\0\
|
|
\x02\0\x05\x12\x03\x07\x08\r\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x07\x0e\
|
|
\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x07\x14\x15\n6\n\x04\x04\0\x02\
|
|
\x01\x12\x03\n\x08\x18\x1a)\x20The\x20actual\x20value\x20this\x20record\
|
|
\x20is\x20storing\n\n\r\n\x05\x04\0\x02\x01\x04\x12\x04\n\x08\x07\x16\n\
|
|
\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\n\x08\r\n\x0c\n\x05\x04\0\x02\x01\
|
|
\x01\x12\x03\n\x0e\x13\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\n\x16\x17\n\
|
|
\xfc\x01\n\x04\x04\0\x02\x02\x12\x03\x13\x08\x20\x1a/\x20Time\x20the\x20\
|
|
record\x20was\x20received,\x20set\x20by\x20receiver\n2\xbd\x01\x20Note:\
|
|
\x20These\x20fields\x20were\x20removed\x20from\x20the\x20Record\x20messa\
|
|
ge\n\x20hash\x20of\x20the\x20authors\x20public\x20key\noptional\x20strin\
|
|
g\x20author\x20=\x203;\n\x20A\x20PKI\x20signature\x20for\x20the\x20key+v\
|
|
alue+author\noptional\x20bytes\x20signature\x20=\x204;\n\n\r\n\x05\x04\0\
|
|
\x02\x02\x04\x12\x04\x13\x08\n\x18\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\
|
|
\x13\x08\x0e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x13\x0f\x1b\n\x0c\n\
|
|
\x05\x04\0\x02\x02\x03\x12\x03\x13\x1e\x1f\nX\n\x04\x04\0\x02\x03\x12\
|
|
\x03\x17\x04\x1a\x1aK\x20The\x20original\x20publisher\x20of\x20the\x20re\
|
|
cord.\n\x20Currently\x20specific\x20to\x20rust-libp2p.\n\n\r\n\x05\x04\0\
|
|
\x02\x03\x04\x12\x04\x17\x04\x13\x20\n\x0c\n\x05\x04\0\x02\x03\x05\x12\
|
|
\x03\x17\x04\t\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x17\n\x13\n\x0c\n\
|
|
\x05\x04\0\x02\x03\x03\x12\x03\x17\x16\x19\n_\n\x04\x04\0\x02\x04\x12\
|
|
\x03\x1b\x04\x15\x1aR\x20The\x20remaining\x20TTL\x20of\x20the\x20record,\
|
|
\x20in\x20seconds.\n\x20Currently\x20specific\x20to\x20rust-libp2p.\n\n\
|
|
\r\n\x05\x04\0\x02\x04\x04\x12\x04\x1b\x04\x17\x1a\n\x0c\n\x05\x04\0\x02\
|
|
\x04\x05\x12\x03\x1b\x04\n\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x1b\x0b\
|
|
\x0e\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x1b\x11\x14\n\n\n\x02\x04\x01\
|
|
\x12\x04\x1e\0X\x01\n\n\n\x03\x04\x01\x01\x12\x03\x1e\x08\x0f\n\x0c\n\
|
|
\x04\x04\x01\x04\0\x12\x04\x1f\x08&\t\n\x0c\n\x05\x04\x01\x04\0\x01\x12\
|
|
\x03\x1f\r\x18\n\r\n\x06\x04\x01\x04\0\x02\0\x12\x03\x20\x10\x1e\n\x0e\n\
|
|
\x07\x04\x01\x04\0\x02\0\x01\x12\x03\x20\x10\x19\n\x0e\n\x07\x04\x01\x04\
|
|
\0\x02\0\x02\x12\x03\x20\x1c\x1d\n\r\n\x06\x04\x01\x04\0\x02\x01\x12\x03\
|
|
!\x10\x1e\n\x0e\n\x07\x04\x01\x04\0\x02\x01\x01\x12\x03!\x10\x19\n\x0e\n\
|
|
\x07\x04\x01\x04\0\x02\x01\x02\x12\x03!\x1c\x1d\n\r\n\x06\x04\x01\x04\0\
|
|
\x02\x02\x12\x03\"\x10!\n\x0e\n\x07\x04\x01\x04\0\x02\x02\x01\x12\x03\"\
|
|
\x10\x1c\n\x0e\n\x07\x04\x01\x04\0\x02\x02\x02\x12\x03\"\x1f\x20\n\r\n\
|
|
\x06\x04\x01\x04\0\x02\x03\x12\x03#\x10\"\n\x0e\n\x07\x04\x01\x04\0\x02\
|
|
\x03\x01\x12\x03#\x10\x1d\n\x0e\n\x07\x04\x01\x04\0\x02\x03\x02\x12\x03#\
|
|
\x20!\n\r\n\x06\x04\x01\x04\0\x02\x04\x12\x03$\x10\x1e\n\x0e\n\x07\x04\
|
|
\x01\x04\0\x02\x04\x01\x12\x03$\x10\x19\n\x0e\n\x07\x04\x01\x04\0\x02\
|
|
\x04\x02\x12\x03$\x1c\x1d\n\r\n\x06\x04\x01\x04\0\x02\x05\x12\x03%\x10\
|
|
\x19\n\x0e\n\x07\x04\x01\x04\0\x02\x05\x01\x12\x03%\x10\x14\n\x0e\n\x07\
|
|
\x04\x01\x04\0\x02\x05\x02\x12\x03%\x17\x18\n\x0c\n\x04\x04\x01\x04\x01\
|
|
\x12\x04(\x085\t\n\x0c\n\x05\x04\x01\x04\x01\x01\x12\x03(\r\x1b\n^\n\x06\
|
|
\x04\x01\x04\x01\x02\0\x12\x03*\x10\"\x1aO\x20sender\x20does\x20not\x20h\
|
|
ave\x20a\x20connection\x20to\x20peer,\x20and\x20no\x20extra\x20informati\
|
|
on\x20(default)\n\n\x0e\n\x07\x04\x01\x04\x01\x02\0\x01\x12\x03*\x10\x1d\
|
|
\n\x0e\n\x07\x04\x01\x04\x01\x02\0\x02\x12\x03*\x20!\n5\n\x06\x04\x01\
|
|
\x04\x01\x02\x01\x12\x03-\x10\x1e\x1a&\x20sender\x20has\x20a\x20live\x20\
|
|
connection\x20to\x20peer\n\n\x0e\n\x07\x04\x01\x04\x01\x02\x01\x01\x12\
|
|
\x03-\x10\x19\n\x0e\n\x07\x04\x01\x04\x01\x02\x01\x02\x12\x03-\x1c\x1d\n\
|
|
2\n\x06\x04\x01\x04\x01\x02\x02\x12\x030\x10\x20\x1a#\x20sender\x20recen\
|
|
tly\x20connected\x20to\x20peer\n\n\x0e\n\x07\x04\x01\x04\x01\x02\x02\x01\
|
|
\x12\x030\x10\x1b\n\x0e\n\x07\x04\x01\x04\x01\x02\x02\x02\x12\x030\x1e\
|
|
\x1f\n\xa7\x01\n\x06\x04\x01\x04\x01\x02\x03\x12\x034\x10#\x1a\x97\x01\
|
|
\x20sender\x20recently\x20tried\x20to\x20connect\x20to\x20peer\x20repeat\
|
|
edly\x20but\x20failed\x20to\x20connect\n\x20(\"try\"\x20here\x20is\x20lo\
|
|
ose,\x20but\x20this\x20should\x20signal\x20\"made\x20strong\x20effort,\
|
|
\x20failed\")\n\n\x0e\n\x07\x04\x01\x04\x01\x02\x03\x01\x12\x034\x10\x1e\
|
|
\n\x0e\n\x07\x04\x01\x04\x01\x02\x03\x02\x12\x034!\"\n\x0c\n\x04\x04\x01\
|
|
\x03\0\x12\x047\x08@\t\n\x0c\n\x05\x04\x01\x03\0\x01\x12\x037\x10\x14\n$\
|
|
\n\x06\x04\x01\x03\0\x02\0\x12\x039\x10\x1d\x1a\x15\x20ID\x20of\x20a\x20\
|
|
given\x20peer.\n\n\x0f\n\x07\x04\x01\x03\0\x02\0\x04\x12\x049\x107\x16\n\
|
|
\x0e\n\x07\x04\x01\x03\0\x02\0\x05\x12\x039\x10\x15\n\x0e\n\x07\x04\x01\
|
|
\x03\0\x02\0\x01\x12\x039\x16\x18\n\x0e\n\x07\x04\x01\x03\0\x02\0\x03\
|
|
\x12\x039\x1b\x1c\n,\n\x06\x04\x01\x03\0\x02\x01\x12\x03<\x10)\x1a\x1d\
|
|
\x20multiaddrs\x20for\x20a\x20given\x20peer\n\n\x0e\n\x07\x04\x01\x03\0\
|
|
\x02\x01\x04\x12\x03<\x10\x18\n\x0e\n\x07\x04\x01\x03\0\x02\x01\x05\x12\
|
|
\x03<\x19\x1e\n\x0e\n\x07\x04\x01\x03\0\x02\x01\x01\x12\x03<\x1f$\n\x0e\
|
|
\n\x07\x04\x01\x03\0\x02\x01\x03\x12\x03<'(\nP\n\x06\x04\x01\x03\0\x02\
|
|
\x02\x12\x03?\x10.\x1aA\x20used\x20to\x20signal\x20the\x20sender's\x20co\
|
|
nnection\x20capabilities\x20to\x20the\x20peer\n\n\x0f\n\x07\x04\x01\x03\
|
|
\0\x02\x02\x04\x12\x04?\x10<)\n\x0e\n\x07\x04\x01\x03\0\x02\x02\x06\x12\
|
|
\x03?\x10\x1e\n\x0e\n\x07\x04\x01\x03\0\x02\x02\x01\x12\x03?\x1f)\n\x0e\
|
|
\n\x07\x04\x01\x03\0\x02\x02\x03\x12\x03?,-\n2\n\x04\x04\x01\x02\0\x12\
|
|
\x03C\x08\x1d\x1a%\x20defines\x20what\x20type\x20of\x20message\x20it\x20\
|
|
is.\n\n\r\n\x05\x04\x01\x02\0\x04\x12\x04C\x08@\t\n\x0c\n\x05\x04\x01\
|
|
\x02\0\x06\x12\x03C\x08\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03C\x14\
|
|
\x18\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03C\x1b\x1c\n\x9f\x01\n\x04\x04\
|
|
\x01\x02\x01\x12\x03G\x08#\x1a\x85\x01\x20defines\x20what\x20coral\x20cl\
|
|
uster\x20level\x20this\x20query/response\x20belongs\x20to.\n\x20in\x20ca\
|
|
se\x20we\x20want\x20to\x20implement\x20coral's\x20cluster\x20rings\x20in\
|
|
\x20the\x20future.\n\"\n\x20NOT\x20USED\n\n\r\n\x05\x04\x01\x02\x01\x04\
|
|
\x12\x04G\x08C\x1d\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03G\x08\r\n\x0c\
|
|
\n\x05\x04\x01\x02\x01\x01\x12\x03G\x0e\x1d\n\x0c\n\x05\x04\x01\x02\x01\
|
|
\x03\x12\x03G\x20\"\nw\n\x04\x04\x01\x02\x02\x12\x03K\x08\x16\x1aj\x20Us\
|
|
ed\x20to\x20specify\x20the\x20key\x20associated\x20with\x20this\x20messa\
|
|
ge.\n\x20PUT_VALUE,\x20GET_VALUE,\x20ADD_PROVIDER,\x20GET_PROVIDERS\n\n\
|
|
\r\n\x05\x04\x01\x02\x02\x04\x12\x04K\x08G#\n\x0c\n\x05\x04\x01\x02\x02\
|
|
\x05\x12\x03K\x08\r\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03K\x0e\x11\n\
|
|
\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03K\x14\x15\n;\n\x04\x04\x01\x02\x03\
|
|
\x12\x03O\x08\x1a\x1a.\x20Used\x20to\x20return\x20a\x20value\n\x20PUT_VA\
|
|
LUE,\x20GET_VALUE\n\n\r\n\x05\x04\x01\x02\x03\x04\x12\x04O\x08K\x16\n\
|
|
\x0c\n\x05\x04\x01\x02\x03\x06\x12\x03O\x08\x0e\n\x0c\n\x05\x04\x01\x02\
|
|
\x03\x01\x12\x03O\x0f\x15\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03O\x18\
|
|
\x19\nc\n\x04\x04\x01\x02\x04\x12\x03S\x08&\x1aV\x20Used\x20to\x20return\
|
|
\x20peers\x20closer\x20to\x20a\x20key\x20in\x20a\x20query\n\x20GET_VALUE\
|
|
,\x20GET_PROVIDERS,\x20FIND_NODE\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\
|
|
\x03S\x08\x10\n\x0c\n\x05\x04\x01\x02\x04\x06\x12\x03S\x11\x15\n\x0c\n\
|
|
\x05\x04\x01\x02\x04\x01\x12\x03S\x16!\n\x0c\n\x05\x04\x01\x02\x04\x03\
|
|
\x12\x03S$%\nO\n\x04\x04\x01\x02\x05\x12\x03W\x08(\x1aB\x20Used\x20to\
|
|
\x20return\x20Providers\n\x20GET_VALUE,\x20ADD_PROVIDER,\x20GET_PROVIDER\
|
|
S\n\n\x0c\n\x05\x04\x01\x02\x05\x04\x12\x03W\x08\x10\n\x0c\n\x05\x04\x01\
|
|
\x02\x05\x06\x12\x03W\x11\x15\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03W\
|
|
\x16#\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03W&'b\x06proto3\
|
|
";
|
|
|
|
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
|
lock: ::protobuf::lazy::ONCE_INIT,
|
|
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
|
};
|
|
|
|
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
|
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
|
}
|
|
|
|
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
|
unsafe {
|
|
file_descriptor_proto_lazy.get(|| {
|
|
parse_descriptor_proto()
|
|
})
|
|
}
|
|
}
|