mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-08-01 01:11:58 +00:00
Fix protobuf again (#269)
This commit is contained in:
@@ -13,7 +13,7 @@ libp2p-core = { path = "../core" }
|
||||
log = "0.4.1"
|
||||
multiaddr = { path = "../multiaddr" }
|
||||
parking_lot = "0.5.3"
|
||||
protobuf = "2"
|
||||
protobuf = "1"
|
||||
smallvec = "0.6.0"
|
||||
tokio-io = "0.1"
|
||||
varint = { path = "../varint-rs" }
|
||||
|
@@ -5,7 +5,7 @@
|
||||
docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \
|
||||
apt-get update; \
|
||||
apt-get install -y protobuf-compiler; \
|
||||
cargo install protobuf; \
|
||||
cargo install --version 1 protobuf; \
|
||||
protoc --rust_out . rpc.proto"
|
||||
|
||||
mv -f rpc.rs ./src/rpc_proto.rs
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// This file is generated by rust-protobuf 2.0.0. Do not edit
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
@@ -31,11 +31,24 @@ pub struct RPC {
|
||||
cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
// see codegen.rs for the explanation why impl Sync explicitly
|
||||
unsafe impl ::std::marker::Sync for RPC {}
|
||||
|
||||
impl RPC {
|
||||
pub fn new() -> RPC {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
pub fn default_instance() -> &'static RPC {
|
||||
static mut instance: ::protobuf::lazy::Lazy<RPC> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const RPC,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(RPC::new)
|
||||
}
|
||||
}
|
||||
|
||||
// repeated .floodsub.pb.RPC.SubOpts subscriptions = 1;
|
||||
|
||||
pub fn clear_subscriptions(&mut self) {
|
||||
@@ -61,6 +74,14 @@ impl RPC {
|
||||
&self.subscriptions
|
||||
}
|
||||
|
||||
fn get_subscriptions_for_reflect(&self) -> &::protobuf::RepeatedField<RPC_SubOpts> {
|
||||
&self.subscriptions
|
||||
}
|
||||
|
||||
fn mut_subscriptions_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<RPC_SubOpts> {
|
||||
&mut self.subscriptions
|
||||
}
|
||||
|
||||
// repeated .floodsub.pb.Message publish = 2;
|
||||
|
||||
pub fn clear_publish(&mut self) {
|
||||
@@ -85,6 +106,14 @@ impl RPC {
|
||||
pub fn get_publish(&self) -> &[Message] {
|
||||
&self.publish
|
||||
}
|
||||
|
||||
fn get_publish_for_reflect(&self) -> &::protobuf::RepeatedField<Message> {
|
||||
&self.publish
|
||||
}
|
||||
|
||||
fn mut_publish_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<Message> {
|
||||
&mut self.publish
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for RPC {
|
||||
@@ -175,14 +204,16 @@ impl ::protobuf::Message for RPC {
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
::protobuf::MessageStatic::descriptor_static(None::<Self>)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::MessageStatic for RPC {
|
||||
fn new() -> RPC {
|
||||
RPC::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
fn descriptor_static(_: ::std::option::Option<RPC>) -> &'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,
|
||||
@@ -192,13 +223,13 @@ impl ::protobuf::Message for RPC {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RPC_SubOpts>>(
|
||||
"subscriptions",
|
||||
|m: &RPC| { &m.subscriptions },
|
||||
|m: &mut RPC| { &mut m.subscriptions },
|
||||
RPC::get_subscriptions_for_reflect,
|
||||
RPC::mut_subscriptions_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Message>>(
|
||||
"publish",
|
||||
|m: &RPC| { &m.publish },
|
||||
|m: &mut RPC| { &mut m.publish },
|
||||
RPC::get_publish_for_reflect,
|
||||
RPC::mut_publish_for_reflect,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<RPC>(
|
||||
"RPC",
|
||||
@@ -208,16 +239,6 @@ impl ::protobuf::Message for RPC {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static RPC {
|
||||
static mut instance: ::protobuf::lazy::Lazy<RPC> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const RPC,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(RPC::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for RPC {
|
||||
@@ -250,11 +271,24 @@ pub struct RPC_SubOpts {
|
||||
cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
// see codegen.rs for the explanation why impl Sync explicitly
|
||||
unsafe impl ::std::marker::Sync for RPC_SubOpts {}
|
||||
|
||||
impl RPC_SubOpts {
|
||||
pub fn new() -> RPC_SubOpts {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
pub fn default_instance() -> &'static RPC_SubOpts {
|
||||
static mut instance: ::protobuf::lazy::Lazy<RPC_SubOpts> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const RPC_SubOpts,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(RPC_SubOpts::new)
|
||||
}
|
||||
}
|
||||
|
||||
// optional bool subscribe = 1;
|
||||
|
||||
pub fn clear_subscribe(&mut self) {
|
||||
@@ -274,6 +308,14 @@ impl RPC_SubOpts {
|
||||
self.subscribe.unwrap_or(false)
|
||||
}
|
||||
|
||||
fn get_subscribe_for_reflect(&self) -> &::std::option::Option<bool> {
|
||||
&self.subscribe
|
||||
}
|
||||
|
||||
fn mut_subscribe_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
|
||||
&mut self.subscribe
|
||||
}
|
||||
|
||||
// optional string topicid = 2;
|
||||
|
||||
pub fn clear_topicid(&mut self) {
|
||||
@@ -309,6 +351,14 @@ impl RPC_SubOpts {
|
||||
None => "",
|
||||
}
|
||||
}
|
||||
|
||||
fn get_topicid_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
|
||||
&self.topicid
|
||||
}
|
||||
|
||||
fn mut_topicid_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
|
||||
&mut self.topicid
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for RPC_SubOpts {
|
||||
@@ -387,14 +437,16 @@ impl ::protobuf::Message for RPC_SubOpts {
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
::protobuf::MessageStatic::descriptor_static(None::<Self>)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::MessageStatic for RPC_SubOpts {
|
||||
fn new() -> RPC_SubOpts {
|
||||
RPC_SubOpts::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
fn descriptor_static(_: ::std::option::Option<RPC_SubOpts>) -> &'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,
|
||||
@@ -404,13 +456,13 @@ impl ::protobuf::Message for RPC_SubOpts {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
|
||||
"subscribe",
|
||||
|m: &RPC_SubOpts| { &m.subscribe },
|
||||
|m: &mut RPC_SubOpts| { &mut m.subscribe },
|
||||
RPC_SubOpts::get_subscribe_for_reflect,
|
||||
RPC_SubOpts::mut_subscribe_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"topicid",
|
||||
|m: &RPC_SubOpts| { &m.topicid },
|
||||
|m: &mut RPC_SubOpts| { &mut m.topicid },
|
||||
RPC_SubOpts::get_topicid_for_reflect,
|
||||
RPC_SubOpts::mut_topicid_for_reflect,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<RPC_SubOpts>(
|
||||
"RPC_SubOpts",
|
||||
@@ -420,16 +472,6 @@ impl ::protobuf::Message for RPC_SubOpts {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static RPC_SubOpts {
|
||||
static mut instance: ::protobuf::lazy::Lazy<RPC_SubOpts> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const RPC_SubOpts,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(RPC_SubOpts::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for RPC_SubOpts {
|
||||
@@ -464,11 +506,24 @@ pub struct Message {
|
||||
cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
// see codegen.rs for the explanation why impl Sync explicitly
|
||||
unsafe impl ::std::marker::Sync for Message {}
|
||||
|
||||
impl Message {
|
||||
pub fn new() -> Message {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
pub 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)
|
||||
}
|
||||
}
|
||||
|
||||
// optional bytes from = 1;
|
||||
|
||||
pub fn clear_from(&mut self) {
|
||||
@@ -505,6 +560,14 @@ impl Message {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_from_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
|
||||
&self.from
|
||||
}
|
||||
|
||||
fn mut_from_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
|
||||
&mut self.from
|
||||
}
|
||||
|
||||
// optional bytes data = 2;
|
||||
|
||||
pub fn clear_data(&mut self) {
|
||||
@@ -541,6 +604,14 @@ impl Message {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_data_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
|
||||
&self.data
|
||||
}
|
||||
|
||||
fn mut_data_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
|
||||
&mut self.data
|
||||
}
|
||||
|
||||
// optional bytes seqno = 3;
|
||||
|
||||
pub fn clear_seqno(&mut self) {
|
||||
@@ -577,6 +648,14 @@ impl Message {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_seqno_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
|
||||
&self.seqno
|
||||
}
|
||||
|
||||
fn mut_seqno_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
|
||||
&mut self.seqno
|
||||
}
|
||||
|
||||
// repeated string topicIDs = 4;
|
||||
|
||||
pub fn clear_topicIDs(&mut self) {
|
||||
@@ -601,6 +680,14 @@ impl Message {
|
||||
pub fn get_topicIDs(&self) -> &[::std::string::String] {
|
||||
&self.topicIDs
|
||||
}
|
||||
|
||||
fn get_topicIDs_for_reflect(&self) -> &::protobuf::RepeatedField<::std::string::String> {
|
||||
&self.topicIDs
|
||||
}
|
||||
|
||||
fn mut_topicIDs_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
|
||||
&mut self.topicIDs
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Message {
|
||||
@@ -693,14 +780,16 @@ impl ::protobuf::Message for Message {
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
::protobuf::MessageStatic::descriptor_static(None::<Self>)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::MessageStatic for Message {
|
||||
fn new() -> Message {
|
||||
Message::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
fn descriptor_static(_: ::std::option::Option<Message>) -> &'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,
|
||||
@@ -710,23 +799,23 @@ impl ::protobuf::Message for Message {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
||||
"from",
|
||||
|m: &Message| { &m.from },
|
||||
|m: &mut Message| { &mut m.from },
|
||||
Message::get_from_for_reflect,
|
||||
Message::mut_from_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
||||
"data",
|
||||
|m: &Message| { &m.data },
|
||||
|m: &mut Message| { &mut m.data },
|
||||
Message::get_data_for_reflect,
|
||||
Message::mut_data_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
||||
"seqno",
|
||||
|m: &Message| { &m.seqno },
|
||||
|m: &mut Message| { &mut m.seqno },
|
||||
Message::get_seqno_for_reflect,
|
||||
Message::mut_seqno_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"topicIDs",
|
||||
|m: &Message| { &m.topicIDs },
|
||||
|m: &mut Message| { &mut m.topicIDs },
|
||||
Message::get_topicIDs_for_reflect,
|
||||
Message::mut_topicIDs_for_reflect,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<Message>(
|
||||
"Message",
|
||||
@@ -736,16 +825,6 @@ impl ::protobuf::Message for Message {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
@@ -781,11 +860,24 @@ pub struct TopicDescriptor {
|
||||
cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
// see codegen.rs for the explanation why impl Sync explicitly
|
||||
unsafe impl ::std::marker::Sync for TopicDescriptor {}
|
||||
|
||||
impl TopicDescriptor {
|
||||
pub fn new() -> TopicDescriptor {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
pub fn default_instance() -> &'static TopicDescriptor {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TopicDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TopicDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TopicDescriptor::new)
|
||||
}
|
||||
}
|
||||
|
||||
// optional string name = 1;
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
@@ -822,6 +914,14 @@ impl TopicDescriptor {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_name_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
|
||||
&self.name
|
||||
}
|
||||
|
||||
fn mut_name_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
|
||||
&mut self.name
|
||||
}
|
||||
|
||||
// optional .floodsub.pb.TopicDescriptor.AuthOpts auth = 2;
|
||||
|
||||
pub fn clear_auth(&mut self) {
|
||||
@@ -855,6 +955,14 @@ impl TopicDescriptor {
|
||||
self.auth.as_ref().unwrap_or_else(|| TopicDescriptor_AuthOpts::default_instance())
|
||||
}
|
||||
|
||||
fn get_auth_for_reflect(&self) -> &::protobuf::SingularPtrField<TopicDescriptor_AuthOpts> {
|
||||
&self.auth
|
||||
}
|
||||
|
||||
fn mut_auth_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<TopicDescriptor_AuthOpts> {
|
||||
&mut self.auth
|
||||
}
|
||||
|
||||
// optional .floodsub.pb.TopicDescriptor.EncOpts enc = 3;
|
||||
|
||||
pub fn clear_enc(&mut self) {
|
||||
@@ -887,6 +995,14 @@ impl TopicDescriptor {
|
||||
pub fn get_enc(&self) -> &TopicDescriptor_EncOpts {
|
||||
self.enc.as_ref().unwrap_or_else(|| TopicDescriptor_EncOpts::default_instance())
|
||||
}
|
||||
|
||||
fn get_enc_for_reflect(&self) -> &::protobuf::SingularPtrField<TopicDescriptor_EncOpts> {
|
||||
&self.enc
|
||||
}
|
||||
|
||||
fn mut_enc_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<TopicDescriptor_EncOpts> {
|
||||
&mut self.enc
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for TopicDescriptor {
|
||||
@@ -986,14 +1102,16 @@ impl ::protobuf::Message for TopicDescriptor {
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
::protobuf::MessageStatic::descriptor_static(None::<Self>)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::MessageStatic for TopicDescriptor {
|
||||
fn new() -> TopicDescriptor {
|
||||
TopicDescriptor::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
fn descriptor_static(_: ::std::option::Option<TopicDescriptor>) -> &'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,
|
||||
@@ -1003,18 +1121,18 @@ impl ::protobuf::Message for TopicDescriptor {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &TopicDescriptor| { &m.name },
|
||||
|m: &mut TopicDescriptor| { &mut m.name },
|
||||
TopicDescriptor::get_name_for_reflect,
|
||||
TopicDescriptor::mut_name_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TopicDescriptor_AuthOpts>>(
|
||||
"auth",
|
||||
|m: &TopicDescriptor| { &m.auth },
|
||||
|m: &mut TopicDescriptor| { &mut m.auth },
|
||||
TopicDescriptor::get_auth_for_reflect,
|
||||
TopicDescriptor::mut_auth_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TopicDescriptor_EncOpts>>(
|
||||
"enc",
|
||||
|m: &TopicDescriptor| { &m.enc },
|
||||
|m: &mut TopicDescriptor| { &mut m.enc },
|
||||
TopicDescriptor::get_enc_for_reflect,
|
||||
TopicDescriptor::mut_enc_for_reflect,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<TopicDescriptor>(
|
||||
"TopicDescriptor",
|
||||
@@ -1024,16 +1142,6 @@ impl ::protobuf::Message for TopicDescriptor {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static TopicDescriptor {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TopicDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TopicDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TopicDescriptor::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for TopicDescriptor {
|
||||
@@ -1067,11 +1175,24 @@ pub struct TopicDescriptor_AuthOpts {
|
||||
cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
// see codegen.rs for the explanation why impl Sync explicitly
|
||||
unsafe impl ::std::marker::Sync for TopicDescriptor_AuthOpts {}
|
||||
|
||||
impl TopicDescriptor_AuthOpts {
|
||||
pub fn new() -> TopicDescriptor_AuthOpts {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
pub fn default_instance() -> &'static TopicDescriptor_AuthOpts {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TopicDescriptor_AuthOpts> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TopicDescriptor_AuthOpts,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TopicDescriptor_AuthOpts::new)
|
||||
}
|
||||
}
|
||||
|
||||
// optional .floodsub.pb.TopicDescriptor.AuthOpts.AuthMode mode = 1;
|
||||
|
||||
pub fn clear_mode(&mut self) {
|
||||
@@ -1091,6 +1212,14 @@ impl TopicDescriptor_AuthOpts {
|
||||
self.mode.unwrap_or(TopicDescriptor_AuthOpts_AuthMode::NONE)
|
||||
}
|
||||
|
||||
fn get_mode_for_reflect(&self) -> &::std::option::Option<TopicDescriptor_AuthOpts_AuthMode> {
|
||||
&self.mode
|
||||
}
|
||||
|
||||
fn mut_mode_for_reflect(&mut self) -> &mut ::std::option::Option<TopicDescriptor_AuthOpts_AuthMode> {
|
||||
&mut self.mode
|
||||
}
|
||||
|
||||
// repeated bytes keys = 2;
|
||||
|
||||
pub fn clear_keys(&mut self) {
|
||||
@@ -1115,6 +1244,14 @@ impl TopicDescriptor_AuthOpts {
|
||||
pub fn get_keys(&self) -> &[::std::vec::Vec<u8>] {
|
||||
&self.keys
|
||||
}
|
||||
|
||||
fn get_keys_for_reflect(&self) -> &::protobuf::RepeatedField<::std::vec::Vec<u8>> {
|
||||
&self.keys
|
||||
}
|
||||
|
||||
fn mut_keys_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
|
||||
&mut self.keys
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for TopicDescriptor_AuthOpts {
|
||||
@@ -1189,14 +1326,16 @@ impl ::protobuf::Message for TopicDescriptor_AuthOpts {
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
::protobuf::MessageStatic::descriptor_static(None::<Self>)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::MessageStatic for TopicDescriptor_AuthOpts {
|
||||
fn new() -> TopicDescriptor_AuthOpts {
|
||||
TopicDescriptor_AuthOpts::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
fn descriptor_static(_: ::std::option::Option<TopicDescriptor_AuthOpts>) -> &'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,
|
||||
@@ -1206,13 +1345,13 @@ impl ::protobuf::Message for TopicDescriptor_AuthOpts {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TopicDescriptor_AuthOpts_AuthMode>>(
|
||||
"mode",
|
||||
|m: &TopicDescriptor_AuthOpts| { &m.mode },
|
||||
|m: &mut TopicDescriptor_AuthOpts| { &mut m.mode },
|
||||
TopicDescriptor_AuthOpts::get_mode_for_reflect,
|
||||
TopicDescriptor_AuthOpts::mut_mode_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
||||
"keys",
|
||||
|m: &TopicDescriptor_AuthOpts| { &m.keys },
|
||||
|m: &mut TopicDescriptor_AuthOpts| { &mut m.keys },
|
||||
TopicDescriptor_AuthOpts::get_keys_for_reflect,
|
||||
TopicDescriptor_AuthOpts::mut_keys_for_reflect,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<TopicDescriptor_AuthOpts>(
|
||||
"TopicDescriptor_AuthOpts",
|
||||
@@ -1222,16 +1361,6 @@ impl ::protobuf::Message for TopicDescriptor_AuthOpts {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static TopicDescriptor_AuthOpts {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TopicDescriptor_AuthOpts> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TopicDescriptor_AuthOpts,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TopicDescriptor_AuthOpts::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for TopicDescriptor_AuthOpts {
|
||||
@@ -1284,7 +1413,7 @@ impl ::protobuf::ProtobufEnum for TopicDescriptor_AuthOpts_AuthMode {
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
fn enum_descriptor_static(_: ::std::option::Option<TopicDescriptor_AuthOpts_AuthMode>) -> &'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,
|
||||
@@ -1316,11 +1445,24 @@ pub struct TopicDescriptor_EncOpts {
|
||||
cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
// see codegen.rs for the explanation why impl Sync explicitly
|
||||
unsafe impl ::std::marker::Sync for TopicDescriptor_EncOpts {}
|
||||
|
||||
impl TopicDescriptor_EncOpts {
|
||||
pub fn new() -> TopicDescriptor_EncOpts {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
pub fn default_instance() -> &'static TopicDescriptor_EncOpts {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TopicDescriptor_EncOpts> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TopicDescriptor_EncOpts,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TopicDescriptor_EncOpts::new)
|
||||
}
|
||||
}
|
||||
|
||||
// optional .floodsub.pb.TopicDescriptor.EncOpts.EncMode mode = 1;
|
||||
|
||||
pub fn clear_mode(&mut self) {
|
||||
@@ -1340,6 +1482,14 @@ impl TopicDescriptor_EncOpts {
|
||||
self.mode.unwrap_or(TopicDescriptor_EncOpts_EncMode::NONE)
|
||||
}
|
||||
|
||||
fn get_mode_for_reflect(&self) -> &::std::option::Option<TopicDescriptor_EncOpts_EncMode> {
|
||||
&self.mode
|
||||
}
|
||||
|
||||
fn mut_mode_for_reflect(&mut self) -> &mut ::std::option::Option<TopicDescriptor_EncOpts_EncMode> {
|
||||
&mut self.mode
|
||||
}
|
||||
|
||||
// repeated bytes keyHashes = 2;
|
||||
|
||||
pub fn clear_keyHashes(&mut self) {
|
||||
@@ -1364,6 +1514,14 @@ impl TopicDescriptor_EncOpts {
|
||||
pub fn get_keyHashes(&self) -> &[::std::vec::Vec<u8>] {
|
||||
&self.keyHashes
|
||||
}
|
||||
|
||||
fn get_keyHashes_for_reflect(&self) -> &::protobuf::RepeatedField<::std::vec::Vec<u8>> {
|
||||
&self.keyHashes
|
||||
}
|
||||
|
||||
fn mut_keyHashes_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec<u8>> {
|
||||
&mut self.keyHashes
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for TopicDescriptor_EncOpts {
|
||||
@@ -1438,14 +1596,16 @@ impl ::protobuf::Message for TopicDescriptor_EncOpts {
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
::protobuf::MessageStatic::descriptor_static(None::<Self>)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::MessageStatic for TopicDescriptor_EncOpts {
|
||||
fn new() -> TopicDescriptor_EncOpts {
|
||||
TopicDescriptor_EncOpts::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
fn descriptor_static(_: ::std::option::Option<TopicDescriptor_EncOpts>) -> &'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,
|
||||
@@ -1455,13 +1615,13 @@ impl ::protobuf::Message for TopicDescriptor_EncOpts {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TopicDescriptor_EncOpts_EncMode>>(
|
||||
"mode",
|
||||
|m: &TopicDescriptor_EncOpts| { &m.mode },
|
||||
|m: &mut TopicDescriptor_EncOpts| { &mut m.mode },
|
||||
TopicDescriptor_EncOpts::get_mode_for_reflect,
|
||||
TopicDescriptor_EncOpts::mut_mode_for_reflect,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
||||
"keyHashes",
|
||||
|m: &TopicDescriptor_EncOpts| { &m.keyHashes },
|
||||
|m: &mut TopicDescriptor_EncOpts| { &mut m.keyHashes },
|
||||
TopicDescriptor_EncOpts::get_keyHashes_for_reflect,
|
||||
TopicDescriptor_EncOpts::mut_keyHashes_for_reflect,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<TopicDescriptor_EncOpts>(
|
||||
"TopicDescriptor_EncOpts",
|
||||
@@ -1471,16 +1631,6 @@ impl ::protobuf::Message for TopicDescriptor_EncOpts {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static TopicDescriptor_EncOpts {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TopicDescriptor_EncOpts> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TopicDescriptor_EncOpts,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TopicDescriptor_EncOpts::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for TopicDescriptor_EncOpts {
|
||||
@@ -1533,7 +1683,7 @@ impl ::protobuf::ProtobufEnum for TopicDescriptor_EncOpts_EncMode {
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
fn enum_descriptor_static(_: ::std::option::Option<TopicDescriptor_EncOpts_EncMode>) -> &'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,
|
||||
|
Reference in New Issue
Block a user