#![allow(unknown_lints)]
#![allow(clippy)]
#![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)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(PartialEq,Clone,Default)]
pub struct Request {
pub value: ::std::option::Option<Request_oneof_value>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
#[derive(Clone,PartialEq)]
pub enum Request_oneof_value {
echo(RequestEcho),
flush(RequestFlush),
info(RequestInfo),
set_option(RequestSetOption),
init_chain(RequestInitChain),
query(RequestQuery),
begin_block(RequestBeginBlock),
check_tx(RequestCheckTx),
deliver_tx(RequestDeliverTx),
end_block(RequestEndBlock),
commit(RequestCommit),
}
impl Request {
pub fn new() -> Request {
::std::default::Default::default()
}
pub fn clear_echo(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_echo(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::echo(..)) => true,
_ => false,
}
}
pub fn set_echo(&mut self, v: RequestEcho) {
self.value = ::std::option::Option::Some(Request_oneof_value::echo(v))
}
pub fn mut_echo(&mut self) -> &mut RequestEcho {
if let ::std::option::Option::Some(Request_oneof_value::echo(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::echo(RequestEcho::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::echo(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_echo(&mut self) -> RequestEcho {
if self.has_echo() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::echo(v)) => v,
_ => panic!(),
}
} else {
RequestEcho::new()
}
}
pub fn get_echo(&self) -> &RequestEcho {
match self.value {
::std::option::Option::Some(Request_oneof_value::echo(ref v)) => v,
_ => RequestEcho::default_instance(),
}
}
pub fn clear_flush(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_flush(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::flush(..)) => true,
_ => false,
}
}
pub fn set_flush(&mut self, v: RequestFlush) {
self.value = ::std::option::Option::Some(Request_oneof_value::flush(v))
}
pub fn mut_flush(&mut self) -> &mut RequestFlush {
if let ::std::option::Option::Some(Request_oneof_value::flush(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::flush(RequestFlush::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::flush(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_flush(&mut self) -> RequestFlush {
if self.has_flush() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::flush(v)) => v,
_ => panic!(),
}
} else {
RequestFlush::new()
}
}
pub fn get_flush(&self) -> &RequestFlush {
match self.value {
::std::option::Option::Some(Request_oneof_value::flush(ref v)) => v,
_ => RequestFlush::default_instance(),
}
}
pub fn clear_info(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_info(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::info(..)) => true,
_ => false,
}
}
pub fn set_info(&mut self, v: RequestInfo) {
self.value = ::std::option::Option::Some(Request_oneof_value::info(v))
}
pub fn mut_info(&mut self) -> &mut RequestInfo {
if let ::std::option::Option::Some(Request_oneof_value::info(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::info(RequestInfo::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::info(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_info(&mut self) -> RequestInfo {
if self.has_info() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::info(v)) => v,
_ => panic!(),
}
} else {
RequestInfo::new()
}
}
pub fn get_info(&self) -> &RequestInfo {
match self.value {
::std::option::Option::Some(Request_oneof_value::info(ref v)) => v,
_ => RequestInfo::default_instance(),
}
}
pub fn clear_set_option(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_set_option(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::set_option(..)) => true,
_ => false,
}
}
pub fn set_set_option(&mut self, v: RequestSetOption) {
self.value = ::std::option::Option::Some(Request_oneof_value::set_option(v))
}
pub fn mut_set_option(&mut self) -> &mut RequestSetOption {
if let ::std::option::Option::Some(Request_oneof_value::set_option(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::set_option(RequestSetOption::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::set_option(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_set_option(&mut self) -> RequestSetOption {
if self.has_set_option() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::set_option(v)) => v,
_ => panic!(),
}
} else {
RequestSetOption::new()
}
}
pub fn get_set_option(&self) -> &RequestSetOption {
match self.value {
::std::option::Option::Some(Request_oneof_value::set_option(ref v)) => v,
_ => RequestSetOption::default_instance(),
}
}
pub fn clear_init_chain(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_init_chain(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::init_chain(..)) => true,
_ => false,
}
}
pub fn set_init_chain(&mut self, v: RequestInitChain) {
self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(v))
}
pub fn mut_init_chain(&mut self) -> &mut RequestInitChain {
if let ::std::option::Option::Some(Request_oneof_value::init_chain(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(RequestInitChain::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::init_chain(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_init_chain(&mut self) -> RequestInitChain {
if self.has_init_chain() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::init_chain(v)) => v,
_ => panic!(),
}
} else {
RequestInitChain::new()
}
}
pub fn get_init_chain(&self) -> &RequestInitChain {
match self.value {
::std::option::Option::Some(Request_oneof_value::init_chain(ref v)) => v,
_ => RequestInitChain::default_instance(),
}
}
pub fn clear_query(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_query(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::query(..)) => true,
_ => false,
}
}
pub fn set_query(&mut self, v: RequestQuery) {
self.value = ::std::option::Option::Some(Request_oneof_value::query(v))
}
pub fn mut_query(&mut self) -> &mut RequestQuery {
if let ::std::option::Option::Some(Request_oneof_value::query(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::query(RequestQuery::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::query(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_query(&mut self) -> RequestQuery {
if self.has_query() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::query(v)) => v,
_ => panic!(),
}
} else {
RequestQuery::new()
}
}
pub fn get_query(&self) -> &RequestQuery {
match self.value {
::std::option::Option::Some(Request_oneof_value::query(ref v)) => v,
_ => RequestQuery::default_instance(),
}
}
pub fn clear_begin_block(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_begin_block(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::begin_block(..)) => true,
_ => false,
}
}
pub fn set_begin_block(&mut self, v: RequestBeginBlock) {
self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(v))
}
pub fn mut_begin_block(&mut self) -> &mut RequestBeginBlock {
if let ::std::option::Option::Some(Request_oneof_value::begin_block(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(RequestBeginBlock::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::begin_block(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_begin_block(&mut self) -> RequestBeginBlock {
if self.has_begin_block() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::begin_block(v)) => v,
_ => panic!(),
}
} else {
RequestBeginBlock::new()
}
}
pub fn get_begin_block(&self) -> &RequestBeginBlock {
match self.value {
::std::option::Option::Some(Request_oneof_value::begin_block(ref v)) => v,
_ => RequestBeginBlock::default_instance(),
}
}
pub fn clear_check_tx(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_check_tx(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::check_tx(..)) => true,
_ => false,
}
}
pub fn set_check_tx(&mut self, v: RequestCheckTx) {
self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(v))
}
pub fn mut_check_tx(&mut self) -> &mut RequestCheckTx {
if let ::std::option::Option::Some(Request_oneof_value::check_tx(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(RequestCheckTx::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::check_tx(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_check_tx(&mut self) -> RequestCheckTx {
if self.has_check_tx() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::check_tx(v)) => v,
_ => panic!(),
}
} else {
RequestCheckTx::new()
}
}
pub fn get_check_tx(&self) -> &RequestCheckTx {
match self.value {
::std::option::Option::Some(Request_oneof_value::check_tx(ref v)) => v,
_ => RequestCheckTx::default_instance(),
}
}
pub fn clear_deliver_tx(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_deliver_tx(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::deliver_tx(..)) => true,
_ => false,
}
}
pub fn set_deliver_tx(&mut self, v: RequestDeliverTx) {
self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(v))
}
pub fn mut_deliver_tx(&mut self) -> &mut RequestDeliverTx {
if let ::std::option::Option::Some(Request_oneof_value::deliver_tx(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(RequestDeliverTx::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::deliver_tx(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_deliver_tx(&mut self) -> RequestDeliverTx {
if self.has_deliver_tx() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::deliver_tx(v)) => v,
_ => panic!(),
}
} else {
RequestDeliverTx::new()
}
}
pub fn get_deliver_tx(&self) -> &RequestDeliverTx {
match self.value {
::std::option::Option::Some(Request_oneof_value::deliver_tx(ref v)) => v,
_ => RequestDeliverTx::default_instance(),
}
}
pub fn clear_end_block(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_end_block(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::end_block(..)) => true,
_ => false,
}
}
pub fn set_end_block(&mut self, v: RequestEndBlock) {
self.value = ::std::option::Option::Some(Request_oneof_value::end_block(v))
}
pub fn mut_end_block(&mut self) -> &mut RequestEndBlock {
if let ::std::option::Option::Some(Request_oneof_value::end_block(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::end_block(RequestEndBlock::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::end_block(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_end_block(&mut self) -> RequestEndBlock {
if self.has_end_block() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::end_block(v)) => v,
_ => panic!(),
}
} else {
RequestEndBlock::new()
}
}
pub fn get_end_block(&self) -> &RequestEndBlock {
match self.value {
::std::option::Option::Some(Request_oneof_value::end_block(ref v)) => v,
_ => RequestEndBlock::default_instance(),
}
}
pub fn clear_commit(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_commit(&self) -> bool {
match self.value {
::std::option::Option::Some(Request_oneof_value::commit(..)) => true,
_ => false,
}
}
pub fn set_commit(&mut self, v: RequestCommit) {
self.value = ::std::option::Option::Some(Request_oneof_value::commit(v))
}
pub fn mut_commit(&mut self) -> &mut RequestCommit {
if let ::std::option::Option::Some(Request_oneof_value::commit(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Request_oneof_value::commit(RequestCommit::new()));
}
match self.value {
::std::option::Option::Some(Request_oneof_value::commit(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_commit(&mut self) -> RequestCommit {
if self.has_commit() {
match self.value.take() {
::std::option::Option::Some(Request_oneof_value::commit(v)) => v,
_ => panic!(),
}
} else {
RequestCommit::new()
}
}
pub fn get_commit(&self) -> &RequestCommit {
match self.value {
::std::option::Option::Some(Request_oneof_value::commit(ref v)) => v,
_ => RequestCommit::default_instance(),
}
}
}
impl ::protobuf::Message for Request {
fn is_initialized(&self) -> bool {
if let Some(Request_oneof_value::echo(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::flush(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::info(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::set_option(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::init_chain(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::query(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::begin_block(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::check_tx(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::deliver_tx(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::end_block(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Request_oneof_value::commit(ref v)) = self.value {
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 {
2 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::echo(is.read_message()?));
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::flush(is.read_message()?));
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::info(is.read_message()?));
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::set_option(is.read_message()?));
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(is.read_message()?));
},
7 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::query(is.read_message()?));
},
8 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(is.read_message()?));
},
9 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(is.read_message()?));
},
19 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(is.read_message()?));
},
11 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::end_block(is.read_message()?));
},
12 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Request_oneof_value::commit(is.read_message()?));
},
_ => {
::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 let ::std::option::Option::Some(ref v) = self.value {
match v {
&Request_oneof_value::echo(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::flush(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::info(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::set_option(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::init_chain(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::query(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::begin_block(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::check_tx(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::deliver_tx(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::end_block(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Request_oneof_value::commit(ref v) => {
let len = v.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 let ::std::option::Option::Some(ref v) = self.value {
match v {
&Request_oneof_value::echo(ref v) => {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::flush(ref v) => {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::info(ref v) => {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::set_option(ref v) => {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::init_chain(ref v) => {
os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::query(ref v) => {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::begin_block(ref v) => {
os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::check_tx(ref v) => {
os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::deliver_tx(ref v) => {
os.write_tag(19, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::end_block(ref v) => {
os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Request_oneof_value::commit(ref v) => {
os.write_tag(12, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Request {
Request::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_singular_message_accessor::<_, RequestEcho>(
"echo",
Request::has_echo,
Request::get_echo,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestFlush>(
"flush",
Request::has_flush,
Request::get_flush,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInfo>(
"info",
Request::has_info,
Request::get_info,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestSetOption>(
"set_option",
Request::has_set_option,
Request::get_set_option,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInitChain>(
"init_chain",
Request::has_init_chain,
Request::get_init_chain,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestQuery>(
"query",
Request::has_query,
Request::get_query,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestBeginBlock>(
"begin_block",
Request::has_begin_block,
Request::get_begin_block,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCheckTx>(
"check_tx",
Request::has_check_tx,
Request::get_check_tx,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestDeliverTx>(
"deliver_tx",
Request::has_deliver_tx,
Request::get_deliver_tx,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEndBlock>(
"end_block",
Request::has_end_block,
Request::get_end_block,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCommit>(
"commit",
Request::has_commit,
Request::get_commit,
));
::protobuf::reflect::MessageDescriptor::new::<Request>(
"Request",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Request {
static mut instance: ::protobuf::lazy::Lazy<Request> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Request,
};
unsafe {
instance.get(Request::new)
}
}
}
impl ::protobuf::Clear for Request {
fn clear(&mut self) {
self.clear_echo();
self.clear_flush();
self.clear_info();
self.clear_set_option();
self.clear_init_chain();
self.clear_query();
self.clear_begin_block();
self.clear_check_tx();
self.clear_deliver_tx();
self.clear_end_block();
self.clear_commit();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Request {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Request {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestEcho {
pub message: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestEcho {
pub fn new() -> RequestEcho {
::std::default::Default::default()
}
pub fn clear_message(&mut self) {
self.message.clear();
}
pub fn set_message(&mut self, v: ::std::string::String) {
self.message = v;
}
pub fn mut_message(&mut self) -> &mut ::std::string::String {
&mut self.message
}
pub fn take_message(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.message, ::std::string::String::new())
}
pub fn get_message(&self) -> &str {
&self.message
}
}
impl ::protobuf::Message for RequestEcho {
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.message)?;
},
_ => {
::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.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.message);
}
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.is_empty() {
os.write_string(1, &self.message)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestEcho {
RequestEcho::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::ProtobufTypeString>(
"message",
|m: &RequestEcho| { &m.message },
|m: &mut RequestEcho| { &mut m.message },
));
::protobuf::reflect::MessageDescriptor::new::<RequestEcho>(
"RequestEcho",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestEcho {
static mut instance: ::protobuf::lazy::Lazy<RequestEcho> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestEcho,
};
unsafe {
instance.get(RequestEcho::new)
}
}
}
impl ::protobuf::Clear for RequestEcho {
fn clear(&mut self) {
self.clear_message();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestEcho {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestEcho {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestFlush {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestFlush {
pub fn new() -> RequestFlush {
::std::default::Default::default()
}
}
impl ::protobuf::Message for RequestFlush {
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 {
_ => {
::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;
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<()> {
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestFlush {
RequestFlush::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 fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<RequestFlush>(
"RequestFlush",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestFlush {
static mut instance: ::protobuf::lazy::Lazy<RequestFlush> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestFlush,
};
unsafe {
instance.get(RequestFlush::new)
}
}
}
impl ::protobuf::Clear for RequestFlush {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestFlush {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestFlush {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestInfo {
pub version: ::std::string::String,
pub block_version: u64,
pub p2p_version: u64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestInfo {
pub fn new() -> RequestInfo {
::std::default::Default::default()
}
pub fn clear_version(&mut self) {
self.version.clear();
}
pub fn set_version(&mut self, v: ::std::string::String) {
self.version = v;
}
pub fn mut_version(&mut self) -> &mut ::std::string::String {
&mut self.version
}
pub fn take_version(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.version, ::std::string::String::new())
}
pub fn get_version(&self) -> &str {
&self.version
}
pub fn clear_block_version(&mut self) {
self.block_version = 0;
}
pub fn set_block_version(&mut self, v: u64) {
self.block_version = v;
}
pub fn get_block_version(&self) -> u64 {
self.block_version
}
pub fn clear_p2p_version(&mut self) {
self.p2p_version = 0;
}
pub fn set_p2p_version(&mut self, v: u64) {
self.p2p_version = v;
}
pub fn get_p2p_version(&self) -> u64 {
self.p2p_version
}
}
impl ::protobuf::Message for RequestInfo {
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.version)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.block_version = tmp;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.p2p_version = tmp;
},
_ => {
::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.version.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.version);
}
if self.block_version != 0 {
my_size += ::protobuf::rt::value_size(2, self.block_version, ::protobuf::wire_format::WireTypeVarint);
}
if self.p2p_version != 0 {
my_size += ::protobuf::rt::value_size(3, self.p2p_version, ::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.version.is_empty() {
os.write_string(1, &self.version)?;
}
if self.block_version != 0 {
os.write_uint64(2, self.block_version)?;
}
if self.p2p_version != 0 {
os.write_uint64(3, self.p2p_version)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestInfo {
RequestInfo::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::ProtobufTypeString>(
"version",
|m: &RequestInfo| { &m.version },
|m: &mut RequestInfo| { &mut m.version },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"block_version",
|m: &RequestInfo| { &m.block_version },
|m: &mut RequestInfo| { &mut m.block_version },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"p2p_version",
|m: &RequestInfo| { &m.p2p_version },
|m: &mut RequestInfo| { &mut m.p2p_version },
));
::protobuf::reflect::MessageDescriptor::new::<RequestInfo>(
"RequestInfo",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestInfo {
static mut instance: ::protobuf::lazy::Lazy<RequestInfo> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestInfo,
};
unsafe {
instance.get(RequestInfo::new)
}
}
}
impl ::protobuf::Clear for RequestInfo {
fn clear(&mut self) {
self.clear_version();
self.clear_block_version();
self.clear_p2p_version();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestInfo {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestSetOption {
pub key: ::std::string::String,
pub value: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestSetOption {
pub fn new() -> RequestSetOption {
::std::default::Default::default()
}
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_key(&self) -> &str {
&self.key
}
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())
}
pub fn get_value(&self) -> &str {
&self.value
}
}
impl ::protobuf::Message for RequestSetOption {
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestSetOption {
RequestSetOption::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::ProtobufTypeString>(
"key",
|m: &RequestSetOption| { &m.key },
|m: &mut RequestSetOption| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"value",
|m: &RequestSetOption| { &m.value },
|m: &mut RequestSetOption| { &mut m.value },
));
::protobuf::reflect::MessageDescriptor::new::<RequestSetOption>(
"RequestSetOption",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestSetOption {
static mut instance: ::protobuf::lazy::Lazy<RequestSetOption> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestSetOption,
};
unsafe {
instance.get(RequestSetOption::new)
}
}
}
impl ::protobuf::Clear for RequestSetOption {
fn clear(&mut self) {
self.clear_key();
self.clear_value();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestSetOption {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestSetOption {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestInitChain {
pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
pub chain_id: ::std::string::String,
pub consensus_params: ::protobuf::SingularPtrField<ConsensusParams>,
pub validators: ::protobuf::RepeatedField<ValidatorUpdate>,
pub app_state_bytes: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestInitChain {
pub fn new() -> RequestInitChain {
::std::default::Default::default()
}
pub fn clear_time(&mut self) {
self.time.clear();
}
pub fn has_time(&self) -> bool {
self.time.is_some()
}
pub fn set_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
self.time = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
if self.time.is_none() {
self.time.set_default();
}
self.time.as_mut().unwrap()
}
pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
}
pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp {
self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
}
pub fn clear_chain_id(&mut self) {
self.chain_id.clear();
}
pub fn set_chain_id(&mut self, v: ::std::string::String) {
self.chain_id = v;
}
pub fn mut_chain_id(&mut self) -> &mut ::std::string::String {
&mut self.chain_id
}
pub fn take_chain_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.chain_id, ::std::string::String::new())
}
pub fn get_chain_id(&self) -> &str {
&self.chain_id
}
pub fn clear_consensus_params(&mut self) {
self.consensus_params.clear();
}
pub fn has_consensus_params(&self) -> bool {
self.consensus_params.is_some()
}
pub fn set_consensus_params(&mut self, v: ConsensusParams) {
self.consensus_params = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_consensus_params(&mut self) -> &mut ConsensusParams {
if self.consensus_params.is_none() {
self.consensus_params.set_default();
}
self.consensus_params.as_mut().unwrap()
}
pub fn take_consensus_params(&mut self) -> ConsensusParams {
self.consensus_params.take().unwrap_or_else(|| ConsensusParams::new())
}
pub fn get_consensus_params(&self) -> &ConsensusParams {
self.consensus_params.as_ref().unwrap_or_else(|| ConsensusParams::default_instance())
}
pub fn clear_validators(&mut self) {
self.validators.clear();
}
pub fn set_validators(&mut self, v: ::protobuf::RepeatedField<ValidatorUpdate>) {
self.validators = v;
}
pub fn mut_validators(&mut self) -> &mut ::protobuf::RepeatedField<ValidatorUpdate> {
&mut self.validators
}
pub fn take_validators(&mut self) -> ::protobuf::RepeatedField<ValidatorUpdate> {
::std::mem::replace(&mut self.validators, ::protobuf::RepeatedField::new())
}
pub fn get_validators(&self) -> &[ValidatorUpdate] {
&self.validators
}
pub fn clear_app_state_bytes(&mut self) {
self.app_state_bytes.clear();
}
pub fn set_app_state_bytes(&mut self, v: ::std::vec::Vec<u8>) {
self.app_state_bytes = v;
}
pub fn mut_app_state_bytes(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.app_state_bytes
}
pub fn take_app_state_bytes(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.app_state_bytes, ::std::vec::Vec::new())
}
pub fn get_app_state_bytes(&self) -> &[u8] {
&self.app_state_bytes
}
}
impl ::protobuf::Message for RequestInitChain {
fn is_initialized(&self) -> bool {
for v in &self.time {
if !v.is_initialized() {
return false;
}
};
for v in &self.consensus_params {
if !v.is_initialized() {
return false;
}
};
for v in &self.validators {
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_singular_message_into(wire_type, is, &mut self.time)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_id)?;
},
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_params)?;
},
4 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validators)?;
},
5 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.app_state_bytes)?;
},
_ => {
::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 let Some(ref v) = self.time.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.chain_id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.chain_id);
}
if let Some(ref v) = self.consensus_params.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
for value in &self.validators {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if !self.app_state_bytes.is_empty() {
my_size += ::protobuf::rt::bytes_size(5, &self.app_state_bytes);
}
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 let Some(ref v) = self.time.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.chain_id.is_empty() {
os.write_string(2, &self.chain_id)?;
}
if let Some(ref v) = self.consensus_params.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.validators {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if !self.app_state_bytes.is_empty() {
os.write_bytes(5, &self.app_state_bytes)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestInitChain {
RequestInitChain::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
"time",
|m: &RequestInitChain| { &m.time },
|m: &mut RequestInitChain| { &mut m.time },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"chain_id",
|m: &RequestInitChain| { &m.chain_id },
|m: &mut RequestInitChain| { &mut m.chain_id },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConsensusParams>>(
"consensus_params",
|m: &RequestInitChain| { &m.consensus_params },
|m: &mut RequestInitChain| { &mut m.consensus_params },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorUpdate>>(
"validators",
|m: &RequestInitChain| { &m.validators },
|m: &mut RequestInitChain| { &mut m.validators },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"app_state_bytes",
|m: &RequestInitChain| { &m.app_state_bytes },
|m: &mut RequestInitChain| { &mut m.app_state_bytes },
));
::protobuf::reflect::MessageDescriptor::new::<RequestInitChain>(
"RequestInitChain",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestInitChain {
static mut instance: ::protobuf::lazy::Lazy<RequestInitChain> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestInitChain,
};
unsafe {
instance.get(RequestInitChain::new)
}
}
}
impl ::protobuf::Clear for RequestInitChain {
fn clear(&mut self) {
self.clear_time();
self.clear_chain_id();
self.clear_consensus_params();
self.clear_validators();
self.clear_app_state_bytes();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestInitChain {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestInitChain {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestQuery {
pub data: ::std::vec::Vec<u8>,
pub path: ::std::string::String,
pub height: i64,
pub prove: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestQuery {
pub fn new() -> RequestQuery {
::std::default::Default::default()
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_path(&mut self) {
self.path.clear();
}
pub fn set_path(&mut self, v: ::std::string::String) {
self.path = v;
}
pub fn mut_path(&mut self) -> &mut ::std::string::String {
&mut self.path
}
pub fn take_path(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.path, ::std::string::String::new())
}
pub fn get_path(&self) -> &str {
&self.path
}
pub fn clear_height(&mut self) {
self.height = 0;
}
pub fn set_height(&mut self, v: i64) {
self.height = v;
}
pub fn get_height(&self) -> i64 {
self.height
}
pub fn clear_prove(&mut self) {
self.prove = false;
}
pub fn set_prove(&mut self, v: bool) {
self.prove = v;
}
pub fn get_prove(&self) -> bool {
self.prove
}
}
impl ::protobuf::Message for RequestQuery {
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.data)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.path)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.height = tmp;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.prove = tmp;
},
_ => {
::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.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.data);
}
if !self.path.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.path);
}
if self.height != 0 {
my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
}
if self.prove != false {
my_size += 2;
}
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.data.is_empty() {
os.write_bytes(1, &self.data)?;
}
if !self.path.is_empty() {
os.write_string(2, &self.path)?;
}
if self.height != 0 {
os.write_int64(3, self.height)?;
}
if self.prove != false {
os.write_bool(4, self.prove)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestQuery {
RequestQuery::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>(
"data",
|m: &RequestQuery| { &m.data },
|m: &mut RequestQuery| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"path",
|m: &RequestQuery| { &m.path },
|m: &mut RequestQuery| { &mut m.path },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"height",
|m: &RequestQuery| { &m.height },
|m: &mut RequestQuery| { &mut m.height },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"prove",
|m: &RequestQuery| { &m.prove },
|m: &mut RequestQuery| { &mut m.prove },
));
::protobuf::reflect::MessageDescriptor::new::<RequestQuery>(
"RequestQuery",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestQuery {
static mut instance: ::protobuf::lazy::Lazy<RequestQuery> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestQuery,
};
unsafe {
instance.get(RequestQuery::new)
}
}
}
impl ::protobuf::Clear for RequestQuery {
fn clear(&mut self) {
self.clear_data();
self.clear_path();
self.clear_height();
self.clear_prove();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestQuery {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestQuery {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestBeginBlock {
pub hash: ::std::vec::Vec<u8>,
pub header: ::protobuf::SingularPtrField<Header>,
pub last_commit_info: ::protobuf::SingularPtrField<LastCommitInfo>,
pub byzantine_validators: ::protobuf::RepeatedField<Evidence>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestBeginBlock {
pub fn new() -> RequestBeginBlock {
::std::default::Default::default()
}
pub fn clear_hash(&mut self) {
self.hash.clear();
}
pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.hash = v;
}
pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.hash
}
pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.hash, ::std::vec::Vec::new())
}
pub fn get_hash(&self) -> &[u8] {
&self.hash
}
pub fn clear_header(&mut self) {
self.header.clear();
}
pub fn has_header(&self) -> bool {
self.header.is_some()
}
pub fn set_header(&mut self, v: Header) {
self.header = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_header(&mut self) -> &mut Header {
if self.header.is_none() {
self.header.set_default();
}
self.header.as_mut().unwrap()
}
pub fn take_header(&mut self) -> Header {
self.header.take().unwrap_or_else(|| Header::new())
}
pub fn get_header(&self) -> &Header {
self.header.as_ref().unwrap_or_else(|| Header::default_instance())
}
pub fn clear_last_commit_info(&mut self) {
self.last_commit_info.clear();
}
pub fn has_last_commit_info(&self) -> bool {
self.last_commit_info.is_some()
}
pub fn set_last_commit_info(&mut self, v: LastCommitInfo) {
self.last_commit_info = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_last_commit_info(&mut self) -> &mut LastCommitInfo {
if self.last_commit_info.is_none() {
self.last_commit_info.set_default();
}
self.last_commit_info.as_mut().unwrap()
}
pub fn take_last_commit_info(&mut self) -> LastCommitInfo {
self.last_commit_info.take().unwrap_or_else(|| LastCommitInfo::new())
}
pub fn get_last_commit_info(&self) -> &LastCommitInfo {
self.last_commit_info.as_ref().unwrap_or_else(|| LastCommitInfo::default_instance())
}
pub fn clear_byzantine_validators(&mut self) {
self.byzantine_validators.clear();
}
pub fn set_byzantine_validators(&mut self, v: ::protobuf::RepeatedField<Evidence>) {
self.byzantine_validators = v;
}
pub fn mut_byzantine_validators(&mut self) -> &mut ::protobuf::RepeatedField<Evidence> {
&mut self.byzantine_validators
}
pub fn take_byzantine_validators(&mut self) -> ::protobuf::RepeatedField<Evidence> {
::std::mem::replace(&mut self.byzantine_validators, ::protobuf::RepeatedField::new())
}
pub fn get_byzantine_validators(&self) -> &[Evidence] {
&self.byzantine_validators
}
}
impl ::protobuf::Message for RequestBeginBlock {
fn is_initialized(&self) -> bool {
for v in &self.header {
if !v.is_initialized() {
return false;
}
};
for v in &self.last_commit_info {
if !v.is_initialized() {
return false;
}
};
for v in &self.byzantine_validators {
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_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.header)?;
},
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_commit_info)?;
},
4 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.byzantine_validators)?;
},
_ => {
::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.hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.hash);
}
if let Some(ref v) = self.header.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.last_commit_info.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
for value in &self.byzantine_validators {
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.hash.is_empty() {
os.write_bytes(1, &self.hash)?;
}
if let Some(ref v) = self.header.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.last_commit_info.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.byzantine_validators {
os.write_tag(4, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestBeginBlock {
RequestBeginBlock::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>(
"hash",
|m: &RequestBeginBlock| { &m.hash },
|m: &mut RequestBeginBlock| { &mut m.hash },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Header>>(
"header",
|m: &RequestBeginBlock| { &m.header },
|m: &mut RequestBeginBlock| { &mut m.header },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LastCommitInfo>>(
"last_commit_info",
|m: &RequestBeginBlock| { &m.last_commit_info },
|m: &mut RequestBeginBlock| { &mut m.last_commit_info },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Evidence>>(
"byzantine_validators",
|m: &RequestBeginBlock| { &m.byzantine_validators },
|m: &mut RequestBeginBlock| { &mut m.byzantine_validators },
));
::protobuf::reflect::MessageDescriptor::new::<RequestBeginBlock>(
"RequestBeginBlock",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestBeginBlock {
static mut instance: ::protobuf::lazy::Lazy<RequestBeginBlock> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestBeginBlock,
};
unsafe {
instance.get(RequestBeginBlock::new)
}
}
}
impl ::protobuf::Clear for RequestBeginBlock {
fn clear(&mut self) {
self.clear_hash();
self.clear_header();
self.clear_last_commit_info();
self.clear_byzantine_validators();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestBeginBlock {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestBeginBlock {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestCheckTx {
pub tx: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestCheckTx {
pub fn new() -> RequestCheckTx {
::std::default::Default::default()
}
pub fn clear_tx(&mut self) {
self.tx.clear();
}
pub fn set_tx(&mut self, v: ::std::vec::Vec<u8>) {
self.tx = v;
}
pub fn mut_tx(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.tx
}
pub fn take_tx(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.tx, ::std::vec::Vec::new())
}
pub fn get_tx(&self) -> &[u8] {
&self.tx
}
}
impl ::protobuf::Message for RequestCheckTx {
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.tx)?;
},
_ => {
::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.tx.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.tx);
}
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.tx.is_empty() {
os.write_bytes(1, &self.tx)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestCheckTx {
RequestCheckTx::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>(
"tx",
|m: &RequestCheckTx| { &m.tx },
|m: &mut RequestCheckTx| { &mut m.tx },
));
::protobuf::reflect::MessageDescriptor::new::<RequestCheckTx>(
"RequestCheckTx",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestCheckTx {
static mut instance: ::protobuf::lazy::Lazy<RequestCheckTx> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestCheckTx,
};
unsafe {
instance.get(RequestCheckTx::new)
}
}
}
impl ::protobuf::Clear for RequestCheckTx {
fn clear(&mut self) {
self.clear_tx();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestCheckTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestCheckTx {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestDeliverTx {
pub tx: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestDeliverTx {
pub fn new() -> RequestDeliverTx {
::std::default::Default::default()
}
pub fn clear_tx(&mut self) {
self.tx.clear();
}
pub fn set_tx(&mut self, v: ::std::vec::Vec<u8>) {
self.tx = v;
}
pub fn mut_tx(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.tx
}
pub fn take_tx(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.tx, ::std::vec::Vec::new())
}
pub fn get_tx(&self) -> &[u8] {
&self.tx
}
}
impl ::protobuf::Message for RequestDeliverTx {
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.tx)?;
},
_ => {
::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.tx.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.tx);
}
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.tx.is_empty() {
os.write_bytes(1, &self.tx)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestDeliverTx {
RequestDeliverTx::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>(
"tx",
|m: &RequestDeliverTx| { &m.tx },
|m: &mut RequestDeliverTx| { &mut m.tx },
));
::protobuf::reflect::MessageDescriptor::new::<RequestDeliverTx>(
"RequestDeliverTx",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestDeliverTx {
static mut instance: ::protobuf::lazy::Lazy<RequestDeliverTx> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestDeliverTx,
};
unsafe {
instance.get(RequestDeliverTx::new)
}
}
}
impl ::protobuf::Clear for RequestDeliverTx {
fn clear(&mut self) {
self.clear_tx();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestDeliverTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestDeliverTx {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestEndBlock {
pub height: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestEndBlock {
pub fn new() -> RequestEndBlock {
::std::default::Default::default()
}
pub fn clear_height(&mut self) {
self.height = 0;
}
pub fn set_height(&mut self, v: i64) {
self.height = v;
}
pub fn get_height(&self) -> i64 {
self.height
}
}
impl ::protobuf::Message for RequestEndBlock {
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 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.height = tmp;
},
_ => {
::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.height != 0 {
my_size += ::protobuf::rt::value_size(1, self.height, ::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.height != 0 {
os.write_int64(1, self.height)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestEndBlock {
RequestEndBlock::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::ProtobufTypeInt64>(
"height",
|m: &RequestEndBlock| { &m.height },
|m: &mut RequestEndBlock| { &mut m.height },
));
::protobuf::reflect::MessageDescriptor::new::<RequestEndBlock>(
"RequestEndBlock",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestEndBlock {
static mut instance: ::protobuf::lazy::Lazy<RequestEndBlock> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestEndBlock,
};
unsafe {
instance.get(RequestEndBlock::new)
}
}
}
impl ::protobuf::Clear for RequestEndBlock {
fn clear(&mut self) {
self.clear_height();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestEndBlock {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestEndBlock {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RequestCommit {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl RequestCommit {
pub fn new() -> RequestCommit {
::std::default::Default::default()
}
}
impl ::protobuf::Message for RequestCommit {
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 {
_ => {
::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;
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<()> {
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RequestCommit {
RequestCommit::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 fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<RequestCommit>(
"RequestCommit",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static RequestCommit {
static mut instance: ::protobuf::lazy::Lazy<RequestCommit> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const RequestCommit,
};
unsafe {
instance.get(RequestCommit::new)
}
}
}
impl ::protobuf::Clear for RequestCommit {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RequestCommit {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RequestCommit {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Response {
pub value: ::std::option::Option<Response_oneof_value>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
#[derive(Clone,PartialEq)]
pub enum Response_oneof_value {
exception(ResponseException),
echo(ResponseEcho),
flush(ResponseFlush),
info(ResponseInfo),
set_option(ResponseSetOption),
init_chain(ResponseInitChain),
query(ResponseQuery),
begin_block(ResponseBeginBlock),
check_tx(ResponseCheckTx),
deliver_tx(ResponseDeliverTx),
end_block(ResponseEndBlock),
commit(ResponseCommit),
}
impl Response {
pub fn new() -> Response {
::std::default::Default::default()
}
pub fn clear_exception(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_exception(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::exception(..)) => true,
_ => false,
}
}
pub fn set_exception(&mut self, v: ResponseException) {
self.value = ::std::option::Option::Some(Response_oneof_value::exception(v))
}
pub fn mut_exception(&mut self) -> &mut ResponseException {
if let ::std::option::Option::Some(Response_oneof_value::exception(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::exception(ResponseException::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::exception(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_exception(&mut self) -> ResponseException {
if self.has_exception() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::exception(v)) => v,
_ => panic!(),
}
} else {
ResponseException::new()
}
}
pub fn get_exception(&self) -> &ResponseException {
match self.value {
::std::option::Option::Some(Response_oneof_value::exception(ref v)) => v,
_ => ResponseException::default_instance(),
}
}
pub fn clear_echo(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_echo(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::echo(..)) => true,
_ => false,
}
}
pub fn set_echo(&mut self, v: ResponseEcho) {
self.value = ::std::option::Option::Some(Response_oneof_value::echo(v))
}
pub fn mut_echo(&mut self) -> &mut ResponseEcho {
if let ::std::option::Option::Some(Response_oneof_value::echo(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::echo(ResponseEcho::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::echo(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_echo(&mut self) -> ResponseEcho {
if self.has_echo() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::echo(v)) => v,
_ => panic!(),
}
} else {
ResponseEcho::new()
}
}
pub fn get_echo(&self) -> &ResponseEcho {
match self.value {
::std::option::Option::Some(Response_oneof_value::echo(ref v)) => v,
_ => ResponseEcho::default_instance(),
}
}
pub fn clear_flush(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_flush(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::flush(..)) => true,
_ => false,
}
}
pub fn set_flush(&mut self, v: ResponseFlush) {
self.value = ::std::option::Option::Some(Response_oneof_value::flush(v))
}
pub fn mut_flush(&mut self) -> &mut ResponseFlush {
if let ::std::option::Option::Some(Response_oneof_value::flush(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::flush(ResponseFlush::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::flush(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_flush(&mut self) -> ResponseFlush {
if self.has_flush() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::flush(v)) => v,
_ => panic!(),
}
} else {
ResponseFlush::new()
}
}
pub fn get_flush(&self) -> &ResponseFlush {
match self.value {
::std::option::Option::Some(Response_oneof_value::flush(ref v)) => v,
_ => ResponseFlush::default_instance(),
}
}
pub fn clear_info(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_info(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::info(..)) => true,
_ => false,
}
}
pub fn set_info(&mut self, v: ResponseInfo) {
self.value = ::std::option::Option::Some(Response_oneof_value::info(v))
}
pub fn mut_info(&mut self) -> &mut ResponseInfo {
if let ::std::option::Option::Some(Response_oneof_value::info(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::info(ResponseInfo::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::info(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_info(&mut self) -> ResponseInfo {
if self.has_info() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::info(v)) => v,
_ => panic!(),
}
} else {
ResponseInfo::new()
}
}
pub fn get_info(&self) -> &ResponseInfo {
match self.value {
::std::option::Option::Some(Response_oneof_value::info(ref v)) => v,
_ => ResponseInfo::default_instance(),
}
}
pub fn clear_set_option(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_set_option(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::set_option(..)) => true,
_ => false,
}
}
pub fn set_set_option(&mut self, v: ResponseSetOption) {
self.value = ::std::option::Option::Some(Response_oneof_value::set_option(v))
}
pub fn mut_set_option(&mut self) -> &mut ResponseSetOption {
if let ::std::option::Option::Some(Response_oneof_value::set_option(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::set_option(ResponseSetOption::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::set_option(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_set_option(&mut self) -> ResponseSetOption {
if self.has_set_option() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::set_option(v)) => v,
_ => panic!(),
}
} else {
ResponseSetOption::new()
}
}
pub fn get_set_option(&self) -> &ResponseSetOption {
match self.value {
::std::option::Option::Some(Response_oneof_value::set_option(ref v)) => v,
_ => ResponseSetOption::default_instance(),
}
}
pub fn clear_init_chain(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_init_chain(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::init_chain(..)) => true,
_ => false,
}
}
pub fn set_init_chain(&mut self, v: ResponseInitChain) {
self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(v))
}
pub fn mut_init_chain(&mut self) -> &mut ResponseInitChain {
if let ::std::option::Option::Some(Response_oneof_value::init_chain(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(ResponseInitChain::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::init_chain(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_init_chain(&mut self) -> ResponseInitChain {
if self.has_init_chain() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::init_chain(v)) => v,
_ => panic!(),
}
} else {
ResponseInitChain::new()
}
}
pub fn get_init_chain(&self) -> &ResponseInitChain {
match self.value {
::std::option::Option::Some(Response_oneof_value::init_chain(ref v)) => v,
_ => ResponseInitChain::default_instance(),
}
}
pub fn clear_query(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_query(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::query(..)) => true,
_ => false,
}
}
pub fn set_query(&mut self, v: ResponseQuery) {
self.value = ::std::option::Option::Some(Response_oneof_value::query(v))
}
pub fn mut_query(&mut self) -> &mut ResponseQuery {
if let ::std::option::Option::Some(Response_oneof_value::query(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::query(ResponseQuery::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::query(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_query(&mut self) -> ResponseQuery {
if self.has_query() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::query(v)) => v,
_ => panic!(),
}
} else {
ResponseQuery::new()
}
}
pub fn get_query(&self) -> &ResponseQuery {
match self.value {
::std::option::Option::Some(Response_oneof_value::query(ref v)) => v,
_ => ResponseQuery::default_instance(),
}
}
pub fn clear_begin_block(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_begin_block(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::begin_block(..)) => true,
_ => false,
}
}
pub fn set_begin_block(&mut self, v: ResponseBeginBlock) {
self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(v))
}
pub fn mut_begin_block(&mut self) -> &mut ResponseBeginBlock {
if let ::std::option::Option::Some(Response_oneof_value::begin_block(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(ResponseBeginBlock::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::begin_block(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_begin_block(&mut self) -> ResponseBeginBlock {
if self.has_begin_block() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::begin_block(v)) => v,
_ => panic!(),
}
} else {
ResponseBeginBlock::new()
}
}
pub fn get_begin_block(&self) -> &ResponseBeginBlock {
match self.value {
::std::option::Option::Some(Response_oneof_value::begin_block(ref v)) => v,
_ => ResponseBeginBlock::default_instance(),
}
}
pub fn clear_check_tx(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_check_tx(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::check_tx(..)) => true,
_ => false,
}
}
pub fn set_check_tx(&mut self, v: ResponseCheckTx) {
self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(v))
}
pub fn mut_check_tx(&mut self) -> &mut ResponseCheckTx {
if let ::std::option::Option::Some(Response_oneof_value::check_tx(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(ResponseCheckTx::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::check_tx(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_check_tx(&mut self) -> ResponseCheckTx {
if self.has_check_tx() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::check_tx(v)) => v,
_ => panic!(),
}
} else {
ResponseCheckTx::new()
}
}
pub fn get_check_tx(&self) -> &ResponseCheckTx {
match self.value {
::std::option::Option::Some(Response_oneof_value::check_tx(ref v)) => v,
_ => ResponseCheckTx::default_instance(),
}
}
pub fn clear_deliver_tx(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_deliver_tx(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::deliver_tx(..)) => true,
_ => false,
}
}
pub fn set_deliver_tx(&mut self, v: ResponseDeliverTx) {
self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(v))
}
pub fn mut_deliver_tx(&mut self) -> &mut ResponseDeliverTx {
if let ::std::option::Option::Some(Response_oneof_value::deliver_tx(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(ResponseDeliverTx::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::deliver_tx(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_deliver_tx(&mut self) -> ResponseDeliverTx {
if self.has_deliver_tx() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::deliver_tx(v)) => v,
_ => panic!(),
}
} else {
ResponseDeliverTx::new()
}
}
pub fn get_deliver_tx(&self) -> &ResponseDeliverTx {
match self.value {
::std::option::Option::Some(Response_oneof_value::deliver_tx(ref v)) => v,
_ => ResponseDeliverTx::default_instance(),
}
}
pub fn clear_end_block(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_end_block(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::end_block(..)) => true,
_ => false,
}
}
pub fn set_end_block(&mut self, v: ResponseEndBlock) {
self.value = ::std::option::Option::Some(Response_oneof_value::end_block(v))
}
pub fn mut_end_block(&mut self) -> &mut ResponseEndBlock {
if let ::std::option::Option::Some(Response_oneof_value::end_block(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::end_block(ResponseEndBlock::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::end_block(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_end_block(&mut self) -> ResponseEndBlock {
if self.has_end_block() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::end_block(v)) => v,
_ => panic!(),
}
} else {
ResponseEndBlock::new()
}
}
pub fn get_end_block(&self) -> &ResponseEndBlock {
match self.value {
::std::option::Option::Some(Response_oneof_value::end_block(ref v)) => v,
_ => ResponseEndBlock::default_instance(),
}
}
pub fn clear_commit(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_commit(&self) -> bool {
match self.value {
::std::option::Option::Some(Response_oneof_value::commit(..)) => true,
_ => false,
}
}
pub fn set_commit(&mut self, v: ResponseCommit) {
self.value = ::std::option::Option::Some(Response_oneof_value::commit(v))
}
pub fn mut_commit(&mut self) -> &mut ResponseCommit {
if let ::std::option::Option::Some(Response_oneof_value::commit(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(Response_oneof_value::commit(ResponseCommit::new()));
}
match self.value {
::std::option::Option::Some(Response_oneof_value::commit(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_commit(&mut self) -> ResponseCommit {
if self.has_commit() {
match self.value.take() {
::std::option::Option::Some(Response_oneof_value::commit(v)) => v,
_ => panic!(),
}
} else {
ResponseCommit::new()
}
}
pub fn get_commit(&self) -> &ResponseCommit {
match self.value {
::std::option::Option::Some(Response_oneof_value::commit(ref v)) => v,
_ => ResponseCommit::default_instance(),
}
}
}
impl ::protobuf::Message for Response {
fn is_initialized(&self) -> bool {
if let Some(Response_oneof_value::exception(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::echo(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::flush(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::info(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::set_option(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::init_chain(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::query(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::begin_block(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::check_tx(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::deliver_tx(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::end_block(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(Response_oneof_value::commit(ref v)) = self.value {
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 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::exception(is.read_message()?));
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::echo(is.read_message()?));
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::flush(is.read_message()?));
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::info(is.read_message()?));
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::set_option(is.read_message()?));
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(is.read_message()?));
},
7 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::query(is.read_message()?));
},
8 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(is.read_message()?));
},
9 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(is.read_message()?));
},
10 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(is.read_message()?));
},
11 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::end_block(is.read_message()?));
},
12 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(Response_oneof_value::commit(is.read_message()?));
},
_ => {
::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 let ::std::option::Option::Some(ref v) = self.value {
match v {
&Response_oneof_value::exception(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::echo(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::flush(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::info(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::set_option(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::init_chain(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::query(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::begin_block(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::check_tx(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::deliver_tx(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::end_block(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Response_oneof_value::commit(ref v) => {
let len = v.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 let ::std::option::Option::Some(ref v) = self.value {
match v {
&Response_oneof_value::exception(ref v) => {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::echo(ref v) => {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::flush(ref v) => {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::info(ref v) => {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::set_option(ref v) => {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::init_chain(ref v) => {
os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::query(ref v) => {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::begin_block(ref v) => {
os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::check_tx(ref v) => {
os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::deliver_tx(ref v) => {
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::end_block(ref v) => {
os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Response_oneof_value::commit(ref v) => {
os.write_tag(12, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Response {
Response::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_singular_message_accessor::<_, ResponseException>(
"exception",
Response::has_exception,
Response::get_exception,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEcho>(
"echo",
Response::has_echo,
Response::get_echo,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseFlush>(
"flush",
Response::has_flush,
Response::get_flush,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInfo>(
"info",
Response::has_info,
Response::get_info,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseSetOption>(
"set_option",
Response::has_set_option,
Response::get_set_option,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInitChain>(
"init_chain",
Response::has_init_chain,
Response::get_init_chain,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseQuery>(
"query",
Response::has_query,
Response::get_query,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseBeginBlock>(
"begin_block",
Response::has_begin_block,
Response::get_begin_block,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCheckTx>(
"check_tx",
Response::has_check_tx,
Response::get_check_tx,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseDeliverTx>(
"deliver_tx",
Response::has_deliver_tx,
Response::get_deliver_tx,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEndBlock>(
"end_block",
Response::has_end_block,
Response::get_end_block,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCommit>(
"commit",
Response::has_commit,
Response::get_commit,
));
::protobuf::reflect::MessageDescriptor::new::<Response>(
"Response",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Response {
static mut instance: ::protobuf::lazy::Lazy<Response> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Response,
};
unsafe {
instance.get(Response::new)
}
}
}
impl ::protobuf::Clear for Response {
fn clear(&mut self) {
self.clear_exception();
self.clear_echo();
self.clear_flush();
self.clear_info();
self.clear_set_option();
self.clear_init_chain();
self.clear_query();
self.clear_begin_block();
self.clear_check_tx();
self.clear_deliver_tx();
self.clear_end_block();
self.clear_commit();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Response {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Response {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseException {
pub error: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseException {
pub fn new() -> ResponseException {
::std::default::Default::default()
}
pub fn clear_error(&mut self) {
self.error.clear();
}
pub fn set_error(&mut self, v: ::std::string::String) {
self.error = v;
}
pub fn mut_error(&mut self) -> &mut ::std::string::String {
&mut self.error
}
pub fn take_error(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.error, ::std::string::String::new())
}
pub fn get_error(&self) -> &str {
&self.error
}
}
impl ::protobuf::Message for ResponseException {
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.error)?;
},
_ => {
::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.error.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.error);
}
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.error.is_empty() {
os.write_string(1, &self.error)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseException {
ResponseException::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::ProtobufTypeString>(
"error",
|m: &ResponseException| { &m.error },
|m: &mut ResponseException| { &mut m.error },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseException>(
"ResponseException",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseException {
static mut instance: ::protobuf::lazy::Lazy<ResponseException> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseException,
};
unsafe {
instance.get(ResponseException::new)
}
}
}
impl ::protobuf::Clear for ResponseException {
fn clear(&mut self) {
self.clear_error();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseException {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseException {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseEcho {
pub message: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseEcho {
pub fn new() -> ResponseEcho {
::std::default::Default::default()
}
pub fn clear_message(&mut self) {
self.message.clear();
}
pub fn set_message(&mut self, v: ::std::string::String) {
self.message = v;
}
pub fn mut_message(&mut self) -> &mut ::std::string::String {
&mut self.message
}
pub fn take_message(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.message, ::std::string::String::new())
}
pub fn get_message(&self) -> &str {
&self.message
}
}
impl ::protobuf::Message for ResponseEcho {
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.message)?;
},
_ => {
::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.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.message);
}
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.is_empty() {
os.write_string(1, &self.message)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseEcho {
ResponseEcho::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::ProtobufTypeString>(
"message",
|m: &ResponseEcho| { &m.message },
|m: &mut ResponseEcho| { &mut m.message },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseEcho>(
"ResponseEcho",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseEcho {
static mut instance: ::protobuf::lazy::Lazy<ResponseEcho> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseEcho,
};
unsafe {
instance.get(ResponseEcho::new)
}
}
}
impl ::protobuf::Clear for ResponseEcho {
fn clear(&mut self) {
self.clear_message();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseEcho {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseEcho {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseFlush {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseFlush {
pub fn new() -> ResponseFlush {
::std::default::Default::default()
}
}
impl ::protobuf::Message for ResponseFlush {
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 {
_ => {
::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;
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<()> {
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseFlush {
ResponseFlush::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 fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<ResponseFlush>(
"ResponseFlush",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseFlush {
static mut instance: ::protobuf::lazy::Lazy<ResponseFlush> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseFlush,
};
unsafe {
instance.get(ResponseFlush::new)
}
}
}
impl ::protobuf::Clear for ResponseFlush {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseFlush {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseFlush {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseInfo {
pub data: ::std::string::String,
pub version: ::std::string::String,
pub app_version: u64,
pub last_block_height: i64,
pub last_block_app_hash: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseInfo {
pub fn new() -> ResponseInfo {
::std::default::Default::default()
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::string::String) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::string::String {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.data, ::std::string::String::new())
}
pub fn get_data(&self) -> &str {
&self.data
}
pub fn clear_version(&mut self) {
self.version.clear();
}
pub fn set_version(&mut self, v: ::std::string::String) {
self.version = v;
}
pub fn mut_version(&mut self) -> &mut ::std::string::String {
&mut self.version
}
pub fn take_version(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.version, ::std::string::String::new())
}
pub fn get_version(&self) -> &str {
&self.version
}
pub fn clear_app_version(&mut self) {
self.app_version = 0;
}
pub fn set_app_version(&mut self, v: u64) {
self.app_version = v;
}
pub fn get_app_version(&self) -> u64 {
self.app_version
}
pub fn clear_last_block_height(&mut self) {
self.last_block_height = 0;
}
pub fn set_last_block_height(&mut self, v: i64) {
self.last_block_height = v;
}
pub fn get_last_block_height(&self) -> i64 {
self.last_block_height
}
pub fn clear_last_block_app_hash(&mut self) {
self.last_block_app_hash.clear();
}
pub fn set_last_block_app_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.last_block_app_hash = v;
}
pub fn mut_last_block_app_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.last_block_app_hash
}
pub fn take_last_block_app_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.last_block_app_hash, ::std::vec::Vec::new())
}
pub fn get_last_block_app_hash(&self) -> &[u8] {
&self.last_block_app_hash
}
}
impl ::protobuf::Message for ResponseInfo {
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.data)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.version)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.app_version = tmp;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.last_block_height = tmp;
},
5 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_block_app_hash)?;
},
_ => {
::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.data.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.data);
}
if !self.version.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.version);
}
if self.app_version != 0 {
my_size += ::protobuf::rt::value_size(3, self.app_version, ::protobuf::wire_format::WireTypeVarint);
}
if self.last_block_height != 0 {
my_size += ::protobuf::rt::value_size(4, self.last_block_height, ::protobuf::wire_format::WireTypeVarint);
}
if !self.last_block_app_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(5, &self.last_block_app_hash);
}
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.data.is_empty() {
os.write_string(1, &self.data)?;
}
if !self.version.is_empty() {
os.write_string(2, &self.version)?;
}
if self.app_version != 0 {
os.write_uint64(3, self.app_version)?;
}
if self.last_block_height != 0 {
os.write_int64(4, self.last_block_height)?;
}
if !self.last_block_app_hash.is_empty() {
os.write_bytes(5, &self.last_block_app_hash)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseInfo {
ResponseInfo::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::ProtobufTypeString>(
"data",
|m: &ResponseInfo| { &m.data },
|m: &mut ResponseInfo| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"version",
|m: &ResponseInfo| { &m.version },
|m: &mut ResponseInfo| { &mut m.version },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"app_version",
|m: &ResponseInfo| { &m.app_version },
|m: &mut ResponseInfo| { &mut m.app_version },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"last_block_height",
|m: &ResponseInfo| { &m.last_block_height },
|m: &mut ResponseInfo| { &mut m.last_block_height },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"last_block_app_hash",
|m: &ResponseInfo| { &m.last_block_app_hash },
|m: &mut ResponseInfo| { &mut m.last_block_app_hash },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseInfo>(
"ResponseInfo",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseInfo {
static mut instance: ::protobuf::lazy::Lazy<ResponseInfo> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseInfo,
};
unsafe {
instance.get(ResponseInfo::new)
}
}
}
impl ::protobuf::Clear for ResponseInfo {
fn clear(&mut self) {
self.clear_data();
self.clear_version();
self.clear_app_version();
self.clear_last_block_height();
self.clear_last_block_app_hash();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseInfo {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseSetOption {
pub code: u32,
pub log: ::std::string::String,
pub info: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseSetOption {
pub fn new() -> ResponseSetOption {
::std::default::Default::default()
}
pub fn clear_code(&mut self) {
self.code = 0;
}
pub fn set_code(&mut self, v: u32) {
self.code = v;
}
pub fn get_code(&self) -> u32 {
self.code
}
pub fn clear_log(&mut self) {
self.log.clear();
}
pub fn set_log(&mut self, v: ::std::string::String) {
self.log = v;
}
pub fn mut_log(&mut self) -> &mut ::std::string::String {
&mut self.log
}
pub fn take_log(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.log, ::std::string::String::new())
}
pub fn get_log(&self) -> &str {
&self.log
}
pub fn clear_info(&mut self) {
self.info.clear();
}
pub fn set_info(&mut self, v: ::std::string::String) {
self.info = v;
}
pub fn mut_info(&mut self) -> &mut ::std::string::String {
&mut self.info
}
pub fn take_info(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.info, ::std::string::String::new())
}
pub fn get_info(&self) -> &str {
&self.info
}
}
impl ::protobuf::Message for ResponseSetOption {
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 => {
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.code = tmp;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
},
_ => {
::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.code != 0 {
my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
}
if !self.log.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.log);
}
if !self.info.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.info);
}
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.code != 0 {
os.write_uint32(1, self.code)?;
}
if !self.log.is_empty() {
os.write_string(3, &self.log)?;
}
if !self.info.is_empty() {
os.write_string(4, &self.info)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseSetOption {
ResponseSetOption::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::ProtobufTypeUint32>(
"code",
|m: &ResponseSetOption| { &m.code },
|m: &mut ResponseSetOption| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"log",
|m: &ResponseSetOption| { &m.log },
|m: &mut ResponseSetOption| { &mut m.log },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"info",
|m: &ResponseSetOption| { &m.info },
|m: &mut ResponseSetOption| { &mut m.info },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseSetOption>(
"ResponseSetOption",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseSetOption {
static mut instance: ::protobuf::lazy::Lazy<ResponseSetOption> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseSetOption,
};
unsafe {
instance.get(ResponseSetOption::new)
}
}
}
impl ::protobuf::Clear for ResponseSetOption {
fn clear(&mut self) {
self.clear_code();
self.clear_log();
self.clear_info();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseSetOption {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseSetOption {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseInitChain {
pub consensus_params: ::protobuf::SingularPtrField<ConsensusParams>,
pub validators: ::protobuf::RepeatedField<ValidatorUpdate>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseInitChain {
pub fn new() -> ResponseInitChain {
::std::default::Default::default()
}
pub fn clear_consensus_params(&mut self) {
self.consensus_params.clear();
}
pub fn has_consensus_params(&self) -> bool {
self.consensus_params.is_some()
}
pub fn set_consensus_params(&mut self, v: ConsensusParams) {
self.consensus_params = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_consensus_params(&mut self) -> &mut ConsensusParams {
if self.consensus_params.is_none() {
self.consensus_params.set_default();
}
self.consensus_params.as_mut().unwrap()
}
pub fn take_consensus_params(&mut self) -> ConsensusParams {
self.consensus_params.take().unwrap_or_else(|| ConsensusParams::new())
}
pub fn get_consensus_params(&self) -> &ConsensusParams {
self.consensus_params.as_ref().unwrap_or_else(|| ConsensusParams::default_instance())
}
pub fn clear_validators(&mut self) {
self.validators.clear();
}
pub fn set_validators(&mut self, v: ::protobuf::RepeatedField<ValidatorUpdate>) {
self.validators = v;
}
pub fn mut_validators(&mut self) -> &mut ::protobuf::RepeatedField<ValidatorUpdate> {
&mut self.validators
}
pub fn take_validators(&mut self) -> ::protobuf::RepeatedField<ValidatorUpdate> {
::std::mem::replace(&mut self.validators, ::protobuf::RepeatedField::new())
}
pub fn get_validators(&self) -> &[ValidatorUpdate] {
&self.validators
}
}
impl ::protobuf::Message for ResponseInitChain {
fn is_initialized(&self) -> bool {
for v in &self.consensus_params {
if !v.is_initialized() {
return false;
}
};
for v in &self.validators {
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_singular_message_into(wire_type, is, &mut self.consensus_params)?;
},
2 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validators)?;
},
_ => {
::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 let Some(ref v) = self.consensus_params.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
for value in &self.validators {
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 let Some(ref v) = self.consensus_params.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
for v in &self.validators {
os.write_tag(2, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseInitChain {
ResponseInitChain::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConsensusParams>>(
"consensus_params",
|m: &ResponseInitChain| { &m.consensus_params },
|m: &mut ResponseInitChain| { &mut m.consensus_params },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorUpdate>>(
"validators",
|m: &ResponseInitChain| { &m.validators },
|m: &mut ResponseInitChain| { &mut m.validators },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseInitChain>(
"ResponseInitChain",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseInitChain {
static mut instance: ::protobuf::lazy::Lazy<ResponseInitChain> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseInitChain,
};
unsafe {
instance.get(ResponseInitChain::new)
}
}
}
impl ::protobuf::Clear for ResponseInitChain {
fn clear(&mut self) {
self.clear_consensus_params();
self.clear_validators();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseInitChain {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseInitChain {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseQuery {
pub code: u32,
pub log: ::std::string::String,
pub info: ::std::string::String,
pub index: i64,
pub key: ::std::vec::Vec<u8>,
pub value: ::std::vec::Vec<u8>,
pub proof: ::protobuf::SingularPtrField<super::merkle::Proof>,
pub height: i64,
pub codespace: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseQuery {
pub fn new() -> ResponseQuery {
::std::default::Default::default()
}
pub fn clear_code(&mut self) {
self.code = 0;
}
pub fn set_code(&mut self, v: u32) {
self.code = v;
}
pub fn get_code(&self) -> u32 {
self.code
}
pub fn clear_log(&mut self) {
self.log.clear();
}
pub fn set_log(&mut self, v: ::std::string::String) {
self.log = v;
}
pub fn mut_log(&mut self) -> &mut ::std::string::String {
&mut self.log
}
pub fn take_log(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.log, ::std::string::String::new())
}
pub fn get_log(&self) -> &str {
&self.log
}
pub fn clear_info(&mut self) {
self.info.clear();
}
pub fn set_info(&mut self, v: ::std::string::String) {
self.info = v;
}
pub fn mut_info(&mut self) -> &mut ::std::string::String {
&mut self.info
}
pub fn take_info(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.info, ::std::string::String::new())
}
pub fn get_info(&self) -> &str {
&self.info
}
pub fn clear_index(&mut self) {
self.index = 0;
}
pub fn set_index(&mut self, v: i64) {
self.index = v;
}
pub fn get_index(&self) -> i64 {
self.index
}
pub fn clear_key(&mut self) {
self.key.clear();
}
pub fn set_key(&mut self, v: ::std::vec::Vec<u8>) {
self.key = v;
}
pub fn mut_key(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.key
}
pub fn take_key(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.key, ::std::vec::Vec::new())
}
pub fn get_key(&self) -> &[u8] {
&self.key
}
pub fn clear_value(&mut self) {
self.value.clear();
}
pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
self.value = v;
}
pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.value
}
pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
}
pub fn get_value(&self) -> &[u8] {
&self.value
}
pub fn clear_proof(&mut self) {
self.proof.clear();
}
pub fn has_proof(&self) -> bool {
self.proof.is_some()
}
pub fn set_proof(&mut self, v: super::merkle::Proof) {
self.proof = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_proof(&mut self) -> &mut super::merkle::Proof {
if self.proof.is_none() {
self.proof.set_default();
}
self.proof.as_mut().unwrap()
}
pub fn take_proof(&mut self) -> super::merkle::Proof {
self.proof.take().unwrap_or_else(|| super::merkle::Proof::new())
}
pub fn get_proof(&self) -> &super::merkle::Proof {
self.proof.as_ref().unwrap_or_else(|| super::merkle::Proof::default_instance())
}
pub fn clear_height(&mut self) {
self.height = 0;
}
pub fn set_height(&mut self, v: i64) {
self.height = v;
}
pub fn get_height(&self) -> i64 {
self.height
}
pub fn clear_codespace(&mut self) {
self.codespace.clear();
}
pub fn set_codespace(&mut self, v: ::std::string::String) {
self.codespace = v;
}
pub fn mut_codespace(&mut self) -> &mut ::std::string::String {
&mut self.codespace
}
pub fn take_codespace(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.codespace, ::std::string::String::new())
}
pub fn get_codespace(&self) -> &str {
&self.codespace
}
}
impl ::protobuf::Message for ResponseQuery {
fn is_initialized(&self) -> bool {
for v in &self.proof {
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 => {
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.code = tmp;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.index = tmp;
},
6 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?;
},
7 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
},
8 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.proof)?;
},
9 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.height = tmp;
},
10 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.codespace)?;
},
_ => {
::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.code != 0 {
my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
}
if !self.log.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.log);
}
if !self.info.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.info);
}
if self.index != 0 {
my_size += ::protobuf::rt::value_size(5, self.index, ::protobuf::wire_format::WireTypeVarint);
}
if !self.key.is_empty() {
my_size += ::protobuf::rt::bytes_size(6, &self.key);
}
if !self.value.is_empty() {
my_size += ::protobuf::rt::bytes_size(7, &self.value);
}
if let Some(ref v) = self.proof.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.height != 0 {
my_size += ::protobuf::rt::value_size(9, self.height, ::protobuf::wire_format::WireTypeVarint);
}
if !self.codespace.is_empty() {
my_size += ::protobuf::rt::string_size(10, &self.codespace);
}
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.code != 0 {
os.write_uint32(1, self.code)?;
}
if !self.log.is_empty() {
os.write_string(3, &self.log)?;
}
if !self.info.is_empty() {
os.write_string(4, &self.info)?;
}
if self.index != 0 {
os.write_int64(5, self.index)?;
}
if !self.key.is_empty() {
os.write_bytes(6, &self.key)?;
}
if !self.value.is_empty() {
os.write_bytes(7, &self.value)?;
}
if let Some(ref v) = self.proof.as_ref() {
os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.height != 0 {
os.write_int64(9, self.height)?;
}
if !self.codespace.is_empty() {
os.write_string(10, &self.codespace)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseQuery {
ResponseQuery::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::ProtobufTypeUint32>(
"code",
|m: &ResponseQuery| { &m.code },
|m: &mut ResponseQuery| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"log",
|m: &ResponseQuery| { &m.log },
|m: &mut ResponseQuery| { &mut m.log },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"info",
|m: &ResponseQuery| { &m.info },
|m: &mut ResponseQuery| { &mut m.info },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"index",
|m: &ResponseQuery| { &m.index },
|m: &mut ResponseQuery| { &mut m.index },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"key",
|m: &ResponseQuery| { &m.key },
|m: &mut ResponseQuery| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"value",
|m: &ResponseQuery| { &m.value },
|m: &mut ResponseQuery| { &mut m.value },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::merkle::Proof>>(
"proof",
|m: &ResponseQuery| { &m.proof },
|m: &mut ResponseQuery| { &mut m.proof },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"height",
|m: &ResponseQuery| { &m.height },
|m: &mut ResponseQuery| { &mut m.height },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"codespace",
|m: &ResponseQuery| { &m.codespace },
|m: &mut ResponseQuery| { &mut m.codespace },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseQuery>(
"ResponseQuery",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseQuery {
static mut instance: ::protobuf::lazy::Lazy<ResponseQuery> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseQuery,
};
unsafe {
instance.get(ResponseQuery::new)
}
}
}
impl ::protobuf::Clear for ResponseQuery {
fn clear(&mut self) {
self.clear_code();
self.clear_log();
self.clear_info();
self.clear_index();
self.clear_key();
self.clear_value();
self.clear_proof();
self.clear_height();
self.clear_codespace();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseQuery {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseQuery {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseBeginBlock {
pub tags: ::protobuf::RepeatedField<super::types::KVPair>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseBeginBlock {
pub fn new() -> ResponseBeginBlock {
::std::default::Default::default()
}
pub fn clear_tags(&mut self) {
self.tags.clear();
}
pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::types::KVPair>) {
self.tags = v;
}
pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::types::KVPair> {
&mut self.tags
}
pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::types::KVPair> {
::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
}
pub fn get_tags(&self) -> &[super::types::KVPair] {
&self.tags
}
}
impl ::protobuf::Message for ResponseBeginBlock {
fn is_initialized(&self) -> bool {
for v in &self.tags {
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.tags)?;
},
_ => {
::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.tags {
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.tags {
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseBeginBlock {
ResponseBeginBlock::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::types::KVPair>>(
"tags",
|m: &ResponseBeginBlock| { &m.tags },
|m: &mut ResponseBeginBlock| { &mut m.tags },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseBeginBlock>(
"ResponseBeginBlock",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseBeginBlock {
static mut instance: ::protobuf::lazy::Lazy<ResponseBeginBlock> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseBeginBlock,
};
unsafe {
instance.get(ResponseBeginBlock::new)
}
}
}
impl ::protobuf::Clear for ResponseBeginBlock {
fn clear(&mut self) {
self.clear_tags();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseBeginBlock {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseBeginBlock {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseCheckTx {
pub code: u32,
pub data: ::std::vec::Vec<u8>,
pub log: ::std::string::String,
pub info: ::std::string::String,
pub gas_wanted: i64,
pub gas_used: i64,
pub tags: ::protobuf::RepeatedField<super::types::KVPair>,
pub codespace: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseCheckTx {
pub fn new() -> ResponseCheckTx {
::std::default::Default::default()
}
pub fn clear_code(&mut self) {
self.code = 0;
}
pub fn set_code(&mut self, v: u32) {
self.code = v;
}
pub fn get_code(&self) -> u32 {
self.code
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_log(&mut self) {
self.log.clear();
}
pub fn set_log(&mut self, v: ::std::string::String) {
self.log = v;
}
pub fn mut_log(&mut self) -> &mut ::std::string::String {
&mut self.log
}
pub fn take_log(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.log, ::std::string::String::new())
}
pub fn get_log(&self) -> &str {
&self.log
}
pub fn clear_info(&mut self) {
self.info.clear();
}
pub fn set_info(&mut self, v: ::std::string::String) {
self.info = v;
}
pub fn mut_info(&mut self) -> &mut ::std::string::String {
&mut self.info
}
pub fn take_info(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.info, ::std::string::String::new())
}
pub fn get_info(&self) -> &str {
&self.info
}
pub fn clear_gas_wanted(&mut self) {
self.gas_wanted = 0;
}
pub fn set_gas_wanted(&mut self, v: i64) {
self.gas_wanted = v;
}
pub fn get_gas_wanted(&self) -> i64 {
self.gas_wanted
}
pub fn clear_gas_used(&mut self) {
self.gas_used = 0;
}
pub fn set_gas_used(&mut self, v: i64) {
self.gas_used = v;
}
pub fn get_gas_used(&self) -> i64 {
self.gas_used
}
pub fn clear_tags(&mut self) {
self.tags.clear();
}
pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::types::KVPair>) {
self.tags = v;
}
pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::types::KVPair> {
&mut self.tags
}
pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::types::KVPair> {
::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
}
pub fn get_tags(&self) -> &[super::types::KVPair] {
&self.tags
}
pub fn clear_codespace(&mut self) {
self.codespace.clear();
}
pub fn set_codespace(&mut self, v: ::std::string::String) {
self.codespace = v;
}
pub fn mut_codespace(&mut self) -> &mut ::std::string::String {
&mut self.codespace
}
pub fn take_codespace(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.codespace, ::std::string::String::new())
}
pub fn get_codespace(&self) -> &str {
&self.codespace
}
}
impl ::protobuf::Message for ResponseCheckTx {
fn is_initialized(&self) -> bool {
for v in &self.tags {
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 => {
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.code = tmp;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.gas_wanted = tmp;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.gas_used = tmp;
},
7 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
},
8 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.codespace)?;
},
_ => {
::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.code != 0 {
my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.data);
}
if !self.log.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.log);
}
if !self.info.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.info);
}
if self.gas_wanted != 0 {
my_size += ::protobuf::rt::value_size(5, self.gas_wanted, ::protobuf::wire_format::WireTypeVarint);
}
if self.gas_used != 0 {
my_size += ::protobuf::rt::value_size(6, self.gas_used, ::protobuf::wire_format::WireTypeVarint);
}
for value in &self.tags {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if !self.codespace.is_empty() {
my_size += ::protobuf::rt::string_size(8, &self.codespace);
}
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.code != 0 {
os.write_uint32(1, self.code)?;
}
if !self.data.is_empty() {
os.write_bytes(2, &self.data)?;
}
if !self.log.is_empty() {
os.write_string(3, &self.log)?;
}
if !self.info.is_empty() {
os.write_string(4, &self.info)?;
}
if self.gas_wanted != 0 {
os.write_int64(5, self.gas_wanted)?;
}
if self.gas_used != 0 {
os.write_int64(6, self.gas_used)?;
}
for v in &self.tags {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if !self.codespace.is_empty() {
os.write_string(8, &self.codespace)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseCheckTx {
ResponseCheckTx::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::ProtobufTypeUint32>(
"code",
|m: &ResponseCheckTx| { &m.code },
|m: &mut ResponseCheckTx| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &ResponseCheckTx| { &m.data },
|m: &mut ResponseCheckTx| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"log",
|m: &ResponseCheckTx| { &m.log },
|m: &mut ResponseCheckTx| { &mut m.log },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"info",
|m: &ResponseCheckTx| { &m.info },
|m: &mut ResponseCheckTx| { &mut m.info },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"gas_wanted",
|m: &ResponseCheckTx| { &m.gas_wanted },
|m: &mut ResponseCheckTx| { &mut m.gas_wanted },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"gas_used",
|m: &ResponseCheckTx| { &m.gas_used },
|m: &mut ResponseCheckTx| { &mut m.gas_used },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::types::KVPair>>(
"tags",
|m: &ResponseCheckTx| { &m.tags },
|m: &mut ResponseCheckTx| { &mut m.tags },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"codespace",
|m: &ResponseCheckTx| { &m.codespace },
|m: &mut ResponseCheckTx| { &mut m.codespace },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseCheckTx>(
"ResponseCheckTx",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseCheckTx {
static mut instance: ::protobuf::lazy::Lazy<ResponseCheckTx> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseCheckTx,
};
unsafe {
instance.get(ResponseCheckTx::new)
}
}
}
impl ::protobuf::Clear for ResponseCheckTx {
fn clear(&mut self) {
self.clear_code();
self.clear_data();
self.clear_log();
self.clear_info();
self.clear_gas_wanted();
self.clear_gas_used();
self.clear_tags();
self.clear_codespace();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseCheckTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseCheckTx {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseDeliverTx {
pub code: u32,
pub data: ::std::vec::Vec<u8>,
pub log: ::std::string::String,
pub info: ::std::string::String,
pub gas_wanted: i64,
pub gas_used: i64,
pub tags: ::protobuf::RepeatedField<super::types::KVPair>,
pub codespace: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseDeliverTx {
pub fn new() -> ResponseDeliverTx {
::std::default::Default::default()
}
pub fn clear_code(&mut self) {
self.code = 0;
}
pub fn set_code(&mut self, v: u32) {
self.code = v;
}
pub fn get_code(&self) -> u32 {
self.code
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_log(&mut self) {
self.log.clear();
}
pub fn set_log(&mut self, v: ::std::string::String) {
self.log = v;
}
pub fn mut_log(&mut self) -> &mut ::std::string::String {
&mut self.log
}
pub fn take_log(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.log, ::std::string::String::new())
}
pub fn get_log(&self) -> &str {
&self.log
}
pub fn clear_info(&mut self) {
self.info.clear();
}
pub fn set_info(&mut self, v: ::std::string::String) {
self.info = v;
}
pub fn mut_info(&mut self) -> &mut ::std::string::String {
&mut self.info
}
pub fn take_info(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.info, ::std::string::String::new())
}
pub fn get_info(&self) -> &str {
&self.info
}
pub fn clear_gas_wanted(&mut self) {
self.gas_wanted = 0;
}
pub fn set_gas_wanted(&mut self, v: i64) {
self.gas_wanted = v;
}
pub fn get_gas_wanted(&self) -> i64 {
self.gas_wanted
}
pub fn clear_gas_used(&mut self) {
self.gas_used = 0;
}
pub fn set_gas_used(&mut self, v: i64) {
self.gas_used = v;
}
pub fn get_gas_used(&self) -> i64 {
self.gas_used
}
pub fn clear_tags(&mut self) {
self.tags.clear();
}
pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::types::KVPair>) {
self.tags = v;
}
pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::types::KVPair> {
&mut self.tags
}
pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::types::KVPair> {
::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
}
pub fn get_tags(&self) -> &[super::types::KVPair] {
&self.tags
}
pub fn clear_codespace(&mut self) {
self.codespace.clear();
}
pub fn set_codespace(&mut self, v: ::std::string::String) {
self.codespace = v;
}
pub fn mut_codespace(&mut self) -> &mut ::std::string::String {
&mut self.codespace
}
pub fn take_codespace(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.codespace, ::std::string::String::new())
}
pub fn get_codespace(&self) -> &str {
&self.codespace
}
}
impl ::protobuf::Message for ResponseDeliverTx {
fn is_initialized(&self) -> bool {
for v in &self.tags {
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 => {
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.code = tmp;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.gas_wanted = tmp;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.gas_used = tmp;
},
7 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
},
8 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.codespace)?;
},
_ => {
::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.code != 0 {
my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.data);
}
if !self.log.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.log);
}
if !self.info.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.info);
}
if self.gas_wanted != 0 {
my_size += ::protobuf::rt::value_size(5, self.gas_wanted, ::protobuf::wire_format::WireTypeVarint);
}
if self.gas_used != 0 {
my_size += ::protobuf::rt::value_size(6, self.gas_used, ::protobuf::wire_format::WireTypeVarint);
}
for value in &self.tags {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if !self.codespace.is_empty() {
my_size += ::protobuf::rt::string_size(8, &self.codespace);
}
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.code != 0 {
os.write_uint32(1, self.code)?;
}
if !self.data.is_empty() {
os.write_bytes(2, &self.data)?;
}
if !self.log.is_empty() {
os.write_string(3, &self.log)?;
}
if !self.info.is_empty() {
os.write_string(4, &self.info)?;
}
if self.gas_wanted != 0 {
os.write_int64(5, self.gas_wanted)?;
}
if self.gas_used != 0 {
os.write_int64(6, self.gas_used)?;
}
for v in &self.tags {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if !self.codespace.is_empty() {
os.write_string(8, &self.codespace)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseDeliverTx {
ResponseDeliverTx::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::ProtobufTypeUint32>(
"code",
|m: &ResponseDeliverTx| { &m.code },
|m: &mut ResponseDeliverTx| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &ResponseDeliverTx| { &m.data },
|m: &mut ResponseDeliverTx| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"log",
|m: &ResponseDeliverTx| { &m.log },
|m: &mut ResponseDeliverTx| { &mut m.log },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"info",
|m: &ResponseDeliverTx| { &m.info },
|m: &mut ResponseDeliverTx| { &mut m.info },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"gas_wanted",
|m: &ResponseDeliverTx| { &m.gas_wanted },
|m: &mut ResponseDeliverTx| { &mut m.gas_wanted },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"gas_used",
|m: &ResponseDeliverTx| { &m.gas_used },
|m: &mut ResponseDeliverTx| { &mut m.gas_used },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::types::KVPair>>(
"tags",
|m: &ResponseDeliverTx| { &m.tags },
|m: &mut ResponseDeliverTx| { &mut m.tags },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"codespace",
|m: &ResponseDeliverTx| { &m.codespace },
|m: &mut ResponseDeliverTx| { &mut m.codespace },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseDeliverTx>(
"ResponseDeliverTx",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseDeliverTx {
static mut instance: ::protobuf::lazy::Lazy<ResponseDeliverTx> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseDeliverTx,
};
unsafe {
instance.get(ResponseDeliverTx::new)
}
}
}
impl ::protobuf::Clear for ResponseDeliverTx {
fn clear(&mut self) {
self.clear_code();
self.clear_data();
self.clear_log();
self.clear_info();
self.clear_gas_wanted();
self.clear_gas_used();
self.clear_tags();
self.clear_codespace();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseDeliverTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseDeliverTx {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseEndBlock {
pub validator_updates: ::protobuf::RepeatedField<ValidatorUpdate>,
pub consensus_param_updates: ::protobuf::SingularPtrField<ConsensusParams>,
pub tags: ::protobuf::RepeatedField<super::types::KVPair>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseEndBlock {
pub fn new() -> ResponseEndBlock {
::std::default::Default::default()
}
pub fn clear_validator_updates(&mut self) {
self.validator_updates.clear();
}
pub fn set_validator_updates(&mut self, v: ::protobuf::RepeatedField<ValidatorUpdate>) {
self.validator_updates = v;
}
pub fn mut_validator_updates(&mut self) -> &mut ::protobuf::RepeatedField<ValidatorUpdate> {
&mut self.validator_updates
}
pub fn take_validator_updates(&mut self) -> ::protobuf::RepeatedField<ValidatorUpdate> {
::std::mem::replace(&mut self.validator_updates, ::protobuf::RepeatedField::new())
}
pub fn get_validator_updates(&self) -> &[ValidatorUpdate] {
&self.validator_updates
}
pub fn clear_consensus_param_updates(&mut self) {
self.consensus_param_updates.clear();
}
pub fn has_consensus_param_updates(&self) -> bool {
self.consensus_param_updates.is_some()
}
pub fn set_consensus_param_updates(&mut self, v: ConsensusParams) {
self.consensus_param_updates = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_consensus_param_updates(&mut self) -> &mut ConsensusParams {
if self.consensus_param_updates.is_none() {
self.consensus_param_updates.set_default();
}
self.consensus_param_updates.as_mut().unwrap()
}
pub fn take_consensus_param_updates(&mut self) -> ConsensusParams {
self.consensus_param_updates.take().unwrap_or_else(|| ConsensusParams::new())
}
pub fn get_consensus_param_updates(&self) -> &ConsensusParams {
self.consensus_param_updates.as_ref().unwrap_or_else(|| ConsensusParams::default_instance())
}
pub fn clear_tags(&mut self) {
self.tags.clear();
}
pub fn set_tags(&mut self, v: ::protobuf::RepeatedField<super::types::KVPair>) {
self.tags = v;
}
pub fn mut_tags(&mut self) -> &mut ::protobuf::RepeatedField<super::types::KVPair> {
&mut self.tags
}
pub fn take_tags(&mut self) -> ::protobuf::RepeatedField<super::types::KVPair> {
::std::mem::replace(&mut self.tags, ::protobuf::RepeatedField::new())
}
pub fn get_tags(&self) -> &[super::types::KVPair] {
&self.tags
}
}
impl ::protobuf::Message for ResponseEndBlock {
fn is_initialized(&self) -> bool {
for v in &self.validator_updates {
if !v.is_initialized() {
return false;
}
};
for v in &self.consensus_param_updates {
if !v.is_initialized() {
return false;
}
};
for v in &self.tags {
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.validator_updates)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_param_updates)?;
},
3 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tags)?;
},
_ => {
::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.validator_updates {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if let Some(ref v) = self.consensus_param_updates.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
for value in &self.tags {
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.validator_updates {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if let Some(ref v) = self.consensus_param_updates.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
for v in &self.tags {
os.write_tag(3, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseEndBlock {
ResponseEndBlock::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorUpdate>>(
"validator_updates",
|m: &ResponseEndBlock| { &m.validator_updates },
|m: &mut ResponseEndBlock| { &mut m.validator_updates },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConsensusParams>>(
"consensus_param_updates",
|m: &ResponseEndBlock| { &m.consensus_param_updates },
|m: &mut ResponseEndBlock| { &mut m.consensus_param_updates },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::types::KVPair>>(
"tags",
|m: &ResponseEndBlock| { &m.tags },
|m: &mut ResponseEndBlock| { &mut m.tags },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseEndBlock>(
"ResponseEndBlock",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseEndBlock {
static mut instance: ::protobuf::lazy::Lazy<ResponseEndBlock> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseEndBlock,
};
unsafe {
instance.get(ResponseEndBlock::new)
}
}
}
impl ::protobuf::Clear for ResponseEndBlock {
fn clear(&mut self) {
self.clear_validator_updates();
self.clear_consensus_param_updates();
self.clear_tags();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseEndBlock {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseEndBlock {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ResponseCommit {
pub data: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ResponseCommit {
pub fn new() -> ResponseCommit {
::std::default::Default::default()
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
}
impl ::protobuf::Message for ResponseCommit {
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 {
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
_ => {
::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.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.data);
}
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.data.is_empty() {
os.write_bytes(2, &self.data)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ResponseCommit {
ResponseCommit::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>(
"data",
|m: &ResponseCommit| { &m.data },
|m: &mut ResponseCommit| { &mut m.data },
));
::protobuf::reflect::MessageDescriptor::new::<ResponseCommit>(
"ResponseCommit",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ResponseCommit {
static mut instance: ::protobuf::lazy::Lazy<ResponseCommit> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ResponseCommit,
};
unsafe {
instance.get(ResponseCommit::new)
}
}
}
impl ::protobuf::Clear for ResponseCommit {
fn clear(&mut self) {
self.clear_data();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ResponseCommit {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ResponseCommit {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ConsensusParams {
pub block_size: ::protobuf::SingularPtrField<BlockSizeParams>,
pub evidence: ::protobuf::SingularPtrField<EvidenceParams>,
pub validator: ::protobuf::SingularPtrField<ValidatorParams>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ConsensusParams {
pub fn new() -> ConsensusParams {
::std::default::Default::default()
}
pub fn clear_block_size(&mut self) {
self.block_size.clear();
}
pub fn has_block_size(&self) -> bool {
self.block_size.is_some()
}
pub fn set_block_size(&mut self, v: BlockSizeParams) {
self.block_size = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_block_size(&mut self) -> &mut BlockSizeParams {
if self.block_size.is_none() {
self.block_size.set_default();
}
self.block_size.as_mut().unwrap()
}
pub fn take_block_size(&mut self) -> BlockSizeParams {
self.block_size.take().unwrap_or_else(|| BlockSizeParams::new())
}
pub fn get_block_size(&self) -> &BlockSizeParams {
self.block_size.as_ref().unwrap_or_else(|| BlockSizeParams::default_instance())
}
pub fn clear_evidence(&mut self) {
self.evidence.clear();
}
pub fn has_evidence(&self) -> bool {
self.evidence.is_some()
}
pub fn set_evidence(&mut self, v: EvidenceParams) {
self.evidence = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_evidence(&mut self) -> &mut EvidenceParams {
if self.evidence.is_none() {
self.evidence.set_default();
}
self.evidence.as_mut().unwrap()
}
pub fn take_evidence(&mut self) -> EvidenceParams {
self.evidence.take().unwrap_or_else(|| EvidenceParams::new())
}
pub fn get_evidence(&self) -> &EvidenceParams {
self.evidence.as_ref().unwrap_or_else(|| EvidenceParams::default_instance())
}
pub fn clear_validator(&mut self) {
self.validator.clear();
}
pub fn has_validator(&self) -> bool {
self.validator.is_some()
}
pub fn set_validator(&mut self, v: ValidatorParams) {
self.validator = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_validator(&mut self) -> &mut ValidatorParams {
if self.validator.is_none() {
self.validator.set_default();
}
self.validator.as_mut().unwrap()
}
pub fn take_validator(&mut self) -> ValidatorParams {
self.validator.take().unwrap_or_else(|| ValidatorParams::new())
}
pub fn get_validator(&self) -> &ValidatorParams {
self.validator.as_ref().unwrap_or_else(|| ValidatorParams::default_instance())
}
}
impl ::protobuf::Message for ConsensusParams {
fn is_initialized(&self) -> bool {
for v in &self.block_size {
if !v.is_initialized() {
return false;
}
};
for v in &self.evidence {
if !v.is_initialized() {
return false;
}
};
for v in &self.validator {
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_singular_message_into(wire_type, is, &mut self.block_size)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.evidence)?;
},
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?;
},
_ => {
::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 let Some(ref v) = self.block_size.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.evidence.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.validator.as_ref() {
let len = v.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 let Some(ref v) = self.block_size.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.evidence.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.validator.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)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ConsensusParams {
ConsensusParams::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockSizeParams>>(
"block_size",
|m: &ConsensusParams| { &m.block_size },
|m: &mut ConsensusParams| { &mut m.block_size },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<EvidenceParams>>(
"evidence",
|m: &ConsensusParams| { &m.evidence },
|m: &mut ConsensusParams| { &mut m.evidence },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ValidatorParams>>(
"validator",
|m: &ConsensusParams| { &m.validator },
|m: &mut ConsensusParams| { &mut m.validator },
));
::protobuf::reflect::MessageDescriptor::new::<ConsensusParams>(
"ConsensusParams",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ConsensusParams {
static mut instance: ::protobuf::lazy::Lazy<ConsensusParams> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ConsensusParams,
};
unsafe {
instance.get(ConsensusParams::new)
}
}
}
impl ::protobuf::Clear for ConsensusParams {
fn clear(&mut self) {
self.clear_block_size();
self.clear_evidence();
self.clear_validator();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ConsensusParams {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ConsensusParams {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct BlockSizeParams {
pub max_bytes: i64,
pub max_gas: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl BlockSizeParams {
pub fn new() -> BlockSizeParams {
::std::default::Default::default()
}
pub fn clear_max_bytes(&mut self) {
self.max_bytes = 0;
}
pub fn set_max_bytes(&mut self, v: i64) {
self.max_bytes = v;
}
pub fn get_max_bytes(&self) -> i64 {
self.max_bytes
}
pub fn clear_max_gas(&mut self) {
self.max_gas = 0;
}
pub fn set_max_gas(&mut self, v: i64) {
self.max_gas = v;
}
pub fn get_max_gas(&self) -> i64 {
self.max_gas
}
}
impl ::protobuf::Message for BlockSizeParams {
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 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.max_bytes = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.max_gas = tmp;
},
_ => {
::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.max_bytes != 0 {
my_size += ::protobuf::rt::value_size(1, self.max_bytes, ::protobuf::wire_format::WireTypeVarint);
}
if self.max_gas != 0 {
my_size += ::protobuf::rt::value_size(2, self.max_gas, ::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.max_bytes != 0 {
os.write_int64(1, self.max_bytes)?;
}
if self.max_gas != 0 {
os.write_int64(2, self.max_gas)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> BlockSizeParams {
BlockSizeParams::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::ProtobufTypeInt64>(
"max_bytes",
|m: &BlockSizeParams| { &m.max_bytes },
|m: &mut BlockSizeParams| { &mut m.max_bytes },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"max_gas",
|m: &BlockSizeParams| { &m.max_gas },
|m: &mut BlockSizeParams| { &mut m.max_gas },
));
::protobuf::reflect::MessageDescriptor::new::<BlockSizeParams>(
"BlockSizeParams",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static BlockSizeParams {
static mut instance: ::protobuf::lazy::Lazy<BlockSizeParams> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const BlockSizeParams,
};
unsafe {
instance.get(BlockSizeParams::new)
}
}
}
impl ::protobuf::Clear for BlockSizeParams {
fn clear(&mut self) {
self.clear_max_bytes();
self.clear_max_gas();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for BlockSizeParams {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BlockSizeParams {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct EvidenceParams {
pub max_age: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl EvidenceParams {
pub fn new() -> EvidenceParams {
::std::default::Default::default()
}
pub fn clear_max_age(&mut self) {
self.max_age = 0;
}
pub fn set_max_age(&mut self, v: i64) {
self.max_age = v;
}
pub fn get_max_age(&self) -> i64 {
self.max_age
}
}
impl ::protobuf::Message for EvidenceParams {
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 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.max_age = tmp;
},
_ => {
::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.max_age != 0 {
my_size += ::protobuf::rt::value_size(1, self.max_age, ::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.max_age != 0 {
os.write_int64(1, self.max_age)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> EvidenceParams {
EvidenceParams::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::ProtobufTypeInt64>(
"max_age",
|m: &EvidenceParams| { &m.max_age },
|m: &mut EvidenceParams| { &mut m.max_age },
));
::protobuf::reflect::MessageDescriptor::new::<EvidenceParams>(
"EvidenceParams",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static EvidenceParams {
static mut instance: ::protobuf::lazy::Lazy<EvidenceParams> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const EvidenceParams,
};
unsafe {
instance.get(EvidenceParams::new)
}
}
}
impl ::protobuf::Clear for EvidenceParams {
fn clear(&mut self) {
self.clear_max_age();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for EvidenceParams {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EvidenceParams {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ValidatorParams {
pub pub_key_types: ::protobuf::RepeatedField<::std::string::String>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ValidatorParams {
pub fn new() -> ValidatorParams {
::std::default::Default::default()
}
pub fn clear_pub_key_types(&mut self) {
self.pub_key_types.clear();
}
pub fn set_pub_key_types(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
self.pub_key_types = v;
}
pub fn mut_pub_key_types(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
&mut self.pub_key_types
}
pub fn take_pub_key_types(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
::std::mem::replace(&mut self.pub_key_types, ::protobuf::RepeatedField::new())
}
pub fn get_pub_key_types(&self) -> &[::std::string::String] {
&self.pub_key_types
}
}
impl ::protobuf::Message for ValidatorParams {
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_repeated_string_into(wire_type, is, &mut self.pub_key_types)?;
},
_ => {
::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.pub_key_types {
my_size += ::protobuf::rt::string_size(1, &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<()> {
for v in &self.pub_key_types {
os.write_string(1, &v)?;
};
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ValidatorParams {
ValidatorParams::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"pub_key_types",
|m: &ValidatorParams| { &m.pub_key_types },
|m: &mut ValidatorParams| { &mut m.pub_key_types },
));
::protobuf::reflect::MessageDescriptor::new::<ValidatorParams>(
"ValidatorParams",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ValidatorParams {
static mut instance: ::protobuf::lazy::Lazy<ValidatorParams> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ValidatorParams,
};
unsafe {
instance.get(ValidatorParams::new)
}
}
}
impl ::protobuf::Clear for ValidatorParams {
fn clear(&mut self) {
self.clear_pub_key_types();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ValidatorParams {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ValidatorParams {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct LastCommitInfo {
pub round: i32,
pub votes: ::protobuf::RepeatedField<VoteInfo>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl LastCommitInfo {
pub fn new() -> LastCommitInfo {
::std::default::Default::default()
}
pub fn clear_round(&mut self) {
self.round = 0;
}
pub fn set_round(&mut self, v: i32) {
self.round = v;
}
pub fn get_round(&self) -> i32 {
self.round
}
pub fn clear_votes(&mut self) {
self.votes.clear();
}
pub fn set_votes(&mut self, v: ::protobuf::RepeatedField<VoteInfo>) {
self.votes = v;
}
pub fn mut_votes(&mut self) -> &mut ::protobuf::RepeatedField<VoteInfo> {
&mut self.votes
}
pub fn take_votes(&mut self) -> ::protobuf::RepeatedField<VoteInfo> {
::std::mem::replace(&mut self.votes, ::protobuf::RepeatedField::new())
}
pub fn get_votes(&self) -> &[VoteInfo] {
&self.votes
}
}
impl ::protobuf::Message for LastCommitInfo {
fn is_initialized(&self) -> bool {
for v in &self.votes {
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 => {
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.round = tmp;
},
2 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.votes)?;
},
_ => {
::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.round != 0 {
my_size += ::protobuf::rt::value_size(1, self.round, ::protobuf::wire_format::WireTypeVarint);
}
for value in &self.votes {
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.round != 0 {
os.write_int32(1, self.round)?;
}
for v in &self.votes {
os.write_tag(2, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LastCommitInfo {
LastCommitInfo::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::ProtobufTypeInt32>(
"round",
|m: &LastCommitInfo| { &m.round },
|m: &mut LastCommitInfo| { &mut m.round },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<VoteInfo>>(
"votes",
|m: &LastCommitInfo| { &m.votes },
|m: &mut LastCommitInfo| { &mut m.votes },
));
::protobuf::reflect::MessageDescriptor::new::<LastCommitInfo>(
"LastCommitInfo",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static LastCommitInfo {
static mut instance: ::protobuf::lazy::Lazy<LastCommitInfo> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const LastCommitInfo,
};
unsafe {
instance.get(LastCommitInfo::new)
}
}
}
impl ::protobuf::Clear for LastCommitInfo {
fn clear(&mut self) {
self.clear_round();
self.clear_votes();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LastCommitInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for LastCommitInfo {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Header {
pub version: ::protobuf::SingularPtrField<Version>,
pub chain_id: ::std::string::String,
pub height: i64,
pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
pub num_txs: i64,
pub total_txs: i64,
pub last_block_id: ::protobuf::SingularPtrField<BlockID>,
pub last_commit_hash: ::std::vec::Vec<u8>,
pub data_hash: ::std::vec::Vec<u8>,
pub validators_hash: ::std::vec::Vec<u8>,
pub next_validators_hash: ::std::vec::Vec<u8>,
pub consensus_hash: ::std::vec::Vec<u8>,
pub app_hash: ::std::vec::Vec<u8>,
pub last_results_hash: ::std::vec::Vec<u8>,
pub evidence_hash: ::std::vec::Vec<u8>,
pub proposer_address: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Header {
pub fn new() -> Header {
::std::default::Default::default()
}
pub fn clear_version(&mut self) {
self.version.clear();
}
pub fn has_version(&self) -> bool {
self.version.is_some()
}
pub fn set_version(&mut self, v: Version) {
self.version = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_version(&mut self) -> &mut Version {
if self.version.is_none() {
self.version.set_default();
}
self.version.as_mut().unwrap()
}
pub fn take_version(&mut self) -> Version {
self.version.take().unwrap_or_else(|| Version::new())
}
pub fn get_version(&self) -> &Version {
self.version.as_ref().unwrap_or_else(|| Version::default_instance())
}
pub fn clear_chain_id(&mut self) {
self.chain_id.clear();
}
pub fn set_chain_id(&mut self, v: ::std::string::String) {
self.chain_id = v;
}
pub fn mut_chain_id(&mut self) -> &mut ::std::string::String {
&mut self.chain_id
}
pub fn take_chain_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.chain_id, ::std::string::String::new())
}
pub fn get_chain_id(&self) -> &str {
&self.chain_id
}
pub fn clear_height(&mut self) {
self.height = 0;
}
pub fn set_height(&mut self, v: i64) {
self.height = v;
}
pub fn get_height(&self) -> i64 {
self.height
}
pub fn clear_time(&mut self) {
self.time.clear();
}
pub fn has_time(&self) -> bool {
self.time.is_some()
}
pub fn set_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
self.time = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
if self.time.is_none() {
self.time.set_default();
}
self.time.as_mut().unwrap()
}
pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
}
pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp {
self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
}
pub fn clear_num_txs(&mut self) {
self.num_txs = 0;
}
pub fn set_num_txs(&mut self, v: i64) {
self.num_txs = v;
}
pub fn get_num_txs(&self) -> i64 {
self.num_txs
}
pub fn clear_total_txs(&mut self) {
self.total_txs = 0;
}
pub fn set_total_txs(&mut self, v: i64) {
self.total_txs = v;
}
pub fn get_total_txs(&self) -> i64 {
self.total_txs
}
pub fn clear_last_block_id(&mut self) {
self.last_block_id.clear();
}
pub fn has_last_block_id(&self) -> bool {
self.last_block_id.is_some()
}
pub fn set_last_block_id(&mut self, v: BlockID) {
self.last_block_id = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_last_block_id(&mut self) -> &mut BlockID {
if self.last_block_id.is_none() {
self.last_block_id.set_default();
}
self.last_block_id.as_mut().unwrap()
}
pub fn take_last_block_id(&mut self) -> BlockID {
self.last_block_id.take().unwrap_or_else(|| BlockID::new())
}
pub fn get_last_block_id(&self) -> &BlockID {
self.last_block_id.as_ref().unwrap_or_else(|| BlockID::default_instance())
}
pub fn clear_last_commit_hash(&mut self) {
self.last_commit_hash.clear();
}
pub fn set_last_commit_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.last_commit_hash = v;
}
pub fn mut_last_commit_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.last_commit_hash
}
pub fn take_last_commit_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.last_commit_hash, ::std::vec::Vec::new())
}
pub fn get_last_commit_hash(&self) -> &[u8] {
&self.last_commit_hash
}
pub fn clear_data_hash(&mut self) {
self.data_hash.clear();
}
pub fn set_data_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.data_hash = v;
}
pub fn mut_data_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data_hash
}
pub fn take_data_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data_hash, ::std::vec::Vec::new())
}
pub fn get_data_hash(&self) -> &[u8] {
&self.data_hash
}
pub fn clear_validators_hash(&mut self) {
self.validators_hash.clear();
}
pub fn set_validators_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.validators_hash = v;
}
pub fn mut_validators_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.validators_hash
}
pub fn take_validators_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.validators_hash, ::std::vec::Vec::new())
}
pub fn get_validators_hash(&self) -> &[u8] {
&self.validators_hash
}
pub fn clear_next_validators_hash(&mut self) {
self.next_validators_hash.clear();
}
pub fn set_next_validators_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.next_validators_hash = v;
}
pub fn mut_next_validators_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.next_validators_hash
}
pub fn take_next_validators_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.next_validators_hash, ::std::vec::Vec::new())
}
pub fn get_next_validators_hash(&self) -> &[u8] {
&self.next_validators_hash
}
pub fn clear_consensus_hash(&mut self) {
self.consensus_hash.clear();
}
pub fn set_consensus_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.consensus_hash = v;
}
pub fn mut_consensus_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.consensus_hash
}
pub fn take_consensus_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.consensus_hash, ::std::vec::Vec::new())
}
pub fn get_consensus_hash(&self) -> &[u8] {
&self.consensus_hash
}
pub fn clear_app_hash(&mut self) {
self.app_hash.clear();
}
pub fn set_app_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.app_hash = v;
}
pub fn mut_app_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.app_hash
}
pub fn take_app_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.app_hash, ::std::vec::Vec::new())
}
pub fn get_app_hash(&self) -> &[u8] {
&self.app_hash
}
pub fn clear_last_results_hash(&mut self) {
self.last_results_hash.clear();
}
pub fn set_last_results_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.last_results_hash = v;
}
pub fn mut_last_results_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.last_results_hash
}
pub fn take_last_results_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.last_results_hash, ::std::vec::Vec::new())
}
pub fn get_last_results_hash(&self) -> &[u8] {
&self.last_results_hash
}
pub fn clear_evidence_hash(&mut self) {
self.evidence_hash.clear();
}
pub fn set_evidence_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.evidence_hash = v;
}
pub fn mut_evidence_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.evidence_hash
}
pub fn take_evidence_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.evidence_hash, ::std::vec::Vec::new())
}
pub fn get_evidence_hash(&self) -> &[u8] {
&self.evidence_hash
}
pub fn clear_proposer_address(&mut self) {
self.proposer_address.clear();
}
pub fn set_proposer_address(&mut self, v: ::std::vec::Vec<u8>) {
self.proposer_address = v;
}
pub fn mut_proposer_address(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.proposer_address
}
pub fn take_proposer_address(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.proposer_address, ::std::vec::Vec::new())
}
pub fn get_proposer_address(&self) -> &[u8] {
&self.proposer_address
}
}
impl ::protobuf::Message for Header {
fn is_initialized(&self) -> bool {
for v in &self.version {
if !v.is_initialized() {
return false;
}
};
for v in &self.time {
if !v.is_initialized() {
return false;
}
};
for v in &self.last_block_id {
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_singular_message_into(wire_type, is, &mut self.version)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_id)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.height = tmp;
},
4 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.num_txs = tmp;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.total_txs = tmp;
},
7 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_block_id)?;
},
8 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_commit_hash)?;
},
9 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data_hash)?;
},
10 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.validators_hash)?;
},
11 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.next_validators_hash)?;
},
12 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.consensus_hash)?;
},
13 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.app_hash)?;
},
14 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_results_hash)?;
},
15 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.evidence_hash)?;
},
16 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.proposer_address)?;
},
_ => {
::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 let Some(ref v) = self.version.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.chain_id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.chain_id);
}
if self.height != 0 {
my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.time.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.num_txs != 0 {
my_size += ::protobuf::rt::value_size(5, self.num_txs, ::protobuf::wire_format::WireTypeVarint);
}
if self.total_txs != 0 {
my_size += ::protobuf::rt::value_size(6, self.total_txs, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.last_block_id.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.last_commit_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(8, &self.last_commit_hash);
}
if !self.data_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(9, &self.data_hash);
}
if !self.validators_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(10, &self.validators_hash);
}
if !self.next_validators_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(11, &self.next_validators_hash);
}
if !self.consensus_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(12, &self.consensus_hash);
}
if !self.app_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(13, &self.app_hash);
}
if !self.last_results_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(14, &self.last_results_hash);
}
if !self.evidence_hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(15, &self.evidence_hash);
}
if !self.proposer_address.is_empty() {
my_size += ::protobuf::rt::bytes_size(16, &self.proposer_address);
}
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 let Some(ref v) = self.version.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.chain_id.is_empty() {
os.write_string(2, &self.chain_id)?;
}
if self.height != 0 {
os.write_int64(3, self.height)?;
}
if let Some(ref v) = self.time.as_ref() {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.num_txs != 0 {
os.write_int64(5, self.num_txs)?;
}
if self.total_txs != 0 {
os.write_int64(6, self.total_txs)?;
}
if let Some(ref v) = self.last_block_id.as_ref() {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.last_commit_hash.is_empty() {
os.write_bytes(8, &self.last_commit_hash)?;
}
if !self.data_hash.is_empty() {
os.write_bytes(9, &self.data_hash)?;
}
if !self.validators_hash.is_empty() {
os.write_bytes(10, &self.validators_hash)?;
}
if !self.next_validators_hash.is_empty() {
os.write_bytes(11, &self.next_validators_hash)?;
}
if !self.consensus_hash.is_empty() {
os.write_bytes(12, &self.consensus_hash)?;
}
if !self.app_hash.is_empty() {
os.write_bytes(13, &self.app_hash)?;
}
if !self.last_results_hash.is_empty() {
os.write_bytes(14, &self.last_results_hash)?;
}
if !self.evidence_hash.is_empty() {
os.write_bytes(15, &self.evidence_hash)?;
}
if !self.proposer_address.is_empty() {
os.write_bytes(16, &self.proposer_address)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Header {
Header::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Version>>(
"version",
|m: &Header| { &m.version },
|m: &mut Header| { &mut m.version },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"chain_id",
|m: &Header| { &m.chain_id },
|m: &mut Header| { &mut m.chain_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"height",
|m: &Header| { &m.height },
|m: &mut Header| { &mut m.height },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
"time",
|m: &Header| { &m.time },
|m: &mut Header| { &mut m.time },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"num_txs",
|m: &Header| { &m.num_txs },
|m: &mut Header| { &mut m.num_txs },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"total_txs",
|m: &Header| { &m.total_txs },
|m: &mut Header| { &mut m.total_txs },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockID>>(
"last_block_id",
|m: &Header| { &m.last_block_id },
|m: &mut Header| { &mut m.last_block_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"last_commit_hash",
|m: &Header| { &m.last_commit_hash },
|m: &mut Header| { &mut m.last_commit_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data_hash",
|m: &Header| { &m.data_hash },
|m: &mut Header| { &mut m.data_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"validators_hash",
|m: &Header| { &m.validators_hash },
|m: &mut Header| { &mut m.validators_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"next_validators_hash",
|m: &Header| { &m.next_validators_hash },
|m: &mut Header| { &mut m.next_validators_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"consensus_hash",
|m: &Header| { &m.consensus_hash },
|m: &mut Header| { &mut m.consensus_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"app_hash",
|m: &Header| { &m.app_hash },
|m: &mut Header| { &mut m.app_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"last_results_hash",
|m: &Header| { &m.last_results_hash },
|m: &mut Header| { &mut m.last_results_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"evidence_hash",
|m: &Header| { &m.evidence_hash },
|m: &mut Header| { &mut m.evidence_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"proposer_address",
|m: &Header| { &m.proposer_address },
|m: &mut Header| { &mut m.proposer_address },
));
::protobuf::reflect::MessageDescriptor::new::<Header>(
"Header",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Header {
static mut instance: ::protobuf::lazy::Lazy<Header> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Header,
};
unsafe {
instance.get(Header::new)
}
}
}
impl ::protobuf::Clear for Header {
fn clear(&mut self) {
self.clear_version();
self.clear_chain_id();
self.clear_height();
self.clear_time();
self.clear_num_txs();
self.clear_total_txs();
self.clear_last_block_id();
self.clear_last_commit_hash();
self.clear_data_hash();
self.clear_validators_hash();
self.clear_next_validators_hash();
self.clear_consensus_hash();
self.clear_app_hash();
self.clear_last_results_hash();
self.clear_evidence_hash();
self.clear_proposer_address();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Header {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Header {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Version {
pub Block: u64,
pub App: u64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Version {
pub fn new() -> Version {
::std::default::Default::default()
}
pub fn clear_Block(&mut self) {
self.Block = 0;
}
pub fn set_Block(&mut self, v: u64) {
self.Block = v;
}
pub fn get_Block(&self) -> u64 {
self.Block
}
pub fn clear_App(&mut self) {
self.App = 0;
}
pub fn set_App(&mut self, v: u64) {
self.App = v;
}
pub fn get_App(&self) -> u64 {
self.App
}
}
impl ::protobuf::Message for Version {
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 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.Block = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.App = tmp;
},
_ => {
::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.Block != 0 {
my_size += ::protobuf::rt::value_size(1, self.Block, ::protobuf::wire_format::WireTypeVarint);
}
if self.App != 0 {
my_size += ::protobuf::rt::value_size(2, self.App, ::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.Block != 0 {
os.write_uint64(1, self.Block)?;
}
if self.App != 0 {
os.write_uint64(2, self.App)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Version {
Version::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::ProtobufTypeUint64>(
"Block",
|m: &Version| { &m.Block },
|m: &mut Version| { &mut m.Block },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"App",
|m: &Version| { &m.App },
|m: &mut Version| { &mut m.App },
));
::protobuf::reflect::MessageDescriptor::new::<Version>(
"Version",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Version {
static mut instance: ::protobuf::lazy::Lazy<Version> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Version,
};
unsafe {
instance.get(Version::new)
}
}
}
impl ::protobuf::Clear for Version {
fn clear(&mut self) {
self.clear_Block();
self.clear_App();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Version {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Version {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct BlockID {
pub hash: ::std::vec::Vec<u8>,
pub parts_header: ::protobuf::SingularPtrField<PartSetHeader>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl BlockID {
pub fn new() -> BlockID {
::std::default::Default::default()
}
pub fn clear_hash(&mut self) {
self.hash.clear();
}
pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.hash = v;
}
pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.hash
}
pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.hash, ::std::vec::Vec::new())
}
pub fn get_hash(&self) -> &[u8] {
&self.hash
}
pub fn clear_parts_header(&mut self) {
self.parts_header.clear();
}
pub fn has_parts_header(&self) -> bool {
self.parts_header.is_some()
}
pub fn set_parts_header(&mut self, v: PartSetHeader) {
self.parts_header = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_parts_header(&mut self) -> &mut PartSetHeader {
if self.parts_header.is_none() {
self.parts_header.set_default();
}
self.parts_header.as_mut().unwrap()
}
pub fn take_parts_header(&mut self) -> PartSetHeader {
self.parts_header.take().unwrap_or_else(|| PartSetHeader::new())
}
pub fn get_parts_header(&self) -> &PartSetHeader {
self.parts_header.as_ref().unwrap_or_else(|| PartSetHeader::default_instance())
}
}
impl ::protobuf::Message for BlockID {
fn is_initialized(&self) -> bool {
for v in &self.parts_header {
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_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.parts_header)?;
},
_ => {
::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.hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.hash);
}
if let Some(ref v) = self.parts_header.as_ref() {
let len = v.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.hash.is_empty() {
os.write_bytes(1, &self.hash)?;
}
if let Some(ref v) = self.parts_header.as_ref() {
os.write_tag(2, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> BlockID {
BlockID::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>(
"hash",
|m: &BlockID| { &m.hash },
|m: &mut BlockID| { &mut m.hash },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PartSetHeader>>(
"parts_header",
|m: &BlockID| { &m.parts_header },
|m: &mut BlockID| { &mut m.parts_header },
));
::protobuf::reflect::MessageDescriptor::new::<BlockID>(
"BlockID",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static BlockID {
static mut instance: ::protobuf::lazy::Lazy<BlockID> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const BlockID,
};
unsafe {
instance.get(BlockID::new)
}
}
}
impl ::protobuf::Clear for BlockID {
fn clear(&mut self) {
self.clear_hash();
self.clear_parts_header();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for BlockID {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BlockID {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct PartSetHeader {
pub total: i32,
pub hash: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl PartSetHeader {
pub fn new() -> PartSetHeader {
::std::default::Default::default()
}
pub fn clear_total(&mut self) {
self.total = 0;
}
pub fn set_total(&mut self, v: i32) {
self.total = v;
}
pub fn get_total(&self) -> i32 {
self.total
}
pub fn clear_hash(&mut self) {
self.hash.clear();
}
pub fn set_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.hash = v;
}
pub fn mut_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.hash
}
pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.hash, ::std::vec::Vec::new())
}
pub fn get_hash(&self) -> &[u8] {
&self.hash
}
}
impl ::protobuf::Message for PartSetHeader {
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 => {
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.total = tmp;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?;
},
_ => {
::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.total != 0 {
my_size += ::protobuf::rt::value_size(1, self.total, ::protobuf::wire_format::WireTypeVarint);
}
if !self.hash.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.hash);
}
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.total != 0 {
os.write_int32(1, self.total)?;
}
if !self.hash.is_empty() {
os.write_bytes(2, &self.hash)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PartSetHeader {
PartSetHeader::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::ProtobufTypeInt32>(
"total",
|m: &PartSetHeader| { &m.total },
|m: &mut PartSetHeader| { &mut m.total },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"hash",
|m: &PartSetHeader| { &m.hash },
|m: &mut PartSetHeader| { &mut m.hash },
));
::protobuf::reflect::MessageDescriptor::new::<PartSetHeader>(
"PartSetHeader",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static PartSetHeader {
static mut instance: ::protobuf::lazy::Lazy<PartSetHeader> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const PartSetHeader,
};
unsafe {
instance.get(PartSetHeader::new)
}
}
}
impl ::protobuf::Clear for PartSetHeader {
fn clear(&mut self) {
self.clear_total();
self.clear_hash();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PartSetHeader {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PartSetHeader {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Validator {
pub address: ::std::vec::Vec<u8>,
pub power: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Validator {
pub fn new() -> Validator {
::std::default::Default::default()
}
pub fn clear_address(&mut self) {
self.address.clear();
}
pub fn set_address(&mut self, v: ::std::vec::Vec<u8>) {
self.address = v;
}
pub fn mut_address(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.address
}
pub fn take_address(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.address, ::std::vec::Vec::new())
}
pub fn get_address(&self) -> &[u8] {
&self.address
}
pub fn clear_power(&mut self) {
self.power = 0;
}
pub fn set_power(&mut self, v: i64) {
self.power = v;
}
pub fn get_power(&self) -> i64 {
self.power
}
}
impl ::protobuf::Message for Validator {
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.address)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.power = tmp;
},
_ => {
::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.address.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.address);
}
if self.power != 0 {
my_size += ::protobuf::rt::value_size(3, self.power, ::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.address.is_empty() {
os.write_bytes(1, &self.address)?;
}
if self.power != 0 {
os.write_int64(3, self.power)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Validator {
Validator::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>(
"address",
|m: &Validator| { &m.address },
|m: &mut Validator| { &mut m.address },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"power",
|m: &Validator| { &m.power },
|m: &mut Validator| { &mut m.power },
));
::protobuf::reflect::MessageDescriptor::new::<Validator>(
"Validator",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Validator {
static mut instance: ::protobuf::lazy::Lazy<Validator> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Validator,
};
unsafe {
instance.get(Validator::new)
}
}
}
impl ::protobuf::Clear for Validator {
fn clear(&mut self) {
self.clear_address();
self.clear_power();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Validator {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Validator {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ValidatorUpdate {
pub pub_key: ::protobuf::SingularPtrField<PubKey>,
pub power: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl ValidatorUpdate {
pub fn new() -> ValidatorUpdate {
::std::default::Default::default()
}
pub fn clear_pub_key(&mut self) {
self.pub_key.clear();
}
pub fn has_pub_key(&self) -> bool {
self.pub_key.is_some()
}
pub fn set_pub_key(&mut self, v: PubKey) {
self.pub_key = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_pub_key(&mut self) -> &mut PubKey {
if self.pub_key.is_none() {
self.pub_key.set_default();
}
self.pub_key.as_mut().unwrap()
}
pub fn take_pub_key(&mut self) -> PubKey {
self.pub_key.take().unwrap_or_else(|| PubKey::new())
}
pub fn get_pub_key(&self) -> &PubKey {
self.pub_key.as_ref().unwrap_or_else(|| PubKey::default_instance())
}
pub fn clear_power(&mut self) {
self.power = 0;
}
pub fn set_power(&mut self, v: i64) {
self.power = v;
}
pub fn get_power(&self) -> i64 {
self.power
}
}
impl ::protobuf::Message for ValidatorUpdate {
fn is_initialized(&self) -> bool {
for v in &self.pub_key {
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_singular_message_into(wire_type, is, &mut self.pub_key)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.power = tmp;
},
_ => {
::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 let Some(ref v) = self.pub_key.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.power != 0 {
my_size += ::protobuf::rt::value_size(2, self.power, ::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 let Some(ref v) = self.pub_key.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.power != 0 {
os.write_int64(2, self.power)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ValidatorUpdate {
ValidatorUpdate::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PubKey>>(
"pub_key",
|m: &ValidatorUpdate| { &m.pub_key },
|m: &mut ValidatorUpdate| { &mut m.pub_key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"power",
|m: &ValidatorUpdate| { &m.power },
|m: &mut ValidatorUpdate| { &mut m.power },
));
::protobuf::reflect::MessageDescriptor::new::<ValidatorUpdate>(
"ValidatorUpdate",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ValidatorUpdate {
static mut instance: ::protobuf::lazy::Lazy<ValidatorUpdate> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ValidatorUpdate,
};
unsafe {
instance.get(ValidatorUpdate::new)
}
}
}
impl ::protobuf::Clear for ValidatorUpdate {
fn clear(&mut self) {
self.clear_pub_key();
self.clear_power();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ValidatorUpdate {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ValidatorUpdate {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct VoteInfo {
pub validator: ::protobuf::SingularPtrField<Validator>,
pub signed_last_block: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl VoteInfo {
pub fn new() -> VoteInfo {
::std::default::Default::default()
}
pub fn clear_validator(&mut self) {
self.validator.clear();
}
pub fn has_validator(&self) -> bool {
self.validator.is_some()
}
pub fn set_validator(&mut self, v: Validator) {
self.validator = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_validator(&mut self) -> &mut Validator {
if self.validator.is_none() {
self.validator.set_default();
}
self.validator.as_mut().unwrap()
}
pub fn take_validator(&mut self) -> Validator {
self.validator.take().unwrap_or_else(|| Validator::new())
}
pub fn get_validator(&self) -> &Validator {
self.validator.as_ref().unwrap_or_else(|| Validator::default_instance())
}
pub fn clear_signed_last_block(&mut self) {
self.signed_last_block = false;
}
pub fn set_signed_last_block(&mut self, v: bool) {
self.signed_last_block = v;
}
pub fn get_signed_last_block(&self) -> bool {
self.signed_last_block
}
}
impl ::protobuf::Message for VoteInfo {
fn is_initialized(&self) -> bool {
for v in &self.validator {
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_singular_message_into(wire_type, is, &mut self.validator)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.signed_last_block = tmp;
},
_ => {
::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 let Some(ref v) = self.validator.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.signed_last_block != false {
my_size += 2;
}
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 let Some(ref v) = self.validator.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.signed_last_block != false {
os.write_bool(2, self.signed_last_block)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> VoteInfo {
VoteInfo::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Validator>>(
"validator",
|m: &VoteInfo| { &m.validator },
|m: &mut VoteInfo| { &mut m.validator },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"signed_last_block",
|m: &VoteInfo| { &m.signed_last_block },
|m: &mut VoteInfo| { &mut m.signed_last_block },
));
::protobuf::reflect::MessageDescriptor::new::<VoteInfo>(
"VoteInfo",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static VoteInfo {
static mut instance: ::protobuf::lazy::Lazy<VoteInfo> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const VoteInfo,
};
unsafe {
instance.get(VoteInfo::new)
}
}
}
impl ::protobuf::Clear for VoteInfo {
fn clear(&mut self) {
self.clear_validator();
self.clear_signed_last_block();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for VoteInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for VoteInfo {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct PubKey {
pub field_type: ::std::string::String,
pub data: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl PubKey {
pub fn new() -> PubKey {
::std::default::Default::default()
}
pub fn clear_field_type(&mut self) {
self.field_type.clear();
}
pub fn set_field_type(&mut self, v: ::std::string::String) {
self.field_type = v;
}
pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
&mut self.field_type
}
pub fn take_field_type(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.field_type, ::std::string::String::new())
}
pub fn get_field_type(&self) -> &str {
&self.field_type
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
}
impl ::protobuf::Message for PubKey {
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.field_type)?;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
_ => {
::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.field_type.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.field_type);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.data);
}
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.is_empty() {
os.write_string(1, &self.field_type)?;
}
if !self.data.is_empty() {
os.write_bytes(2, &self.data)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PubKey {
PubKey::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::ProtobufTypeString>(
"type",
|m: &PubKey| { &m.field_type },
|m: &mut PubKey| { &mut m.field_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &PubKey| { &m.data },
|m: &mut PubKey| { &mut m.data },
));
::protobuf::reflect::MessageDescriptor::new::<PubKey>(
"PubKey",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static PubKey {
static mut instance: ::protobuf::lazy::Lazy<PubKey> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const PubKey,
};
unsafe {
instance.get(PubKey::new)
}
}
}
impl ::protobuf::Clear for PubKey {
fn clear(&mut self) {
self.clear_field_type();
self.clear_data();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PubKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PubKey {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Evidence {
pub field_type: ::std::string::String,
pub validator: ::protobuf::SingularPtrField<Validator>,
pub height: i64,
pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
pub total_voting_power: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Evidence {
pub fn new() -> Evidence {
::std::default::Default::default()
}
pub fn clear_field_type(&mut self) {
self.field_type.clear();
}
pub fn set_field_type(&mut self, v: ::std::string::String) {
self.field_type = v;
}
pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
&mut self.field_type
}
pub fn take_field_type(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.field_type, ::std::string::String::new())
}
pub fn get_field_type(&self) -> &str {
&self.field_type
}
pub fn clear_validator(&mut self) {
self.validator.clear();
}
pub fn has_validator(&self) -> bool {
self.validator.is_some()
}
pub fn set_validator(&mut self, v: Validator) {
self.validator = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_validator(&mut self) -> &mut Validator {
if self.validator.is_none() {
self.validator.set_default();
}
self.validator.as_mut().unwrap()
}
pub fn take_validator(&mut self) -> Validator {
self.validator.take().unwrap_or_else(|| Validator::new())
}
pub fn get_validator(&self) -> &Validator {
self.validator.as_ref().unwrap_or_else(|| Validator::default_instance())
}
pub fn clear_height(&mut self) {
self.height = 0;
}
pub fn set_height(&mut self, v: i64) {
self.height = v;
}
pub fn get_height(&self) -> i64 {
self.height
}
pub fn clear_time(&mut self) {
self.time.clear();
}
pub fn has_time(&self) -> bool {
self.time.is_some()
}
pub fn set_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
self.time = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
if self.time.is_none() {
self.time.set_default();
}
self.time.as_mut().unwrap()
}
pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
}
pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp {
self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance())
}
pub fn clear_total_voting_power(&mut self) {
self.total_voting_power = 0;
}
pub fn set_total_voting_power(&mut self, v: i64) {
self.total_voting_power = v;
}
pub fn get_total_voting_power(&self) -> i64 {
self.total_voting_power
}
}
impl ::protobuf::Message for Evidence {
fn is_initialized(&self) -> bool {
for v in &self.validator {
if !v.is_initialized() {
return false;
}
};
for v in &self.time {
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_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.height = tmp;
},
4 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.total_voting_power = tmp;
},
_ => {
::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.field_type.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.field_type);
}
if let Some(ref v) = self.validator.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.height != 0 {
my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.time.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.total_voting_power != 0 {
my_size += ::protobuf::rt::value_size(5, self.total_voting_power, ::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.field_type.is_empty() {
os.write_string(1, &self.field_type)?;
}
if let Some(ref v) = self.validator.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.height != 0 {
os.write_int64(3, self.height)?;
}
if let Some(ref v) = self.time.as_ref() {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.total_voting_power != 0 {
os.write_int64(5, self.total_voting_power)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Evidence {
Evidence::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::ProtobufTypeString>(
"type",
|m: &Evidence| { &m.field_type },
|m: &mut Evidence| { &mut m.field_type },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Validator>>(
"validator",
|m: &Evidence| { &m.validator },
|m: &mut Evidence| { &mut m.validator },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"height",
|m: &Evidence| { &m.height },
|m: &mut Evidence| { &mut m.height },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
"time",
|m: &Evidence| { &m.time },
|m: &mut Evidence| { &mut m.time },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"total_voting_power",
|m: &Evidence| { &m.total_voting_power },
|m: &mut Evidence| { &mut m.total_voting_power },
));
::protobuf::reflect::MessageDescriptor::new::<Evidence>(
"Evidence",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Evidence {
static mut instance: ::protobuf::lazy::Lazy<Evidence> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Evidence,
};
unsafe {
instance.get(Evidence::new)
}
}
}
impl ::protobuf::Clear for Evidence {
fn clear(&mut self) {
self.clear_field_type();
self.clear_validator();
self.clear_height();
self.clear_time();
self.clear_total_voting_power();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Evidence {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Evidence {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\nabci.proto\x12\x04abci\"\x85\x04\n\x07Request\x12%\n\x04echo\x18\x02\
\x20\x01(\x0b2\x11.abci.RequestEchoH\0B\x02\x18\0\x12'\n\x05flush\x18\
\x03\x20\x01(\x0b2\x12.abci.RequestFlushH\0B\x02\x18\0\x12%\n\x04info\
\x18\x04\x20\x01(\x0b2\x11.abci.RequestInfoH\0B\x02\x18\0\x120\n\nset_op\
tion\x18\x05\x20\x01(\x0b2\x16.abci.RequestSetOptionH\0B\x02\x18\0\x120\
\n\ninit_chain\x18\x06\x20\x01(\x0b2\x16.abci.RequestInitChainH\0B\x02\
\x18\0\x12'\n\x05query\x18\x07\x20\x01(\x0b2\x12.abci.RequestQueryH\0B\
\x02\x18\0\x122\n\x0bbegin_block\x18\x08\x20\x01(\x0b2\x17.abci.RequestB\
eginBlockH\0B\x02\x18\0\x12,\n\x08check_tx\x18\t\x20\x01(\x0b2\x14.abci.\
RequestCheckTxH\0B\x02\x18\0\x120\n\ndeliver_tx\x18\x13\x20\x01(\x0b2\
\x16.abci.RequestDeliverTxH\0B\x02\x18\0\x12.\n\tend_block\x18\x0b\x20\
\x01(\x0b2\x15.abci.RequestEndBlockH\0B\x02\x18\0\x12)\n\x06commit\x18\
\x0c\x20\x01(\x0b2\x13.abci.RequestCommitH\0B\x02\x18\0B\x07\n\x05value\
\"\"\n\x0bRequestEcho\x12\x13\n\x07message\x18\x01\x20\x01(\tB\x02\x18\0\
\"\x0e\n\x0cRequestFlush\"V\n\x0bRequestInfo\x12\x13\n\x07version\x18\
\x01\x20\x01(\tB\x02\x18\0\x12\x19\n\rblock_version\x18\x02\x20\x01(\x04\
B\x02\x18\0\x12\x17\n\x0bp2p_version\x18\x03\x20\x01(\x04B\x02\x18\0\"6\
\n\x10RequestSetOption\x12\x0f\n\x03key\x18\x01\x20\x01(\tB\x02\x18\0\
\x12\x11\n\x05value\x18\x02\x20\x01(\tB\x02\x18\0\"\xd7\x01\n\x10Request\
InitChain\x12,\n\x04time\x18\x01\x20\x01(\x0b2\x1a.google.protobuf.Times\
tampB\x02\x18\0\x12\x14\n\x08chain_id\x18\x02\x20\x01(\tB\x02\x18\0\x123\
\n\x10consensus_params\x18\x03\x20\x01(\x0b2\x15.abci.ConsensusParamsB\
\x02\x18\0\x12-\n\nvalidators\x18\x04\x20\x03(\x0b2\x15.abci.ValidatorUp\
dateB\x02\x18\0\x12\x1b\n\x0fapp_state_bytes\x18\x05\x20\x01(\x0cB\x02\
\x18\0\"Y\n\x0cRequestQuery\x12\x10\n\x04data\x18\x01\x20\x01(\x0cB\x02\
\x18\0\x12\x10\n\x04path\x18\x02\x20\x01(\tB\x02\x18\0\x12\x12\n\x06heig\
ht\x18\x03\x20\x01(\x03B\x02\x18\0\x12\x11\n\x05prove\x18\x04\x20\x01(\
\x08B\x02\x18\0\"\xad\x01\n\x11RequestBeginBlock\x12\x10\n\x04hash\x18\
\x01\x20\x01(\x0cB\x02\x18\0\x12\x20\n\x06header\x18\x02\x20\x01(\x0b2\
\x0c.abci.HeaderB\x02\x18\0\x122\n\x10last_commit_info\x18\x03\x20\x01(\
\x0b2\x14.abci.LastCommitInfoB\x02\x18\0\x120\n\x14byzantine_validators\
\x18\x04\x20\x03(\x0b2\x0e.abci.EvidenceB\x02\x18\0\"\x20\n\x0eRequestCh\
eckTx\x12\x0e\n\x02tx\x18\x01\x20\x01(\x0cB\x02\x18\0\"\"\n\x10RequestDe\
liverTx\x12\x0e\n\x02tx\x18\x01\x20\x01(\x0cB\x02\x18\0\"%\n\x0fRequestE\
ndBlock\x12\x12\n\x06height\x18\x01\x20\x01(\x03B\x02\x18\0\"\x0f\n\rReq\
uestCommit\"\xc3\x04\n\x08Response\x120\n\texception\x18\x01\x20\x01(\
\x0b2\x17.abci.ResponseExceptionH\0B\x02\x18\0\x12&\n\x04echo\x18\x02\
\x20\x01(\x0b2\x12.abci.ResponseEchoH\0B\x02\x18\0\x12(\n\x05flush\x18\
\x03\x20\x01(\x0b2\x13.abci.ResponseFlushH\0B\x02\x18\0\x12&\n\x04info\
\x18\x04\x20\x01(\x0b2\x12.abci.ResponseInfoH\0B\x02\x18\0\x121\n\nset_o\
ption\x18\x05\x20\x01(\x0b2\x17.abci.ResponseSetOptionH\0B\x02\x18\0\x12\
1\n\ninit_chain\x18\x06\x20\x01(\x0b2\x17.abci.ResponseInitChainH\0B\x02\
\x18\0\x12(\n\x05query\x18\x07\x20\x01(\x0b2\x13.abci.ResponseQueryH\0B\
\x02\x18\0\x123\n\x0bbegin_block\x18\x08\x20\x01(\x0b2\x18.abci.Response\
BeginBlockH\0B\x02\x18\0\x12-\n\x08check_tx\x18\t\x20\x01(\x0b2\x15.abci\
.ResponseCheckTxH\0B\x02\x18\0\x121\n\ndeliver_tx\x18\n\x20\x01(\x0b2\
\x17.abci.ResponseDeliverTxH\0B\x02\x18\0\x12/\n\tend_block\x18\x0b\x20\
\x01(\x0b2\x16.abci.ResponseEndBlockH\0B\x02\x18\0\x12*\n\x06commit\x18\
\x0c\x20\x01(\x0b2\x14.abci.ResponseCommitH\0B\x02\x18\0B\x07\n\x05value\
\"&\n\x11ResponseException\x12\x11\n\x05error\x18\x01\x20\x01(\tB\x02\
\x18\0\"#\n\x0cResponseEcho\x12\x13\n\x07message\x18\x01\x20\x01(\tB\x02\
\x18\0\"\x0f\n\rResponseFlush\"\x8e\x01\n\x0cResponseInfo\x12\x10\n\x04d\
ata\x18\x01\x20\x01(\tB\x02\x18\0\x12\x13\n\x07version\x18\x02\x20\x01(\
\tB\x02\x18\0\x12\x17\n\x0bapp_version\x18\x03\x20\x01(\x04B\x02\x18\0\
\x12\x1d\n\x11last_block_height\x18\x04\x20\x01(\x03B\x02\x18\0\x12\x1f\
\n\x13last_block_app_hash\x18\x05\x20\x01(\x0cB\x02\x18\0\"H\n\x11Respon\
seSetOption\x12\x10\n\x04code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x0f\n\
\x03log\x18\x03\x20\x01(\tB\x02\x18\0\x12\x10\n\x04info\x18\x04\x20\x01(\
\tB\x02\x18\0\"w\n\x11ResponseInitChain\x123\n\x10consensus_params\x18\
\x01\x20\x01(\x0b2\x15.abci.ConsensusParamsB\x02\x18\0\x12-\n\nvalidator\
s\x18\x02\x20\x03(\x0b2\x15.abci.ValidatorUpdateB\x02\x18\0\"\xc8\x01\n\
\rResponseQuery\x12\x10\n\x04code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x0f\
\n\x03log\x18\x03\x20\x01(\tB\x02\x18\0\x12\x10\n\x04info\x18\x04\x20\
\x01(\tB\x02\x18\0\x12\x11\n\x05index\x18\x05\x20\x01(\x03B\x02\x18\0\
\x12\x0f\n\x03key\x18\x06\x20\x01(\x0cB\x02\x18\0\x12\x11\n\x05value\x18\
\x07\x20\x01(\x0cB\x02\x18\0\x12\x20\n\x05proof\x18\x08\x20\x01(\x0b2\r.\
merkle.ProofB\x02\x18\0\x12\x12\n\x06height\x18\t\x20\x01(\x03B\x02\x18\
\0\x12\x15\n\tcodespace\x18\n\x20\x01(\tB\x02\x18\0\"6\n\x12ResponseBegi\
nBlock\x12\x20\n\x04tags\x18\x01\x20\x03(\x0b2\x0e.common.KVPairB\x02\
\x18\0\"\xbf\x01\n\x0fResponseCheckTx\x12\x10\n\x04code\x18\x01\x20\x01(\
\rB\x02\x18\0\x12\x10\n\x04data\x18\x02\x20\x01(\x0cB\x02\x18\0\x12\x0f\
\n\x03log\x18\x03\x20\x01(\tB\x02\x18\0\x12\x10\n\x04info\x18\x04\x20\
\x01(\tB\x02\x18\0\x12\x16\n\ngas_wanted\x18\x05\x20\x01(\x03B\x02\x18\0\
\x12\x14\n\x08gas_used\x18\x06\x20\x01(\x03B\x02\x18\0\x12\x20\n\x04tags\
\x18\x07\x20\x03(\x0b2\x0e.common.KVPairB\x02\x18\0\x12\x15\n\tcodespace\
\x18\x08\x20\x01(\tB\x02\x18\0\"\xc1\x01\n\x11ResponseDeliverTx\x12\x10\
\n\x04code\x18\x01\x20\x01(\rB\x02\x18\0\x12\x10\n\x04data\x18\x02\x20\
\x01(\x0cB\x02\x18\0\x12\x0f\n\x03log\x18\x03\x20\x01(\tB\x02\x18\0\x12\
\x10\n\x04info\x18\x04\x20\x01(\tB\x02\x18\0\x12\x16\n\ngas_wanted\x18\
\x05\x20\x01(\x03B\x02\x18\0\x12\x14\n\x08gas_used\x18\x06\x20\x01(\x03B\
\x02\x18\0\x12\x20\n\x04tags\x18\x07\x20\x03(\x0b2\x0e.common.KVPairB\
\x02\x18\0\x12\x15\n\tcodespace\x18\x08\x20\x01(\tB\x02\x18\0\"\xa6\x01\
\n\x10ResponseEndBlock\x124\n\x11validator_updates\x18\x01\x20\x03(\x0b2\
\x15.abci.ValidatorUpdateB\x02\x18\0\x12:\n\x17consensus_param_updates\
\x18\x02\x20\x01(\x0b2\x15.abci.ConsensusParamsB\x02\x18\0\x12\x20\n\x04\
tags\x18\x03\x20\x03(\x0b2\x0e.common.KVPairB\x02\x18\0\"\"\n\x0eRespons\
eCommit\x12\x10\n\x04data\x18\x02\x20\x01(\x0cB\x02\x18\0\"\x9a\x01\n\
\x0fConsensusParams\x12-\n\nblock_size\x18\x01\x20\x01(\x0b2\x15.abci.Bl\
ockSizeParamsB\x02\x18\0\x12*\n\x08evidence\x18\x02\x20\x01(\x0b2\x14.ab\
ci.EvidenceParamsB\x02\x18\0\x12,\n\tvalidator\x18\x03\x20\x01(\x0b2\x15\
.abci.ValidatorParamsB\x02\x18\0\"=\n\x0fBlockSizeParams\x12\x15\n\tmax_\
bytes\x18\x01\x20\x01(\x03B\x02\x18\0\x12\x13\n\x07max_gas\x18\x02\x20\
\x01(\x03B\x02\x18\0\"%\n\x0eEvidenceParams\x12\x13\n\x07max_age\x18\x01\
\x20\x01(\x03B\x02\x18\0\",\n\x0fValidatorParams\x12\x19\n\rpub_key_type\
s\x18\x01\x20\x03(\tB\x02\x18\0\"F\n\x0eLastCommitInfo\x12\x11\n\x05roun\
d\x18\x01\x20\x01(\x05B\x02\x18\0\x12!\n\x05votes\x18\x02\x20\x03(\x0b2\
\x0e.abci.VoteInfoB\x02\x18\0\"\xd8\x03\n\x06Header\x12\"\n\x07version\
\x18\x01\x20\x01(\x0b2\r.abci.VersionB\x02\x18\0\x12\x14\n\x08chain_id\
\x18\x02\x20\x01(\tB\x02\x18\0\x12\x12\n\x06height\x18\x03\x20\x01(\x03B\
\x02\x18\0\x12,\n\x04time\x18\x04\x20\x01(\x0b2\x1a.google.protobuf.Time\
stampB\x02\x18\0\x12\x13\n\x07num_txs\x18\x05\x20\x01(\x03B\x02\x18\0\
\x12\x15\n\ttotal_txs\x18\x06\x20\x01(\x03B\x02\x18\0\x12(\n\rlast_block\
_id\x18\x07\x20\x01(\x0b2\r.abci.BlockIDB\x02\x18\0\x12\x1c\n\x10last_co\
mmit_hash\x18\x08\x20\x01(\x0cB\x02\x18\0\x12\x15\n\tdata_hash\x18\t\x20\
\x01(\x0cB\x02\x18\0\x12\x1b\n\x0fvalidators_hash\x18\n\x20\x01(\x0cB\
\x02\x18\0\x12\x20\n\x14next_validators_hash\x18\x0b\x20\x01(\x0cB\x02\
\x18\0\x12\x1a\n\x0econsensus_hash\x18\x0c\x20\x01(\x0cB\x02\x18\0\x12\
\x14\n\x08app_hash\x18\r\x20\x01(\x0cB\x02\x18\0\x12\x1d\n\x11last_resul\
ts_hash\x18\x0e\x20\x01(\x0cB\x02\x18\0\x12\x19\n\revidence_hash\x18\x0f\
\x20\x01(\x0cB\x02\x18\0\x12\x1c\n\x10proposer_address\x18\x10\x20\x01(\
\x0cB\x02\x18\0\"-\n\x07Version\x12\x11\n\x05Block\x18\x01\x20\x01(\x04B\
\x02\x18\0\x12\x0f\n\x03App\x18\x02\x20\x01(\x04B\x02\x18\0\"J\n\x07Bloc\
kID\x12\x10\n\x04hash\x18\x01\x20\x01(\x0cB\x02\x18\0\x12-\n\x0cparts_he\
ader\x18\x02\x20\x01(\x0b2\x13.abci.PartSetHeaderB\x02\x18\0\"4\n\rPartS\
etHeader\x12\x11\n\x05total\x18\x01\x20\x01(\x05B\x02\x18\0\x12\x10\n\
\x04hash\x18\x02\x20\x01(\x0cB\x02\x18\0\"3\n\tValidator\x12\x13\n\x07ad\
dress\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x11\n\x05power\x18\x03\x20\x01\
(\x03B\x02\x18\0\"G\n\x0fValidatorUpdate\x12!\n\x07pub_key\x18\x01\x20\
\x01(\x0b2\x0c.abci.PubKeyB\x02\x18\0\x12\x11\n\x05power\x18\x02\x20\x01\
(\x03B\x02\x18\0\"Q\n\x08VoteInfo\x12&\n\tvalidator\x18\x01\x20\x01(\x0b\
2\x0f.abci.ValidatorB\x02\x18\0\x12\x1d\n\x11signed_last_block\x18\x02\
\x20\x01(\x08B\x02\x18\0\",\n\x06PubKey\x12\x10\n\x04type\x18\x01\x20\
\x01(\tB\x02\x18\0\x12\x10\n\x04data\x18\x02\x20\x01(\x0cB\x02\x18\0\"\
\xa6\x01\n\x08Evidence\x12\x10\n\x04type\x18\x01\x20\x01(\tB\x02\x18\0\
\x12&\n\tvalidator\x18\x02\x20\x01(\x0b2\x0f.abci.ValidatorB\x02\x18\0\
\x12\x12\n\x06height\x18\x03\x20\x01(\x03B\x02\x18\0\x12,\n\x04time\x18\
\x04\x20\x01(\x0b2\x1a.google.protobuf.TimestampB\x02\x18\0\x12\x1e\n\
\x12total_voting_power\x18\x05\x20\x01(\x03B\x02\x18\0B\x1c\xc8\xe2\x1e\
\x01\xc0\xe3\x1e\x01\xf8\xe1\x1e\x01\xe0\xe2\x1e\x01\xa8\xe2\x1e\x01\xb8\
\xe2\x1e\x01\xd0\xe2\x1e\x01b\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()
})
}
}