#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![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(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
pub struct ScabbardMessage {
pub message_type: ScabbardMessage_Type,
pub consensus_message: ::std::vec::Vec<u8>,
pub proposed_batch: ::protobuf::SingularPtrField<ProposedBatch>,
pub new_batch: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ScabbardMessage {
fn default() -> &'a ScabbardMessage {
<ScabbardMessage as ::protobuf::Message>::default_instance()
}
}
impl ScabbardMessage {
pub fn new() -> ScabbardMessage {
::std::default::Default::default()
}
pub fn get_message_type(&self) -> ScabbardMessage_Type {
self.message_type
}
pub fn clear_message_type(&mut self) {
self.message_type = ScabbardMessage_Type::UNSET;
}
pub fn set_message_type(&mut self, v: ScabbardMessage_Type) {
self.message_type = v;
}
pub fn get_consensus_message(&self) -> &[u8] {
&self.consensus_message
}
pub fn clear_consensus_message(&mut self) {
self.consensus_message.clear();
}
pub fn set_consensus_message(&mut self, v: ::std::vec::Vec<u8>) {
self.consensus_message = v;
}
pub fn mut_consensus_message(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.consensus_message
}
pub fn take_consensus_message(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.consensus_message, ::std::vec::Vec::new())
}
pub fn get_proposed_batch(&self) -> &ProposedBatch {
self.proposed_batch.as_ref().unwrap_or_else(|| <ProposedBatch as ::protobuf::Message>::default_instance())
}
pub fn clear_proposed_batch(&mut self) {
self.proposed_batch.clear();
}
pub fn has_proposed_batch(&self) -> bool {
self.proposed_batch.is_some()
}
pub fn set_proposed_batch(&mut self, v: ProposedBatch) {
self.proposed_batch = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_proposed_batch(&mut self) -> &mut ProposedBatch {
if self.proposed_batch.is_none() {
self.proposed_batch.set_default();
}
self.proposed_batch.as_mut().unwrap()
}
pub fn take_proposed_batch(&mut self) -> ProposedBatch {
self.proposed_batch.take().unwrap_or_else(|| ProposedBatch::new())
}
pub fn get_new_batch(&self) -> &[u8] {
&self.new_batch
}
pub fn clear_new_batch(&mut self) {
self.new_batch.clear();
}
pub fn set_new_batch(&mut self, v: ::std::vec::Vec<u8>) {
self.new_batch = v;
}
pub fn mut_new_batch(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.new_batch
}
pub fn take_new_batch(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.new_batch, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for ScabbardMessage {
fn is_initialized(&self) -> bool {
for v in &self.proposed_batch {
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.message_type, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.consensus_message)?;
},
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.proposed_batch)?;
},
4 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.new_batch)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.message_type != ScabbardMessage_Type::UNSET {
my_size += ::protobuf::rt::enum_size(1, self.message_type);
}
if !self.consensus_message.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.consensus_message);
}
if let Some(ref v) = self.proposed_batch.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.new_batch.is_empty() {
my_size += ::protobuf::rt::bytes_size(4, &self.new_batch);
}
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.message_type != ScabbardMessage_Type::UNSET {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.message_type))?;
}
if !self.consensus_message.is_empty() {
os.write_bytes(2, &self.consensus_message)?;
}
if let Some(ref v) = self.proposed_batch.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)?;
}
if !self.new_batch.is_empty() {
os.write_bytes(4, &self.new_batch)?;
}
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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ScabbardMessage {
ScabbardMessage::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ScabbardMessage_Type>>(
"message_type",
|m: &ScabbardMessage| { &m.message_type },
|m: &mut ScabbardMessage| { &mut m.message_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"consensus_message",
|m: &ScabbardMessage| { &m.consensus_message },
|m: &mut ScabbardMessage| { &mut m.consensus_message },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ProposedBatch>>(
"proposed_batch",
|m: &ScabbardMessage| { &m.proposed_batch },
|m: &mut ScabbardMessage| { &mut m.proposed_batch },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"new_batch",
|m: &ScabbardMessage| { &m.new_batch },
|m: &mut ScabbardMessage| { &mut m.new_batch },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ScabbardMessage>(
"ScabbardMessage",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ScabbardMessage {
static instance: ::protobuf::rt::LazyV2<ScabbardMessage> = ::protobuf::rt::LazyV2::INIT;
instance.get(ScabbardMessage::new)
}
}
impl ::protobuf::Clear for ScabbardMessage {
fn clear(&mut self) {
self.message_type = ScabbardMessage_Type::UNSET;
self.consensus_message.clear();
self.proposed_batch.clear();
self.new_batch.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ScabbardMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ScabbardMessage {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ScabbardMessage_Type {
UNSET = 0,
CONSENSUS_MESSAGE = 1,
PROPOSED_BATCH = 2,
NEW_BATCH = 3,
TOO_MANY_REQUESTS = 10,
ACCEPTING_REQUESTS = 11,
}
impl ::protobuf::ProtobufEnum for ScabbardMessage_Type {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ScabbardMessage_Type> {
match value {
0 => ::std::option::Option::Some(ScabbardMessage_Type::UNSET),
1 => ::std::option::Option::Some(ScabbardMessage_Type::CONSENSUS_MESSAGE),
2 => ::std::option::Option::Some(ScabbardMessage_Type::PROPOSED_BATCH),
3 => ::std::option::Option::Some(ScabbardMessage_Type::NEW_BATCH),
10 => ::std::option::Option::Some(ScabbardMessage_Type::TOO_MANY_REQUESTS),
11 => ::std::option::Option::Some(ScabbardMessage_Type::ACCEPTING_REQUESTS),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ScabbardMessage_Type] = &[
ScabbardMessage_Type::UNSET,
ScabbardMessage_Type::CONSENSUS_MESSAGE,
ScabbardMessage_Type::PROPOSED_BATCH,
ScabbardMessage_Type::NEW_BATCH,
ScabbardMessage_Type::TOO_MANY_REQUESTS,
ScabbardMessage_Type::ACCEPTING_REQUESTS,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<ScabbardMessage_Type>("ScabbardMessage.Type", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for ScabbardMessage_Type {
}
impl ::std::default::Default for ScabbardMessage_Type {
fn default() -> Self {
ScabbardMessage_Type::UNSET
}
}
impl ::protobuf::reflect::ProtobufValue for ScabbardMessage_Type {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ProposedBatch {
pub proposal: ::std::vec::Vec<u8>,
pub batch: ::std::vec::Vec<u8>,
pub service_id: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ProposedBatch {
fn default() -> &'a ProposedBatch {
<ProposedBatch as ::protobuf::Message>::default_instance()
}
}
impl ProposedBatch {
pub fn new() -> ProposedBatch {
::std::default::Default::default()
}
pub fn get_proposal(&self) -> &[u8] {
&self.proposal
}
pub fn clear_proposal(&mut self) {
self.proposal.clear();
}
pub fn set_proposal(&mut self, v: ::std::vec::Vec<u8>) {
self.proposal = v;
}
pub fn mut_proposal(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.proposal
}
pub fn take_proposal(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.proposal, ::std::vec::Vec::new())
}
pub fn get_batch(&self) -> &[u8] {
&self.batch
}
pub fn clear_batch(&mut self) {
self.batch.clear();
}
pub fn set_batch(&mut self, v: ::std::vec::Vec<u8>) {
self.batch = v;
}
pub fn mut_batch(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.batch
}
pub fn take_batch(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.batch, ::std::vec::Vec::new())
}
pub fn get_service_id(&self) -> &str {
&self.service_id
}
pub fn clear_service_id(&mut self) {
self.service_id.clear();
}
pub fn set_service_id(&mut self, v: ::std::string::String) {
self.service_id = v;
}
pub fn mut_service_id(&mut self) -> &mut ::std::string::String {
&mut self.service_id
}
pub fn take_service_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.service_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for ProposedBatch {
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.proposal)?;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.batch)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.proposal.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.proposal);
}
if !self.batch.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.batch);
}
if !self.service_id.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.service_id);
}
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.proposal.is_empty() {
os.write_bytes(1, &self.proposal)?;
}
if !self.batch.is_empty() {
os.write_bytes(2, &self.batch)?;
}
if !self.service_id.is_empty() {
os.write_string(3, &self.service_id)?;
}
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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ProposedBatch {
ProposedBatch::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"proposal",
|m: &ProposedBatch| { &m.proposal },
|m: &mut ProposedBatch| { &mut m.proposal },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"batch",
|m: &ProposedBatch| { &m.batch },
|m: &mut ProposedBatch| { &mut m.batch },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"service_id",
|m: &ProposedBatch| { &m.service_id },
|m: &mut ProposedBatch| { &mut m.service_id },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ProposedBatch>(
"ProposedBatch",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ProposedBatch {
static instance: ::protobuf::rt::LazyV2<ProposedBatch> = ::protobuf::rt::LazyV2::INIT;
instance.get(ProposedBatch::new)
}
}
impl ::protobuf::Clear for ProposedBatch {
fn clear(&mut self) {
self.proposal.clear();
self.batch.clear();
self.service_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ProposedBatch {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ProposedBatch {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Setting {
pub entries: ::protobuf::RepeatedField<Setting_Entry>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Setting {
fn default() -> &'a Setting {
<Setting as ::protobuf::Message>::default_instance()
}
}
impl Setting {
pub fn new() -> Setting {
::std::default::Default::default()
}
pub fn get_entries(&self) -> &[Setting_Entry] {
&self.entries
}
pub fn clear_entries(&mut self) {
self.entries.clear();
}
pub fn set_entries(&mut self, v: ::protobuf::RepeatedField<Setting_Entry>) {
self.entries = v;
}
pub fn mut_entries(&mut self) -> &mut ::protobuf::RepeatedField<Setting_Entry> {
&mut self.entries
}
pub fn take_entries(&mut self) -> ::protobuf::RepeatedField<Setting_Entry> {
::std::mem::replace(&mut self.entries, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for Setting {
fn is_initialized(&self) -> bool {
for v in &self.entries {
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_repeated_message_into(wire_type, is, &mut self.entries)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.entries {
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<()> {
for v in &self.entries {
os.write_tag(1, ::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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Setting {
Setting::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Setting_Entry>>(
"entries",
|m: &Setting| { &m.entries },
|m: &mut Setting| { &mut m.entries },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Setting>(
"Setting",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Setting {
static instance: ::protobuf::rt::LazyV2<Setting> = ::protobuf::rt::LazyV2::INIT;
instance.get(Setting::new)
}
}
impl ::protobuf::Clear for Setting {
fn clear(&mut self) {
self.entries.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Setting {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Setting {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Setting_Entry {
pub key: ::std::string::String,
pub value: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Setting_Entry {
fn default() -> &'a Setting_Entry {
<Setting_Entry as ::protobuf::Message>::default_instance()
}
}
impl Setting_Entry {
pub fn new() -> Setting_Entry {
::std::default::Default::default()
}
pub fn get_key(&self) -> &str {
&self.key
}
pub fn clear_key(&mut self) {
self.key.clear();
}
pub fn set_key(&mut self, v: ::std::string::String) {
self.key = v;
}
pub fn mut_key(&mut self) -> &mut ::std::string::String {
&mut self.key
}
pub fn take_key(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.key, ::std::string::String::new())
}
pub fn get_value(&self) -> &str {
&self.value
}
pub fn clear_value(&mut self) {
self.value.clear();
}
pub fn set_value(&mut self, v: ::std::string::String) {
self.value = v;
}
pub fn mut_value(&mut self) -> &mut ::std::string::String {
&mut self.value
}
pub fn take_value(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.value, ::std::string::String::new())
}
}
impl ::protobuf::Message for Setting_Entry {
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_string_into(wire_type, is, &mut self.key)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.key.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.key);
}
if !self.value.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.value);
}
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_string(1, &self.key)?;
}
if !self.value.is_empty() {
os.write_string(2, &self.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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Setting_Entry {
Setting_Entry::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"key",
|m: &Setting_Entry| { &m.key },
|m: &mut Setting_Entry| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"value",
|m: &Setting_Entry| { &m.value },
|m: &mut Setting_Entry| { &mut m.value },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Setting_Entry>(
"Setting.Entry",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Setting_Entry {
static instance: ::protobuf::rt::LazyV2<Setting_Entry> = ::protobuf::rt::LazyV2::INIT;
instance.get(Setting_Entry::new)
}
}
impl ::protobuf::Clear for Setting_Entry {
fn clear(&mut self) {
self.key.clear();
self.value.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Setting_Entry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Setting_Entry {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0escabbard.proto\"\xc8\x02\n\x0fScabbardMessage\x128\n\x0cmessage_ty\
pe\x18\x01\x20\x01(\x0e2\x15.ScabbardMessage.TypeR\x0bmessageType\x12+\n\
\x11consensus_message\x18\x02\x20\x01(\x0cR\x10consensusMessage\x125\n\
\x0eproposed_batch\x18\x03\x20\x01(\x0b2\x0e.ProposedBatchR\rproposedBat\
ch\x12\x1b\n\tnew_batch\x18\x04\x20\x01(\x0cR\x08newBatch\"z\n\x04Type\
\x12\t\n\x05UNSET\x10\0\x12\x15\n\x11CONSENSUS_MESSAGE\x10\x01\x12\x12\n\
\x0ePROPOSED_BATCH\x10\x02\x12\r\n\tNEW_BATCH\x10\x03\x12\x15\n\x11TOO_M\
ANY_REQUESTS\x10\n\x12\x16\n\x12ACCEPTING_REQUESTS\x10\x0b\"`\n\rPropose\
dBatch\x12\x1a\n\x08proposal\x18\x01\x20\x01(\x0cR\x08proposal\x12\x14\n\
\x05batch\x18\x02\x20\x01(\x0cR\x05batch\x12\x1d\n\nservice_id\x18\x03\
\x20\x01(\tR\tserviceId\"d\n\x07Setting\x12(\n\x07entries\x18\x01\x20\
\x03(\x0b2\x0e.Setting.EntryR\x07entries\x1a/\n\x05Entry\x12\x10\n\x03ke\
y\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05v\
alueb\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}