#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceGetAddress {
pub address_n: ::std::vec::Vec<u32>,
pub show_display: ::std::option::Option<bool>,
pub chunkify: ::std::option::Option<bool>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceGetAddress {
fn default() -> &'a BinanceGetAddress {
<BinanceGetAddress as ::protobuf::Message>::default_instance()
}
}
impl BinanceGetAddress {
pub fn new() -> BinanceGetAddress {
::std::default::Default::default()
}
pub fn show_display(&self) -> bool {
self.show_display.unwrap_or(false)
}
pub fn clear_show_display(&mut self) {
self.show_display = ::std::option::Option::None;
}
pub fn has_show_display(&self) -> bool {
self.show_display.is_some()
}
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::std::option::Option::Some(v);
}
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &BinanceGetAddress| { &m.address_n },
|m: &mut BinanceGetAddress| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"show_display",
|m: &BinanceGetAddress| { &m.show_display },
|m: &mut BinanceGetAddress| { &mut m.show_display },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &BinanceGetAddress| { &m.chunkify },
|m: &mut BinanceGetAddress| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceGetAddress>(
"BinanceGetAddress",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceGetAddress {
const NAME: &'static str = "BinanceGetAddress";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.show_display = ::std::option::Option::Some(is.read_bool()?);
},
24 => {
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.show_display {
my_size += 1 + 1;
}
if let Some(v) = self.chunkify {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.show_display {
os.write_bool(2, v)?;
}
if let Some(v) = self.chunkify {
os.write_bool(3, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceGetAddress {
BinanceGetAddress::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.show_display = ::std::option::Option::None;
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceGetAddress {
static instance: BinanceGetAddress = BinanceGetAddress {
address_n: ::std::vec::Vec::new(),
show_display: ::std::option::Option::None,
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceGetAddress {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceGetAddress").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceGetAddress {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceGetAddress {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceAddress {
pub address: ::std::option::Option<::std::string::String>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceAddress {
fn default() -> &'a BinanceAddress {
<BinanceAddress as ::protobuf::Message>::default_instance()
}
}
impl BinanceAddress {
pub fn new() -> BinanceAddress {
::std::default::Default::default()
}
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
pub fn mut_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &BinanceAddress| { &m.address },
|m: &mut BinanceAddress| { &mut m.address },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceAddress>(
"BinanceAddress",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceAddress {
const NAME: &'static str = "BinanceAddress";
fn is_initialized(&self) -> bool {
if self.address.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.address = ::std::option::Option::Some(is.read_string()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.address.as_ref() {
os.write_string(1, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceAddress {
BinanceAddress::new()
}
fn clear(&mut self) {
self.address = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceAddress {
static instance: BinanceAddress = BinanceAddress {
address: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceAddress {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceAddress").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceAddress {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceAddress {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceGetPublicKey {
pub address_n: ::std::vec::Vec<u32>,
pub show_display: ::std::option::Option<bool>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceGetPublicKey {
fn default() -> &'a BinanceGetPublicKey {
<BinanceGetPublicKey as ::protobuf::Message>::default_instance()
}
}
impl BinanceGetPublicKey {
pub fn new() -> BinanceGetPublicKey {
::std::default::Default::default()
}
pub fn show_display(&self) -> bool {
self.show_display.unwrap_or(false)
}
pub fn clear_show_display(&mut self) {
self.show_display = ::std::option::Option::None;
}
pub fn has_show_display(&self) -> bool {
self.show_display.is_some()
}
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &BinanceGetPublicKey| { &m.address_n },
|m: &mut BinanceGetPublicKey| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"show_display",
|m: &BinanceGetPublicKey| { &m.show_display },
|m: &mut BinanceGetPublicKey| { &mut m.show_display },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceGetPublicKey>(
"BinanceGetPublicKey",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceGetPublicKey {
const NAME: &'static str = "BinanceGetPublicKey";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.show_display = ::std::option::Option::Some(is.read_bool()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.show_display {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.show_display {
os.write_bool(2, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceGetPublicKey {
BinanceGetPublicKey::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.show_display = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceGetPublicKey {
static instance: BinanceGetPublicKey = BinanceGetPublicKey {
address_n: ::std::vec::Vec::new(),
show_display: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceGetPublicKey {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceGetPublicKey").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceGetPublicKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceGetPublicKey {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinancePublicKey {
pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinancePublicKey {
fn default() -> &'a BinancePublicKey {
<BinancePublicKey as ::protobuf::Message>::default_instance()
}
}
impl BinancePublicKey {
pub fn new() -> BinancePublicKey {
::std::default::Default::default()
}
pub fn public_key(&self) -> &[u8] {
match self.public_key.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_public_key(&mut self) {
self.public_key = ::std::option::Option::None;
}
pub fn has_public_key(&self) -> bool {
self.public_key.is_some()
}
pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key = ::std::option::Option::Some(v);
}
pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.public_key.is_none() {
self.public_key = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.public_key.as_mut().unwrap()
}
pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"public_key",
|m: &BinancePublicKey| { &m.public_key },
|m: &mut BinancePublicKey| { &mut m.public_key },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinancePublicKey>(
"BinancePublicKey",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinancePublicKey {
const NAME: &'static str = "BinancePublicKey";
fn is_initialized(&self) -> bool {
if self.public_key.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.public_key = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.public_key.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.public_key.as_ref() {
os.write_bytes(1, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinancePublicKey {
BinancePublicKey::new()
}
fn clear(&mut self) {
self.public_key = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinancePublicKey {
static instance: BinancePublicKey = BinancePublicKey {
public_key: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinancePublicKey {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinancePublicKey").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinancePublicKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinancePublicKey {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceSignTx {
pub address_n: ::std::vec::Vec<u32>,
pub msg_count: ::std::option::Option<u32>,
pub account_number: ::std::option::Option<i64>,
pub chain_id: ::std::option::Option<::std::string::String>,
pub memo: ::std::option::Option<::std::string::String>,
pub sequence: ::std::option::Option<i64>,
pub source: ::std::option::Option<i64>,
pub chunkify: ::std::option::Option<bool>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceSignTx {
fn default() -> &'a BinanceSignTx {
<BinanceSignTx as ::protobuf::Message>::default_instance()
}
}
impl BinanceSignTx {
pub fn new() -> BinanceSignTx {
::std::default::Default::default()
}
pub fn msg_count(&self) -> u32 {
self.msg_count.unwrap_or(0)
}
pub fn clear_msg_count(&mut self) {
self.msg_count = ::std::option::Option::None;
}
pub fn has_msg_count(&self) -> bool {
self.msg_count.is_some()
}
pub fn set_msg_count(&mut self, v: u32) {
self.msg_count = ::std::option::Option::Some(v);
}
pub fn account_number(&self) -> i64 {
self.account_number.unwrap_or(0)
}
pub fn clear_account_number(&mut self) {
self.account_number = ::std::option::Option::None;
}
pub fn has_account_number(&self) -> bool {
self.account_number.is_some()
}
pub fn set_account_number(&mut self, v: i64) {
self.account_number = ::std::option::Option::Some(v);
}
pub fn chain_id(&self) -> &str {
match self.chain_id.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_chain_id(&mut self) {
self.chain_id = ::std::option::Option::None;
}
pub fn has_chain_id(&self) -> bool {
self.chain_id.is_some()
}
pub fn set_chain_id(&mut self, v: ::std::string::String) {
self.chain_id = ::std::option::Option::Some(v);
}
pub fn mut_chain_id(&mut self) -> &mut ::std::string::String {
if self.chain_id.is_none() {
self.chain_id = ::std::option::Option::Some(::std::string::String::new());
}
self.chain_id.as_mut().unwrap()
}
pub fn take_chain_id(&mut self) -> ::std::string::String {
self.chain_id.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn memo(&self) -> &str {
match self.memo.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_memo(&mut self) {
self.memo = ::std::option::Option::None;
}
pub fn has_memo(&self) -> bool {
self.memo.is_some()
}
pub fn set_memo(&mut self, v: ::std::string::String) {
self.memo = ::std::option::Option::Some(v);
}
pub fn mut_memo(&mut self) -> &mut ::std::string::String {
if self.memo.is_none() {
self.memo = ::std::option::Option::Some(::std::string::String::new());
}
self.memo.as_mut().unwrap()
}
pub fn take_memo(&mut self) -> ::std::string::String {
self.memo.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn sequence(&self) -> i64 {
self.sequence.unwrap_or(0)
}
pub fn clear_sequence(&mut self) {
self.sequence = ::std::option::Option::None;
}
pub fn has_sequence(&self) -> bool {
self.sequence.is_some()
}
pub fn set_sequence(&mut self, v: i64) {
self.sequence = ::std::option::Option::Some(v);
}
pub fn source(&self) -> i64 {
self.source.unwrap_or(0)
}
pub fn clear_source(&mut self) {
self.source = ::std::option::Option::None;
}
pub fn has_source(&self) -> bool {
self.source.is_some()
}
pub fn set_source(&mut self, v: i64) {
self.source = ::std::option::Option::Some(v);
}
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(8);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &BinanceSignTx| { &m.address_n },
|m: &mut BinanceSignTx| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"msg_count",
|m: &BinanceSignTx| { &m.msg_count },
|m: &mut BinanceSignTx| { &mut m.msg_count },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"account_number",
|m: &BinanceSignTx| { &m.account_number },
|m: &mut BinanceSignTx| { &mut m.account_number },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chain_id",
|m: &BinanceSignTx| { &m.chain_id },
|m: &mut BinanceSignTx| { &mut m.chain_id },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"memo",
|m: &BinanceSignTx| { &m.memo },
|m: &mut BinanceSignTx| { &mut m.memo },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"sequence",
|m: &BinanceSignTx| { &m.sequence },
|m: &mut BinanceSignTx| { &mut m.sequence },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"source",
|m: &BinanceSignTx| { &m.source },
|m: &mut BinanceSignTx| { &mut m.source },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &BinanceSignTx| { &m.chunkify },
|m: &mut BinanceSignTx| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceSignTx>(
"BinanceSignTx",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceSignTx {
const NAME: &'static str = "BinanceSignTx";
fn is_initialized(&self) -> bool {
if self.msg_count.is_none() {
return false;
}
if self.account_number.is_none() {
return false;
}
if self.sequence.is_none() {
return false;
}
if self.source.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.msg_count = ::std::option::Option::Some(is.read_uint32()?);
},
24 => {
self.account_number = ::std::option::Option::Some(is.read_sint64()?);
},
34 => {
self.chain_id = ::std::option::Option::Some(is.read_string()?);
},
42 => {
self.memo = ::std::option::Option::Some(is.read_string()?);
},
48 => {
self.sequence = ::std::option::Option::Some(is.read_sint64()?);
},
56 => {
self.source = ::std::option::Option::Some(is.read_sint64()?);
},
64 => {
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.msg_count {
my_size += ::protobuf::rt::uint32_size(2, v);
}
if let Some(v) = self.account_number {
my_size += ::protobuf::rt::sint64_size(3, v);
}
if let Some(v) = self.chain_id.as_ref() {
my_size += ::protobuf::rt::string_size(4, &v);
}
if let Some(v) = self.memo.as_ref() {
my_size += ::protobuf::rt::string_size(5, &v);
}
if let Some(v) = self.sequence {
my_size += ::protobuf::rt::sint64_size(6, v);
}
if let Some(v) = self.source {
my_size += ::protobuf::rt::sint64_size(7, v);
}
if let Some(v) = self.chunkify {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.msg_count {
os.write_uint32(2, v)?;
}
if let Some(v) = self.account_number {
os.write_sint64(3, v)?;
}
if let Some(v) = self.chain_id.as_ref() {
os.write_string(4, v)?;
}
if let Some(v) = self.memo.as_ref() {
os.write_string(5, v)?;
}
if let Some(v) = self.sequence {
os.write_sint64(6, v)?;
}
if let Some(v) = self.source {
os.write_sint64(7, v)?;
}
if let Some(v) = self.chunkify {
os.write_bool(8, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceSignTx {
BinanceSignTx::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.msg_count = ::std::option::Option::None;
self.account_number = ::std::option::Option::None;
self.chain_id = ::std::option::Option::None;
self.memo = ::std::option::Option::None;
self.sequence = ::std::option::Option::None;
self.source = ::std::option::Option::None;
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceSignTx {
static instance: BinanceSignTx = BinanceSignTx {
address_n: ::std::vec::Vec::new(),
msg_count: ::std::option::Option::None,
account_number: ::std::option::Option::None,
chain_id: ::std::option::Option::None,
memo: ::std::option::Option::None,
sequence: ::std::option::Option::None,
source: ::std::option::Option::None,
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceSignTx {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceSignTx").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceSignTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceSignTx {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceTxRequest {
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceTxRequest {
fn default() -> &'a BinanceTxRequest {
<BinanceTxRequest as ::protobuf::Message>::default_instance()
}
}
impl BinanceTxRequest {
pub fn new() -> BinanceTxRequest {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(0);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceTxRequest>(
"BinanceTxRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceTxRequest {
const NAME: &'static str = "BinanceTxRequest";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceTxRequest {
BinanceTxRequest::new()
}
fn clear(&mut self) {
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceTxRequest {
static instance: BinanceTxRequest = BinanceTxRequest {
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceTxRequest {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceTxRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceTxRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceTxRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceTransferMsg {
pub inputs: ::std::vec::Vec<binance_transfer_msg::BinanceInputOutput>,
pub outputs: ::std::vec::Vec<binance_transfer_msg::BinanceInputOutput>,
pub chunkify: ::std::option::Option<bool>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceTransferMsg {
fn default() -> &'a BinanceTransferMsg {
<BinanceTransferMsg as ::protobuf::Message>::default_instance()
}
}
impl BinanceTransferMsg {
pub fn new() -> BinanceTransferMsg {
::std::default::Default::default()
}
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"inputs",
|m: &BinanceTransferMsg| { &m.inputs },
|m: &mut BinanceTransferMsg| { &mut m.inputs },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"outputs",
|m: &BinanceTransferMsg| { &m.outputs },
|m: &mut BinanceTransferMsg| { &mut m.outputs },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &BinanceTransferMsg| { &m.chunkify },
|m: &mut BinanceTransferMsg| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceTransferMsg>(
"BinanceTransferMsg",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceTransferMsg {
const NAME: &'static str = "BinanceTransferMsg";
fn is_initialized(&self) -> bool {
for v in &self.inputs {
if !v.is_initialized() {
return false;
}
};
for v in &self.outputs {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.inputs.push(is.read_message()?);
},
18 => {
self.outputs.push(is.read_message()?);
},
24 => {
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.inputs {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
for value in &self.outputs {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
if let Some(v) = self.chunkify {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.inputs {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
};
for v in &self.outputs {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
};
if let Some(v) = self.chunkify {
os.write_bool(3, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceTransferMsg {
BinanceTransferMsg::new()
}
fn clear(&mut self) {
self.inputs.clear();
self.outputs.clear();
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceTransferMsg {
static instance: BinanceTransferMsg = BinanceTransferMsg {
inputs: ::std::vec::Vec::new(),
outputs: ::std::vec::Vec::new(),
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceTransferMsg {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceTransferMsg").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceTransferMsg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceTransferMsg {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod binance_transfer_msg {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceInputOutput {
pub address: ::std::option::Option<::std::string::String>,
pub coins: ::std::vec::Vec<BinanceCoin>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceInputOutput {
fn default() -> &'a BinanceInputOutput {
<BinanceInputOutput as ::protobuf::Message>::default_instance()
}
}
impl BinanceInputOutput {
pub fn new() -> BinanceInputOutput {
::std::default::Default::default()
}
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
pub fn mut_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &BinanceInputOutput| { &m.address },
|m: &mut BinanceInputOutput| { &mut m.address },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"coins",
|m: &BinanceInputOutput| { &m.coins },
|m: &mut BinanceInputOutput| { &mut m.coins },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceInputOutput>(
"BinanceTransferMsg.BinanceInputOutput",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceInputOutput {
const NAME: &'static str = "BinanceInputOutput";
fn is_initialized(&self) -> bool {
if self.address.is_none() {
return false;
}
for v in &self.coins {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.address = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.coins.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
for value in &self.coins {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.address.as_ref() {
os.write_string(1, v)?;
}
for v in &self.coins {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
};
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceInputOutput {
BinanceInputOutput::new()
}
fn clear(&mut self) {
self.address = ::std::option::Option::None;
self.coins.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceInputOutput {
static instance: BinanceInputOutput = BinanceInputOutput {
address: ::std::option::Option::None,
coins: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceInputOutput {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().message_by_package_relative_name("BinanceTransferMsg.BinanceInputOutput").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceInputOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceInputOutput {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceCoin {
pub amount: ::std::option::Option<i64>,
pub denom: ::std::option::Option<::std::string::String>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceCoin {
fn default() -> &'a BinanceCoin {
<BinanceCoin as ::protobuf::Message>::default_instance()
}
}
impl BinanceCoin {
pub fn new() -> BinanceCoin {
::std::default::Default::default()
}
pub fn amount(&self) -> i64 {
self.amount.unwrap_or(0)
}
pub fn clear_amount(&mut self) {
self.amount = ::std::option::Option::None;
}
pub fn has_amount(&self) -> bool {
self.amount.is_some()
}
pub fn set_amount(&mut self, v: i64) {
self.amount = ::std::option::Option::Some(v);
}
pub fn denom(&self) -> &str {
match self.denom.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_denom(&mut self) {
self.denom = ::std::option::Option::None;
}
pub fn has_denom(&self) -> bool {
self.denom.is_some()
}
pub fn set_denom(&mut self, v: ::std::string::String) {
self.denom = ::std::option::Option::Some(v);
}
pub fn mut_denom(&mut self) -> &mut ::std::string::String {
if self.denom.is_none() {
self.denom = ::std::option::Option::Some(::std::string::String::new());
}
self.denom.as_mut().unwrap()
}
pub fn take_denom(&mut self) -> ::std::string::String {
self.denom.take().unwrap_or_else(|| ::std::string::String::new())
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"amount",
|m: &BinanceCoin| { &m.amount },
|m: &mut BinanceCoin| { &mut m.amount },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"denom",
|m: &BinanceCoin| { &m.denom },
|m: &mut BinanceCoin| { &mut m.denom },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceCoin>(
"BinanceTransferMsg.BinanceCoin",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceCoin {
const NAME: &'static str = "BinanceCoin";
fn is_initialized(&self) -> bool {
if self.amount.is_none() {
return false;
}
if self.denom.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.amount = ::std::option::Option::Some(is.read_sint64()?);
},
18 => {
self.denom = ::std::option::Option::Some(is.read_string()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.amount {
my_size += ::protobuf::rt::sint64_size(1, v);
}
if let Some(v) = self.denom.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.amount {
os.write_sint64(1, v)?;
}
if let Some(v) = self.denom.as_ref() {
os.write_string(2, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceCoin {
BinanceCoin::new()
}
fn clear(&mut self) {
self.amount = ::std::option::Option::None;
self.denom = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceCoin {
static instance: BinanceCoin = BinanceCoin {
amount: ::std::option::Option::None,
denom: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceCoin {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().message_by_package_relative_name("BinanceTransferMsg.BinanceCoin").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceCoin {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceCoin {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceOrderMsg {
pub id: ::std::option::Option<::std::string::String>,
pub ordertype: ::std::option::Option<::protobuf::EnumOrUnknown<binance_order_msg::BinanceOrderType>>,
pub price: ::std::option::Option<i64>,
pub quantity: ::std::option::Option<i64>,
pub sender: ::std::option::Option<::std::string::String>,
pub side: ::std::option::Option<::protobuf::EnumOrUnknown<binance_order_msg::BinanceOrderSide>>,
pub symbol: ::std::option::Option<::std::string::String>,
pub timeinforce: ::std::option::Option<::protobuf::EnumOrUnknown<binance_order_msg::BinanceTimeInForce>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceOrderMsg {
fn default() -> &'a BinanceOrderMsg {
<BinanceOrderMsg as ::protobuf::Message>::default_instance()
}
}
impl BinanceOrderMsg {
pub fn new() -> BinanceOrderMsg {
::std::default::Default::default()
}
pub fn id(&self) -> &str {
match self.id.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_id(&mut self) {
self.id = ::std::option::Option::None;
}
pub fn has_id(&self) -> bool {
self.id.is_some()
}
pub fn set_id(&mut self, v: ::std::string::String) {
self.id = ::std::option::Option::Some(v);
}
pub fn mut_id(&mut self) -> &mut ::std::string::String {
if self.id.is_none() {
self.id = ::std::option::Option::Some(::std::string::String::new());
}
self.id.as_mut().unwrap()
}
pub fn take_id(&mut self) -> ::std::string::String {
self.id.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn ordertype(&self) -> binance_order_msg::BinanceOrderType {
match self.ordertype {
Some(e) => e.enum_value_or(binance_order_msg::BinanceOrderType::OT_UNKNOWN),
None => binance_order_msg::BinanceOrderType::OT_UNKNOWN,
}
}
pub fn clear_ordertype(&mut self) {
self.ordertype = ::std::option::Option::None;
}
pub fn has_ordertype(&self) -> bool {
self.ordertype.is_some()
}
pub fn set_ordertype(&mut self, v: binance_order_msg::BinanceOrderType) {
self.ordertype = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
pub fn price(&self) -> i64 {
self.price.unwrap_or(0)
}
pub fn clear_price(&mut self) {
self.price = ::std::option::Option::None;
}
pub fn has_price(&self) -> bool {
self.price.is_some()
}
pub fn set_price(&mut self, v: i64) {
self.price = ::std::option::Option::Some(v);
}
pub fn quantity(&self) -> i64 {
self.quantity.unwrap_or(0)
}
pub fn clear_quantity(&mut self) {
self.quantity = ::std::option::Option::None;
}
pub fn has_quantity(&self) -> bool {
self.quantity.is_some()
}
pub fn set_quantity(&mut self, v: i64) {
self.quantity = ::std::option::Option::Some(v);
}
pub fn sender(&self) -> &str {
match self.sender.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_sender(&mut self) {
self.sender = ::std::option::Option::None;
}
pub fn has_sender(&self) -> bool {
self.sender.is_some()
}
pub fn set_sender(&mut self, v: ::std::string::String) {
self.sender = ::std::option::Option::Some(v);
}
pub fn mut_sender(&mut self) -> &mut ::std::string::String {
if self.sender.is_none() {
self.sender = ::std::option::Option::Some(::std::string::String::new());
}
self.sender.as_mut().unwrap()
}
pub fn take_sender(&mut self) -> ::std::string::String {
self.sender.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn side(&self) -> binance_order_msg::BinanceOrderSide {
match self.side {
Some(e) => e.enum_value_or(binance_order_msg::BinanceOrderSide::SIDE_UNKNOWN),
None => binance_order_msg::BinanceOrderSide::SIDE_UNKNOWN,
}
}
pub fn clear_side(&mut self) {
self.side = ::std::option::Option::None;
}
pub fn has_side(&self) -> bool {
self.side.is_some()
}
pub fn set_side(&mut self, v: binance_order_msg::BinanceOrderSide) {
self.side = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
pub fn symbol(&self) -> &str {
match self.symbol.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_symbol(&mut self) {
self.symbol = ::std::option::Option::None;
}
pub fn has_symbol(&self) -> bool {
self.symbol.is_some()
}
pub fn set_symbol(&mut self, v: ::std::string::String) {
self.symbol = ::std::option::Option::Some(v);
}
pub fn mut_symbol(&mut self) -> &mut ::std::string::String {
if self.symbol.is_none() {
self.symbol = ::std::option::Option::Some(::std::string::String::new());
}
self.symbol.as_mut().unwrap()
}
pub fn take_symbol(&mut self) -> ::std::string::String {
self.symbol.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn timeinforce(&self) -> binance_order_msg::BinanceTimeInForce {
match self.timeinforce {
Some(e) => e.enum_value_or(binance_order_msg::BinanceTimeInForce::TIF_UNKNOWN),
None => binance_order_msg::BinanceTimeInForce::TIF_UNKNOWN,
}
}
pub fn clear_timeinforce(&mut self) {
self.timeinforce = ::std::option::Option::None;
}
pub fn has_timeinforce(&self) -> bool {
self.timeinforce.is_some()
}
pub fn set_timeinforce(&mut self, v: binance_order_msg::BinanceTimeInForce) {
self.timeinforce = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(8);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"id",
|m: &BinanceOrderMsg| { &m.id },
|m: &mut BinanceOrderMsg| { &mut m.id },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"ordertype",
|m: &BinanceOrderMsg| { &m.ordertype },
|m: &mut BinanceOrderMsg| { &mut m.ordertype },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"price",
|m: &BinanceOrderMsg| { &m.price },
|m: &mut BinanceOrderMsg| { &mut m.price },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"quantity",
|m: &BinanceOrderMsg| { &m.quantity },
|m: &mut BinanceOrderMsg| { &mut m.quantity },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"sender",
|m: &BinanceOrderMsg| { &m.sender },
|m: &mut BinanceOrderMsg| { &mut m.sender },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"side",
|m: &BinanceOrderMsg| { &m.side },
|m: &mut BinanceOrderMsg| { &mut m.side },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"symbol",
|m: &BinanceOrderMsg| { &m.symbol },
|m: &mut BinanceOrderMsg| { &mut m.symbol },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"timeinforce",
|m: &BinanceOrderMsg| { &m.timeinforce },
|m: &mut BinanceOrderMsg| { &mut m.timeinforce },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceOrderMsg>(
"BinanceOrderMsg",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceOrderMsg {
const NAME: &'static str = "BinanceOrderMsg";
fn is_initialized(&self) -> bool {
if self.ordertype.is_none() {
return false;
}
if self.price.is_none() {
return false;
}
if self.quantity.is_none() {
return false;
}
if self.side.is_none() {
return false;
}
if self.timeinforce.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.id = ::std::option::Option::Some(is.read_string()?);
},
16 => {
self.ordertype = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
24 => {
self.price = ::std::option::Option::Some(is.read_sint64()?);
},
32 => {
self.quantity = ::std::option::Option::Some(is.read_sint64()?);
},
42 => {
self.sender = ::std::option::Option::Some(is.read_string()?);
},
48 => {
self.side = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
58 => {
self.symbol = ::std::option::Option::Some(is.read_string()?);
},
64 => {
self.timeinforce = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.id.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.ordertype {
my_size += ::protobuf::rt::int32_size(2, v.value());
}
if let Some(v) = self.price {
my_size += ::protobuf::rt::sint64_size(3, v);
}
if let Some(v) = self.quantity {
my_size += ::protobuf::rt::sint64_size(4, v);
}
if let Some(v) = self.sender.as_ref() {
my_size += ::protobuf::rt::string_size(5, &v);
}
if let Some(v) = self.side {
my_size += ::protobuf::rt::int32_size(6, v.value());
}
if let Some(v) = self.symbol.as_ref() {
my_size += ::protobuf::rt::string_size(7, &v);
}
if let Some(v) = self.timeinforce {
my_size += ::protobuf::rt::int32_size(8, v.value());
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.id.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.ordertype {
os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.price {
os.write_sint64(3, v)?;
}
if let Some(v) = self.quantity {
os.write_sint64(4, v)?;
}
if let Some(v) = self.sender.as_ref() {
os.write_string(5, v)?;
}
if let Some(v) = self.side {
os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.symbol.as_ref() {
os.write_string(7, v)?;
}
if let Some(v) = self.timeinforce {
os.write_enum(8, ::protobuf::EnumOrUnknown::value(&v))?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceOrderMsg {
BinanceOrderMsg::new()
}
fn clear(&mut self) {
self.id = ::std::option::Option::None;
self.ordertype = ::std::option::Option::None;
self.price = ::std::option::Option::None;
self.quantity = ::std::option::Option::None;
self.sender = ::std::option::Option::None;
self.side = ::std::option::Option::None;
self.symbol = ::std::option::Option::None;
self.timeinforce = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceOrderMsg {
static instance: BinanceOrderMsg = BinanceOrderMsg {
id: ::std::option::Option::None,
ordertype: ::std::option::Option::None,
price: ::std::option::Option::None,
quantity: ::std::option::Option::None,
sender: ::std::option::Option::None,
side: ::std::option::Option::None,
symbol: ::std::option::Option::None,
timeinforce: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceOrderMsg {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceOrderMsg").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceOrderMsg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceOrderMsg {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod binance_order_msg {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum BinanceOrderType {
OT_UNKNOWN = 0,
MARKET = 1,
LIMIT = 2,
OT_RESERVED = 3,
}
impl ::protobuf::Enum for BinanceOrderType {
const NAME: &'static str = "BinanceOrderType";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<BinanceOrderType> {
match value {
0 => ::std::option::Option::Some(BinanceOrderType::OT_UNKNOWN),
1 => ::std::option::Option::Some(BinanceOrderType::MARKET),
2 => ::std::option::Option::Some(BinanceOrderType::LIMIT),
3 => ::std::option::Option::Some(BinanceOrderType::OT_RESERVED),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<BinanceOrderType> {
match str {
"OT_UNKNOWN" => ::std::option::Option::Some(BinanceOrderType::OT_UNKNOWN),
"MARKET" => ::std::option::Option::Some(BinanceOrderType::MARKET),
"LIMIT" => ::std::option::Option::Some(BinanceOrderType::LIMIT),
"OT_RESERVED" => ::std::option::Option::Some(BinanceOrderType::OT_RESERVED),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [BinanceOrderType] = &[
BinanceOrderType::OT_UNKNOWN,
BinanceOrderType::MARKET,
BinanceOrderType::LIMIT,
BinanceOrderType::OT_RESERVED,
];
}
impl ::protobuf::EnumFull for BinanceOrderType {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BinanceOrderMsg.BinanceOrderType").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for BinanceOrderType {
fn default() -> Self {
BinanceOrderType::OT_UNKNOWN
}
}
impl BinanceOrderType {
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<BinanceOrderType>("BinanceOrderMsg.BinanceOrderType")
}
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum BinanceOrderSide {
SIDE_UNKNOWN = 0,
BUY = 1,
SELL = 2,
}
impl ::protobuf::Enum for BinanceOrderSide {
const NAME: &'static str = "BinanceOrderSide";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<BinanceOrderSide> {
match value {
0 => ::std::option::Option::Some(BinanceOrderSide::SIDE_UNKNOWN),
1 => ::std::option::Option::Some(BinanceOrderSide::BUY),
2 => ::std::option::Option::Some(BinanceOrderSide::SELL),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<BinanceOrderSide> {
match str {
"SIDE_UNKNOWN" => ::std::option::Option::Some(BinanceOrderSide::SIDE_UNKNOWN),
"BUY" => ::std::option::Option::Some(BinanceOrderSide::BUY),
"SELL" => ::std::option::Option::Some(BinanceOrderSide::SELL),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [BinanceOrderSide] = &[
BinanceOrderSide::SIDE_UNKNOWN,
BinanceOrderSide::BUY,
BinanceOrderSide::SELL,
];
}
impl ::protobuf::EnumFull for BinanceOrderSide {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BinanceOrderMsg.BinanceOrderSide").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for BinanceOrderSide {
fn default() -> Self {
BinanceOrderSide::SIDE_UNKNOWN
}
}
impl BinanceOrderSide {
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<BinanceOrderSide>("BinanceOrderMsg.BinanceOrderSide")
}
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum BinanceTimeInForce {
TIF_UNKNOWN = 0,
GTE = 1,
TIF_RESERVED = 2,
IOC = 3,
}
impl ::protobuf::Enum for BinanceTimeInForce {
const NAME: &'static str = "BinanceTimeInForce";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<BinanceTimeInForce> {
match value {
0 => ::std::option::Option::Some(BinanceTimeInForce::TIF_UNKNOWN),
1 => ::std::option::Option::Some(BinanceTimeInForce::GTE),
2 => ::std::option::Option::Some(BinanceTimeInForce::TIF_RESERVED),
3 => ::std::option::Option::Some(BinanceTimeInForce::IOC),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<BinanceTimeInForce> {
match str {
"TIF_UNKNOWN" => ::std::option::Option::Some(BinanceTimeInForce::TIF_UNKNOWN),
"GTE" => ::std::option::Option::Some(BinanceTimeInForce::GTE),
"TIF_RESERVED" => ::std::option::Option::Some(BinanceTimeInForce::TIF_RESERVED),
"IOC" => ::std::option::Option::Some(BinanceTimeInForce::IOC),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [BinanceTimeInForce] = &[
BinanceTimeInForce::TIF_UNKNOWN,
BinanceTimeInForce::GTE,
BinanceTimeInForce::TIF_RESERVED,
BinanceTimeInForce::IOC,
];
}
impl ::protobuf::EnumFull for BinanceTimeInForce {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BinanceOrderMsg.BinanceTimeInForce").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for BinanceTimeInForce {
fn default() -> Self {
BinanceTimeInForce::TIF_UNKNOWN
}
}
impl BinanceTimeInForce {
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<BinanceTimeInForce>("BinanceOrderMsg.BinanceTimeInForce")
}
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceCancelMsg {
pub refid: ::std::option::Option<::std::string::String>,
pub sender: ::std::option::Option<::std::string::String>,
pub symbol: ::std::option::Option<::std::string::String>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceCancelMsg {
fn default() -> &'a BinanceCancelMsg {
<BinanceCancelMsg as ::protobuf::Message>::default_instance()
}
}
impl BinanceCancelMsg {
pub fn new() -> BinanceCancelMsg {
::std::default::Default::default()
}
pub fn refid(&self) -> &str {
match self.refid.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_refid(&mut self) {
self.refid = ::std::option::Option::None;
}
pub fn has_refid(&self) -> bool {
self.refid.is_some()
}
pub fn set_refid(&mut self, v: ::std::string::String) {
self.refid = ::std::option::Option::Some(v);
}
pub fn mut_refid(&mut self) -> &mut ::std::string::String {
if self.refid.is_none() {
self.refid = ::std::option::Option::Some(::std::string::String::new());
}
self.refid.as_mut().unwrap()
}
pub fn take_refid(&mut self) -> ::std::string::String {
self.refid.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn sender(&self) -> &str {
match self.sender.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_sender(&mut self) {
self.sender = ::std::option::Option::None;
}
pub fn has_sender(&self) -> bool {
self.sender.is_some()
}
pub fn set_sender(&mut self, v: ::std::string::String) {
self.sender = ::std::option::Option::Some(v);
}
pub fn mut_sender(&mut self) -> &mut ::std::string::String {
if self.sender.is_none() {
self.sender = ::std::option::Option::Some(::std::string::String::new());
}
self.sender.as_mut().unwrap()
}
pub fn take_sender(&mut self) -> ::std::string::String {
self.sender.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn symbol(&self) -> &str {
match self.symbol.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_symbol(&mut self) {
self.symbol = ::std::option::Option::None;
}
pub fn has_symbol(&self) -> bool {
self.symbol.is_some()
}
pub fn set_symbol(&mut self, v: ::std::string::String) {
self.symbol = ::std::option::Option::Some(v);
}
pub fn mut_symbol(&mut self) -> &mut ::std::string::String {
if self.symbol.is_none() {
self.symbol = ::std::option::Option::Some(::std::string::String::new());
}
self.symbol.as_mut().unwrap()
}
pub fn take_symbol(&mut self) -> ::std::string::String {
self.symbol.take().unwrap_or_else(|| ::std::string::String::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"refid",
|m: &BinanceCancelMsg| { &m.refid },
|m: &mut BinanceCancelMsg| { &mut m.refid },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"sender",
|m: &BinanceCancelMsg| { &m.sender },
|m: &mut BinanceCancelMsg| { &mut m.sender },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"symbol",
|m: &BinanceCancelMsg| { &m.symbol },
|m: &mut BinanceCancelMsg| { &mut m.symbol },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceCancelMsg>(
"BinanceCancelMsg",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceCancelMsg {
const NAME: &'static str = "BinanceCancelMsg";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.refid = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.sender = ::std::option::Option::Some(is.read_string()?);
},
26 => {
self.symbol = ::std::option::Option::Some(is.read_string()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.refid.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.sender.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.symbol.as_ref() {
my_size += ::protobuf::rt::string_size(3, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.refid.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.sender.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.symbol.as_ref() {
os.write_string(3, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceCancelMsg {
BinanceCancelMsg::new()
}
fn clear(&mut self) {
self.refid = ::std::option::Option::None;
self.sender = ::std::option::Option::None;
self.symbol = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceCancelMsg {
static instance: BinanceCancelMsg = BinanceCancelMsg {
refid: ::std::option::Option::None,
sender: ::std::option::Option::None,
symbol: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceCancelMsg {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceCancelMsg").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceCancelMsg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceCancelMsg {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BinanceSignedTx {
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BinanceSignedTx {
fn default() -> &'a BinanceSignedTx {
<BinanceSignedTx as ::protobuf::Message>::default_instance()
}
}
impl BinanceSignedTx {
pub fn new() -> BinanceSignedTx {
::std::default::Default::default()
}
pub fn signature(&self) -> &[u8] {
match self.signature.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature(&mut self) {
self.signature = ::std::option::Option::None;
}
pub fn has_signature(&self) -> bool {
self.signature.is_some()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature.is_none() {
self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature.as_mut().unwrap()
}
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn public_key(&self) -> &[u8] {
match self.public_key.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_public_key(&mut self) {
self.public_key = ::std::option::Option::None;
}
pub fn has_public_key(&self) -> bool {
self.public_key.is_some()
}
pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key = ::std::option::Option::Some(v);
}
pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.public_key.is_none() {
self.public_key = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.public_key.as_mut().unwrap()
}
pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature",
|m: &BinanceSignedTx| { &m.signature },
|m: &mut BinanceSignedTx| { &mut m.signature },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"public_key",
|m: &BinanceSignedTx| { &m.public_key },
|m: &mut BinanceSignedTx| { &mut m.public_key },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BinanceSignedTx>(
"BinanceSignedTx",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BinanceSignedTx {
const NAME: &'static str = "BinanceSignedTx";
fn is_initialized(&self) -> bool {
if self.signature.is_none() {
return false;
}
if self.public_key.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.signature = ::std::option::Option::Some(is.read_bytes()?);
},
18 => {
self.public_key = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.signature.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
if let Some(v) = self.public_key.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.signature.as_ref() {
os.write_bytes(1, v)?;
}
if let Some(v) = self.public_key.as_ref() {
os.write_bytes(2, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> BinanceSignedTx {
BinanceSignedTx::new()
}
fn clear(&mut self) {
self.signature = ::std::option::Option::None;
self.public_key = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BinanceSignedTx {
static instance: BinanceSignedTx = BinanceSignedTx {
signature: ::std::option::Option::None,
public_key: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BinanceSignedTx {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("BinanceSignedTx").unwrap()).clone()
}
}
impl ::std::fmt::Display for BinanceSignedTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BinanceSignedTx {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x16messages-binance.proto\x12\x1ahw.trezor.messages.binance\"o\n\x11B\
inanceGetAddress\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\
\x12!\n\x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\x12\x1a\n\
\x08chunkify\x18\x03\x20\x01(\x08R\x08chunkify\"*\n\x0eBinanceAddress\
\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\"U\n\x13BinanceGetP\
ublicKey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0c\
show_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\"1\n\x10BinancePublicK\
ey\x12\x1d\n\npublic_key\x18\x01\x20\x02(\x0cR\tpublicKey\"\xef\x01\n\rB\
inanceSignTx\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\
\x1b\n\tmsg_count\x18\x02\x20\x02(\rR\x08msgCount\x12%\n\x0eaccount_numb\
er\x18\x03\x20\x02(\x12R\raccountNumber\x12\x19\n\x08chain_id\x18\x04\
\x20\x01(\tR\x07chainId\x12\x12\n\x04memo\x18\x05\x20\x01(\tR\x04memo\
\x12\x1a\n\x08sequence\x18\x06\x20\x02(\x12R\x08sequence\x12\x16\n\x06so\
urce\x18\x07\x20\x02(\x12R\x06source\x12\x1a\n\x08chunkify\x18\x08\x20\
\x01(\x08R\x08chunkify\"\x12\n\x10BinanceTxRequest\"\xa8\x03\n\x12Binanc\
eTransferMsg\x12Y\n\x06inputs\x18\x01\x20\x03(\x0b2A.hw.trezor.messages.\
binance.BinanceTransferMsg.BinanceInputOutputR\x06inputs\x12[\n\x07outpu\
ts\x18\x02\x20\x03(\x0b2A.hw.trezor.messages.binance.BinanceTransferMsg.\
BinanceInputOutputR\x07outputs\x12\x1a\n\x08chunkify\x18\x03\x20\x01(\
\x08R\x08chunkify\x1a\x80\x01\n\x12BinanceInputOutput\x12\x18\n\x07addre\
ss\x18\x01\x20\x02(\tR\x07address\x12P\n\x05coins\x18\x02\x20\x03(\x0b2:\
.hw.trezor.messages.binance.BinanceTransferMsg.BinanceCoinR\x05coins\x1a\
;\n\x0bBinanceCoin\x12\x16\n\x06amount\x18\x01\x20\x02(\x12R\x06amount\
\x12\x14\n\x05denom\x18\x02\x20\x02(\tR\x05denom\"\xe3\x04\n\x0fBinanceO\
rderMsg\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12Z\n\tordertype\x18\
\x02\x20\x02(\x0e2<.hw.trezor.messages.binance.BinanceOrderMsg.BinanceOr\
derTypeR\tordertype\x12\x14\n\x05price\x18\x03\x20\x02(\x12R\x05price\
\x12\x1a\n\x08quantity\x18\x04\x20\x02(\x12R\x08quantity\x12\x16\n\x06se\
nder\x18\x05\x20\x01(\tR\x06sender\x12P\n\x04side\x18\x06\x20\x02(\x0e2<\
.hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSideR\x04side\
\x12\x16\n\x06symbol\x18\x07\x20\x01(\tR\x06symbol\x12`\n\x0btimeinforce\
\x18\x08\x20\x02(\x0e2>.hw.trezor.messages.binance.BinanceOrderMsg.Binan\
ceTimeInForceR\x0btimeinforce\"J\n\x10BinanceOrderType\x12\x0e\n\nOT_UNK\
NOWN\x10\0\x12\n\n\x06MARKET\x10\x01\x12\t\n\x05LIMIT\x10\x02\x12\x0f\n\
\x0bOT_RESERVED\x10\x03\"7\n\x10BinanceOrderSide\x12\x10\n\x0cSIDE_UNKNO\
WN\x10\0\x12\x07\n\x03BUY\x10\x01\x12\x08\n\x04SELL\x10\x02\"I\n\x12Bina\
nceTimeInForce\x12\x0f\n\x0bTIF_UNKNOWN\x10\0\x12\x07\n\x03GTE\x10\x01\
\x12\x10\n\x0cTIF_RESERVED\x10\x02\x12\x07\n\x03IOC\x10\x03\"X\n\x10Bina\
nceCancelMsg\x12\x14\n\x05refid\x18\x01\x20\x01(\tR\x05refid\x12\x16\n\
\x06sender\x18\x02\x20\x01(\tR\x06sender\x12\x16\n\x06symbol\x18\x03\x20\
\x01(\tR\x06symbol\"N\n\x0fBinanceSignedTx\x12\x1c\n\tsignature\x18\x01\
\x20\x02(\x0cR\tsignature\x12\x1d\n\npublic_key\x18\x02\x20\x02(\x0cR\tp\
ublicKeyB;\n#com.satoshilabs.trezor.lib.protobufB\x14TrezorMessageBinanc\
e\
";
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(0);
let mut messages = ::std::vec::Vec::with_capacity(12);
messages.push(BinanceGetAddress::generated_message_descriptor_data());
messages.push(BinanceAddress::generated_message_descriptor_data());
messages.push(BinanceGetPublicKey::generated_message_descriptor_data());
messages.push(BinancePublicKey::generated_message_descriptor_data());
messages.push(BinanceSignTx::generated_message_descriptor_data());
messages.push(BinanceTxRequest::generated_message_descriptor_data());
messages.push(BinanceTransferMsg::generated_message_descriptor_data());
messages.push(BinanceOrderMsg::generated_message_descriptor_data());
messages.push(BinanceCancelMsg::generated_message_descriptor_data());
messages.push(BinanceSignedTx::generated_message_descriptor_data());
messages.push(binance_transfer_msg::BinanceInputOutput::generated_message_descriptor_data());
messages.push(binance_transfer_msg::BinanceCoin::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(3);
enums.push(binance_order_msg::BinanceOrderType::generated_enum_descriptor_data());
enums.push(binance_order_msg::BinanceOrderSide::generated_enum_descriptor_data());
enums.push(binance_order_msg::BinanceTimeInForce::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}