// This file is generated by rust-protobuf 3.3.0. Do not edit // .proto file is parsed by protoc 3.20.1 // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![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)] //! Generated file from `messages-debug.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0; // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkDecision) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkDecision { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.button) pub button: ::std::option::Option<::protobuf::EnumOrUnknown>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.swipe) pub swipe: ::std::option::Option<::protobuf::EnumOrUnknown>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.input) pub input: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.x) pub x: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.y) pub y: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.wait) pub wait: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.hold_ms) pub hold_ms: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkDecision.physical_button) pub physical_button: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkDecision.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkDecision { fn default() -> &'a DebugLinkDecision { ::default_instance() } } impl DebugLinkDecision { pub fn new() -> DebugLinkDecision { ::std::default::Default::default() } // optional .hw.trezor.messages.debug.DebugLinkDecision.DebugButton button = 1; pub fn button(&self) -> debug_link_decision::DebugButton { match self.button { Some(e) => e.enum_value_or(debug_link_decision::DebugButton::NO), None => debug_link_decision::DebugButton::NO, } } pub fn clear_button(&mut self) { self.button = ::std::option::Option::None; } pub fn has_button(&self) -> bool { self.button.is_some() } // Param is passed by value, moved pub fn set_button(&mut self, v: debug_link_decision::DebugButton) { self.button = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } // optional .hw.trezor.messages.debug.DebugLinkDecision.DebugSwipeDirection swipe = 2; pub fn swipe(&self) -> debug_link_decision::DebugSwipeDirection { match self.swipe { Some(e) => e.enum_value_or(debug_link_decision::DebugSwipeDirection::UP), None => debug_link_decision::DebugSwipeDirection::UP, } } pub fn clear_swipe(&mut self) { self.swipe = ::std::option::Option::None; } pub fn has_swipe(&self) -> bool { self.swipe.is_some() } // Param is passed by value, moved pub fn set_swipe(&mut self, v: debug_link_decision::DebugSwipeDirection) { self.swipe = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } // optional string input = 3; pub fn input(&self) -> &str { match self.input.as_ref() { Some(v) => v, None => "", } } pub fn clear_input(&mut self) { self.input = ::std::option::Option::None; } pub fn has_input(&self) -> bool { self.input.is_some() } // Param is passed by value, moved pub fn set_input(&mut self, v: ::std::string::String) { self.input = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_input(&mut self) -> &mut ::std::string::String { if self.input.is_none() { self.input = ::std::option::Option::Some(::std::string::String::new()); } self.input.as_mut().unwrap() } // Take field pub fn take_input(&mut self) -> ::std::string::String { self.input.take().unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 x = 4; pub fn x(&self) -> u32 { self.x.unwrap_or(0) } pub fn clear_x(&mut self) { self.x = ::std::option::Option::None; } pub fn has_x(&self) -> bool { self.x.is_some() } // Param is passed by value, moved pub fn set_x(&mut self, v: u32) { self.x = ::std::option::Option::Some(v); } // optional uint32 y = 5; pub fn y(&self) -> u32 { self.y.unwrap_or(0) } pub fn clear_y(&mut self) { self.y = ::std::option::Option::None; } pub fn has_y(&self) -> bool { self.y.is_some() } // Param is passed by value, moved pub fn set_y(&mut self, v: u32) { self.y = ::std::option::Option::Some(v); } // optional bool wait = 6; pub fn wait(&self) -> bool { self.wait.unwrap_or(false) } pub fn clear_wait(&mut self) { self.wait = ::std::option::Option::None; } pub fn has_wait(&self) -> bool { self.wait.is_some() } // Param is passed by value, moved pub fn set_wait(&mut self, v: bool) { self.wait = ::std::option::Option::Some(v); } // optional uint32 hold_ms = 7; pub fn hold_ms(&self) -> u32 { self.hold_ms.unwrap_or(0) } pub fn clear_hold_ms(&mut self) { self.hold_ms = ::std::option::Option::None; } pub fn has_hold_ms(&self) -> bool { self.hold_ms.is_some() } // Param is passed by value, moved pub fn set_hold_ms(&mut self, v: u32) { self.hold_ms = ::std::option::Option::Some(v); } // optional .hw.trezor.messages.debug.DebugLinkDecision.DebugPhysicalButton physical_button = 8; pub fn physical_button(&self) -> debug_link_decision::DebugPhysicalButton { match self.physical_button { Some(e) => e.enum_value_or(debug_link_decision::DebugPhysicalButton::LEFT_BTN), None => debug_link_decision::DebugPhysicalButton::LEFT_BTN, } } pub fn clear_physical_button(&mut self) { self.physical_button = ::std::option::Option::None; } pub fn has_physical_button(&self) -> bool { self.physical_button.is_some() } // Param is passed by value, moved pub fn set_physical_button(&mut self, v: debug_link_decision::DebugPhysicalButton) { self.physical_button = ::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::<_, _>( "button", |m: &DebugLinkDecision| { &m.button }, |m: &mut DebugLinkDecision| { &mut m.button }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "swipe", |m: &DebugLinkDecision| { &m.swipe }, |m: &mut DebugLinkDecision| { &mut m.swipe }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "input", |m: &DebugLinkDecision| { &m.input }, |m: &mut DebugLinkDecision| { &mut m.input }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "x", |m: &DebugLinkDecision| { &m.x }, |m: &mut DebugLinkDecision| { &mut m.x }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "y", |m: &DebugLinkDecision| { &m.y }, |m: &mut DebugLinkDecision| { &mut m.y }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "wait", |m: &DebugLinkDecision| { &m.wait }, |m: &mut DebugLinkDecision| { &mut m.wait }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "hold_ms", |m: &DebugLinkDecision| { &m.hold_ms }, |m: &mut DebugLinkDecision| { &mut m.hold_ms }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "physical_button", |m: &DebugLinkDecision| { &m.physical_button }, |m: &mut DebugLinkDecision| { &mut m.physical_button }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkDecision", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkDecision { const NAME: &'static str = "DebugLinkDecision"; 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 { 8 => { self.button = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, 16 => { self.swipe = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, 26 => { self.input = ::std::option::Option::Some(is.read_string()?); }, 32 => { self.x = ::std::option::Option::Some(is.read_uint32()?); }, 40 => { self.y = ::std::option::Option::Some(is.read_uint32()?); }, 48 => { self.wait = ::std::option::Option::Some(is.read_bool()?); }, 56 => { self.hold_ms = ::std::option::Option::Some(is.read_uint32()?); }, 64 => { self.physical_button = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.button { my_size += ::protobuf::rt::int32_size(1, v.value()); } if let Some(v) = self.swipe { my_size += ::protobuf::rt::int32_size(2, v.value()); } if let Some(v) = self.input.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.x { my_size += ::protobuf::rt::uint32_size(4, v); } if let Some(v) = self.y { my_size += ::protobuf::rt::uint32_size(5, v); } if let Some(v) = self.wait { my_size += 1 + 1; } if let Some(v) = self.hold_ms { my_size += ::protobuf::rt::uint32_size(7, v); } if let Some(v) = self.physical_button { 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.button { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } if let Some(v) = self.swipe { os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; } if let Some(v) = self.input.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.x { os.write_uint32(4, v)?; } if let Some(v) = self.y { os.write_uint32(5, v)?; } if let Some(v) = self.wait { os.write_bool(6, v)?; } if let Some(v) = self.hold_ms { os.write_uint32(7, v)?; } if let Some(v) = self.physical_button { 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() -> DebugLinkDecision { DebugLinkDecision::new() } fn clear(&mut self) { self.button = ::std::option::Option::None; self.swipe = ::std::option::Option::None; self.input = ::std::option::Option::None; self.x = ::std::option::Option::None; self.y = ::std::option::Option::None; self.wait = ::std::option::Option::None; self.hold_ms = ::std::option::Option::None; self.physical_button = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkDecision { static instance: DebugLinkDecision = DebugLinkDecision { button: ::std::option::Option::None, swipe: ::std::option::Option::None, input: ::std::option::Option::None, x: ::std::option::Option::None, y: ::std::option::Option::None, wait: ::std::option::Option::None, hold_ms: ::std::option::Option::None, physical_button: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkDecision { 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("DebugLinkDecision").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkDecision { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkDecision { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `DebugLinkDecision` pub mod debug_link_decision { #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:hw.trezor.messages.debug.DebugLinkDecision.DebugSwipeDirection) pub enum DebugSwipeDirection { // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugSwipeDirection.UP) UP = 0, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugSwipeDirection.DOWN) DOWN = 1, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugSwipeDirection.LEFT) LEFT = 2, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugSwipeDirection.RIGHT) RIGHT = 3, } impl ::protobuf::Enum for DebugSwipeDirection { const NAME: &'static str = "DebugSwipeDirection"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(DebugSwipeDirection::UP), 1 => ::std::option::Option::Some(DebugSwipeDirection::DOWN), 2 => ::std::option::Option::Some(DebugSwipeDirection::LEFT), 3 => ::std::option::Option::Some(DebugSwipeDirection::RIGHT), _ => ::std::option::Option::None } } fn from_str(str: &str) -> ::std::option::Option { match str { "UP" => ::std::option::Option::Some(DebugSwipeDirection::UP), "DOWN" => ::std::option::Option::Some(DebugSwipeDirection::DOWN), "LEFT" => ::std::option::Option::Some(DebugSwipeDirection::LEFT), "RIGHT" => ::std::option::Option::Some(DebugSwipeDirection::RIGHT), _ => ::std::option::Option::None } } const VALUES: &'static [DebugSwipeDirection] = &[ DebugSwipeDirection::UP, DebugSwipeDirection::DOWN, DebugSwipeDirection::LEFT, DebugSwipeDirection::RIGHT, ]; } impl ::protobuf::EnumFull for DebugSwipeDirection { 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("DebugLinkDecision.DebugSwipeDirection").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 DebugSwipeDirection { fn default() -> Self { DebugSwipeDirection::UP } } impl DebugSwipeDirection { pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("DebugLinkDecision.DebugSwipeDirection") } } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:hw.trezor.messages.debug.DebugLinkDecision.DebugButton) pub enum DebugButton { // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugButton.NO) NO = 0, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugButton.YES) YES = 1, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugButton.INFO) INFO = 2, } impl ::protobuf::Enum for DebugButton { const NAME: &'static str = "DebugButton"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(DebugButton::NO), 1 => ::std::option::Option::Some(DebugButton::YES), 2 => ::std::option::Option::Some(DebugButton::INFO), _ => ::std::option::Option::None } } fn from_str(str: &str) -> ::std::option::Option { match str { "NO" => ::std::option::Option::Some(DebugButton::NO), "YES" => ::std::option::Option::Some(DebugButton::YES), "INFO" => ::std::option::Option::Some(DebugButton::INFO), _ => ::std::option::Option::None } } const VALUES: &'static [DebugButton] = &[ DebugButton::NO, DebugButton::YES, DebugButton::INFO, ]; } impl ::protobuf::EnumFull for DebugButton { 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("DebugLinkDecision.DebugButton").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 DebugButton { fn default() -> Self { DebugButton::NO } } impl DebugButton { pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("DebugLinkDecision.DebugButton") } } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:hw.trezor.messages.debug.DebugLinkDecision.DebugPhysicalButton) pub enum DebugPhysicalButton { // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugPhysicalButton.LEFT_BTN) LEFT_BTN = 0, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugPhysicalButton.MIDDLE_BTN) MIDDLE_BTN = 1, // @@protoc_insertion_point(enum_value:hw.trezor.messages.debug.DebugLinkDecision.DebugPhysicalButton.RIGHT_BTN) RIGHT_BTN = 2, } impl ::protobuf::Enum for DebugPhysicalButton { const NAME: &'static str = "DebugPhysicalButton"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(DebugPhysicalButton::LEFT_BTN), 1 => ::std::option::Option::Some(DebugPhysicalButton::MIDDLE_BTN), 2 => ::std::option::Option::Some(DebugPhysicalButton::RIGHT_BTN), _ => ::std::option::Option::None } } fn from_str(str: &str) -> ::std::option::Option { match str { "LEFT_BTN" => ::std::option::Option::Some(DebugPhysicalButton::LEFT_BTN), "MIDDLE_BTN" => ::std::option::Option::Some(DebugPhysicalButton::MIDDLE_BTN), "RIGHT_BTN" => ::std::option::Option::Some(DebugPhysicalButton::RIGHT_BTN), _ => ::std::option::Option::None } } const VALUES: &'static [DebugPhysicalButton] = &[ DebugPhysicalButton::LEFT_BTN, DebugPhysicalButton::MIDDLE_BTN, DebugPhysicalButton::RIGHT_BTN, ]; } impl ::protobuf::EnumFull for DebugPhysicalButton { 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("DebugLinkDecision.DebugPhysicalButton").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 DebugPhysicalButton { fn default() -> Self { DebugPhysicalButton::LEFT_BTN } } impl DebugPhysicalButton { pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("DebugLinkDecision.DebugPhysicalButton") } } } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkLayout) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkLayout { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkLayout.tokens) pub tokens: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkLayout.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkLayout { fn default() -> &'a DebugLinkLayout { ::default_instance() } } impl DebugLinkLayout { pub fn new() -> DebugLinkLayout { ::std::default::Default::default() } 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_vec_simpler_accessor::<_, _>( "tokens", |m: &DebugLinkLayout| { &m.tokens }, |m: &mut DebugLinkLayout| { &mut m.tokens }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkLayout", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkLayout { const NAME: &'static str = "DebugLinkLayout"; 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.tokens.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.tokens { my_size += ::protobuf::rt::string_size(1, &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<()> { for v in &self.tokens { 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() -> DebugLinkLayout { DebugLinkLayout::new() } fn clear(&mut self) { self.tokens.clear(); self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkLayout { static instance: DebugLinkLayout = DebugLinkLayout { tokens: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkLayout { 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("DebugLinkLayout").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkLayout { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkLayout { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkReseedRandom) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkReseedRandom { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkReseedRandom.value) pub value: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkReseedRandom.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkReseedRandom { fn default() -> &'a DebugLinkReseedRandom { ::default_instance() } } impl DebugLinkReseedRandom { pub fn new() -> DebugLinkReseedRandom { ::std::default::Default::default() } // optional uint32 value = 1; pub fn value(&self) -> u32 { self.value.unwrap_or(0) } pub fn clear_value(&mut self) { self.value = ::std::option::Option::None; } pub fn has_value(&self) -> bool { self.value.is_some() } // Param is passed by value, moved pub fn set_value(&mut self, v: u32) { self.value = ::std::option::Option::Some(v); } 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::<_, _>( "value", |m: &DebugLinkReseedRandom| { &m.value }, |m: &mut DebugLinkReseedRandom| { &mut m.value }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkReseedRandom", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkReseedRandom { const NAME: &'static str = "DebugLinkReseedRandom"; 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 { 8 => { self.value = ::std::option::Option::Some(is.read_uint32()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.value { my_size += ::protobuf::rt::uint32_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.value { os.write_uint32(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() -> DebugLinkReseedRandom { DebugLinkReseedRandom::new() } fn clear(&mut self) { self.value = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkReseedRandom { static instance: DebugLinkReseedRandom = DebugLinkReseedRandom { value: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkReseedRandom { 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("DebugLinkReseedRandom").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkReseedRandom { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkReseedRandom { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkRecordScreen) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkRecordScreen { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkRecordScreen.target_directory) pub target_directory: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkRecordScreen.refresh_index) pub refresh_index: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkRecordScreen.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkRecordScreen { fn default() -> &'a DebugLinkRecordScreen { ::default_instance() } } impl DebugLinkRecordScreen { pub fn new() -> DebugLinkRecordScreen { ::std::default::Default::default() } // optional string target_directory = 1; pub fn target_directory(&self) -> &str { match self.target_directory.as_ref() { Some(v) => v, None => "", } } pub fn clear_target_directory(&mut self) { self.target_directory = ::std::option::Option::None; } pub fn has_target_directory(&self) -> bool { self.target_directory.is_some() } // Param is passed by value, moved pub fn set_target_directory(&mut self, v: ::std::string::String) { self.target_directory = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_target_directory(&mut self) -> &mut ::std::string::String { if self.target_directory.is_none() { self.target_directory = ::std::option::Option::Some(::std::string::String::new()); } self.target_directory.as_mut().unwrap() } // Take field pub fn take_target_directory(&mut self) -> ::std::string::String { self.target_directory.take().unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 refresh_index = 2; pub fn refresh_index(&self) -> u32 { self.refresh_index.unwrap_or(0u32) } pub fn clear_refresh_index(&mut self) { self.refresh_index = ::std::option::Option::None; } pub fn has_refresh_index(&self) -> bool { self.refresh_index.is_some() } // Param is passed by value, moved pub fn set_refresh_index(&mut self, v: u32) { self.refresh_index = ::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_option_accessor::<_, _>( "target_directory", |m: &DebugLinkRecordScreen| { &m.target_directory }, |m: &mut DebugLinkRecordScreen| { &mut m.target_directory }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "refresh_index", |m: &DebugLinkRecordScreen| { &m.refresh_index }, |m: &mut DebugLinkRecordScreen| { &mut m.refresh_index }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkRecordScreen", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkRecordScreen { const NAME: &'static str = "DebugLinkRecordScreen"; 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.target_directory = ::std::option::Option::Some(is.read_string()?); }, 16 => { self.refresh_index = ::std::option::Option::Some(is.read_uint32()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.target_directory.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.refresh_index { my_size += ::protobuf::rt::uint32_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.target_directory.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.refresh_index { os.write_uint32(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() -> DebugLinkRecordScreen { DebugLinkRecordScreen::new() } fn clear(&mut self) { self.target_directory = ::std::option::Option::None; self.refresh_index = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkRecordScreen { static instance: DebugLinkRecordScreen = DebugLinkRecordScreen { target_directory: ::std::option::Option::None, refresh_index: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkRecordScreen { 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("DebugLinkRecordScreen").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkRecordScreen { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkRecordScreen { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkGetState) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkGetState { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetState.wait_word_list) pub wait_word_list: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetState.wait_word_pos) pub wait_word_pos: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetState.wait_layout) pub wait_layout: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkGetState.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkGetState { fn default() -> &'a DebugLinkGetState { ::default_instance() } } impl DebugLinkGetState { pub fn new() -> DebugLinkGetState { ::std::default::Default::default() } // optional bool wait_word_list = 1; pub fn wait_word_list(&self) -> bool { self.wait_word_list.unwrap_or(false) } pub fn clear_wait_word_list(&mut self) { self.wait_word_list = ::std::option::Option::None; } pub fn has_wait_word_list(&self) -> bool { self.wait_word_list.is_some() } // Param is passed by value, moved pub fn set_wait_word_list(&mut self, v: bool) { self.wait_word_list = ::std::option::Option::Some(v); } // optional bool wait_word_pos = 2; pub fn wait_word_pos(&self) -> bool { self.wait_word_pos.unwrap_or(false) } pub fn clear_wait_word_pos(&mut self) { self.wait_word_pos = ::std::option::Option::None; } pub fn has_wait_word_pos(&self) -> bool { self.wait_word_pos.is_some() } // Param is passed by value, moved pub fn set_wait_word_pos(&mut self, v: bool) { self.wait_word_pos = ::std::option::Option::Some(v); } // optional bool wait_layout = 3; pub fn wait_layout(&self) -> bool { self.wait_layout.unwrap_or(false) } pub fn clear_wait_layout(&mut self) { self.wait_layout = ::std::option::Option::None; } pub fn has_wait_layout(&self) -> bool { self.wait_layout.is_some() } // Param is passed by value, moved pub fn set_wait_layout(&mut self, v: bool) { self.wait_layout = ::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_option_accessor::<_, _>( "wait_word_list", |m: &DebugLinkGetState| { &m.wait_word_list }, |m: &mut DebugLinkGetState| { &mut m.wait_word_list }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "wait_word_pos", |m: &DebugLinkGetState| { &m.wait_word_pos }, |m: &mut DebugLinkGetState| { &mut m.wait_word_pos }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "wait_layout", |m: &DebugLinkGetState| { &m.wait_layout }, |m: &mut DebugLinkGetState| { &mut m.wait_layout }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkGetState", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkGetState { const NAME: &'static str = "DebugLinkGetState"; 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 { 8 => { self.wait_word_list = ::std::option::Option::Some(is.read_bool()?); }, 16 => { self.wait_word_pos = ::std::option::Option::Some(is.read_bool()?); }, 24 => { self.wait_layout = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.wait_word_list { my_size += 1 + 1; } if let Some(v) = self.wait_word_pos { my_size += 1 + 1; } if let Some(v) = self.wait_layout { 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<()> { if let Some(v) = self.wait_word_list { os.write_bool(1, v)?; } if let Some(v) = self.wait_word_pos { os.write_bool(2, v)?; } if let Some(v) = self.wait_layout { 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() -> DebugLinkGetState { DebugLinkGetState::new() } fn clear(&mut self) { self.wait_word_list = ::std::option::Option::None; self.wait_word_pos = ::std::option::Option::None; self.wait_layout = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkGetState { static instance: DebugLinkGetState = DebugLinkGetState { wait_word_list: ::std::option::Option::None, wait_word_pos: ::std::option::Option::None, wait_layout: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkGetState { 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("DebugLinkGetState").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkGetState { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkGetState { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkState) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkState { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.layout) pub layout: ::std::option::Option<::std::vec::Vec>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.pin) pub pin: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.matrix) pub matrix: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.mnemonic_secret) pub mnemonic_secret: ::std::option::Option<::std::vec::Vec>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.node) pub node: ::protobuf::MessageField, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.passphrase_protection) pub passphrase_protection: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.reset_word) pub reset_word: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.reset_entropy) pub reset_entropy: ::std::option::Option<::std::vec::Vec>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.recovery_fake_word) pub recovery_fake_word: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.recovery_word_pos) pub recovery_word_pos: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.reset_word_pos) pub reset_word_pos: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.mnemonic_type) pub mnemonic_type: ::std::option::Option<::protobuf::EnumOrUnknown>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.tokens) pub tokens: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkState.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkState { fn default() -> &'a DebugLinkState { ::default_instance() } } impl DebugLinkState { pub fn new() -> DebugLinkState { ::std::default::Default::default() } // optional bytes layout = 1; pub fn layout(&self) -> &[u8] { match self.layout.as_ref() { Some(v) => v, None => &[], } } pub fn clear_layout(&mut self) { self.layout = ::std::option::Option::None; } pub fn has_layout(&self) -> bool { self.layout.is_some() } // Param is passed by value, moved pub fn set_layout(&mut self, v: ::std::vec::Vec) { self.layout = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_layout(&mut self) -> &mut ::std::vec::Vec { if self.layout.is_none() { self.layout = ::std::option::Option::Some(::std::vec::Vec::new()); } self.layout.as_mut().unwrap() } // Take field pub fn take_layout(&mut self) -> ::std::vec::Vec { self.layout.take().unwrap_or_else(|| ::std::vec::Vec::new()) } // optional string pin = 2; pub fn pin(&self) -> &str { match self.pin.as_ref() { Some(v) => v, None => "", } } pub fn clear_pin(&mut self) { self.pin = ::std::option::Option::None; } pub fn has_pin(&self) -> bool { self.pin.is_some() } // Param is passed by value, moved pub fn set_pin(&mut self, v: ::std::string::String) { self.pin = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_pin(&mut self) -> &mut ::std::string::String { if self.pin.is_none() { self.pin = ::std::option::Option::Some(::std::string::String::new()); } self.pin.as_mut().unwrap() } // Take field pub fn take_pin(&mut self) -> ::std::string::String { self.pin.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string matrix = 3; pub fn matrix(&self) -> &str { match self.matrix.as_ref() { Some(v) => v, None => "", } } pub fn clear_matrix(&mut self) { self.matrix = ::std::option::Option::None; } pub fn has_matrix(&self) -> bool { self.matrix.is_some() } // Param is passed by value, moved pub fn set_matrix(&mut self, v: ::std::string::String) { self.matrix = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_matrix(&mut self) -> &mut ::std::string::String { if self.matrix.is_none() { self.matrix = ::std::option::Option::Some(::std::string::String::new()); } self.matrix.as_mut().unwrap() } // Take field pub fn take_matrix(&mut self) -> ::std::string::String { self.matrix.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bytes mnemonic_secret = 4; pub fn mnemonic_secret(&self) -> &[u8] { match self.mnemonic_secret.as_ref() { Some(v) => v, None => &[], } } pub fn clear_mnemonic_secret(&mut self) { self.mnemonic_secret = ::std::option::Option::None; } pub fn has_mnemonic_secret(&self) -> bool { self.mnemonic_secret.is_some() } // Param is passed by value, moved pub fn set_mnemonic_secret(&mut self, v: ::std::vec::Vec) { self.mnemonic_secret = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_mnemonic_secret(&mut self) -> &mut ::std::vec::Vec { if self.mnemonic_secret.is_none() { self.mnemonic_secret = ::std::option::Option::Some(::std::vec::Vec::new()); } self.mnemonic_secret.as_mut().unwrap() } // Take field pub fn take_mnemonic_secret(&mut self) -> ::std::vec::Vec { self.mnemonic_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bool passphrase_protection = 6; pub fn passphrase_protection(&self) -> bool { self.passphrase_protection.unwrap_or(false) } pub fn clear_passphrase_protection(&mut self) { self.passphrase_protection = ::std::option::Option::None; } pub fn has_passphrase_protection(&self) -> bool { self.passphrase_protection.is_some() } // Param is passed by value, moved pub fn set_passphrase_protection(&mut self, v: bool) { self.passphrase_protection = ::std::option::Option::Some(v); } // optional string reset_word = 7; pub fn reset_word(&self) -> &str { match self.reset_word.as_ref() { Some(v) => v, None => "", } } pub fn clear_reset_word(&mut self) { self.reset_word = ::std::option::Option::None; } pub fn has_reset_word(&self) -> bool { self.reset_word.is_some() } // Param is passed by value, moved pub fn set_reset_word(&mut self, v: ::std::string::String) { self.reset_word = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_reset_word(&mut self) -> &mut ::std::string::String { if self.reset_word.is_none() { self.reset_word = ::std::option::Option::Some(::std::string::String::new()); } self.reset_word.as_mut().unwrap() } // Take field pub fn take_reset_word(&mut self) -> ::std::string::String { self.reset_word.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bytes reset_entropy = 8; pub fn reset_entropy(&self) -> &[u8] { match self.reset_entropy.as_ref() { Some(v) => v, None => &[], } } pub fn clear_reset_entropy(&mut self) { self.reset_entropy = ::std::option::Option::None; } pub fn has_reset_entropy(&self) -> bool { self.reset_entropy.is_some() } // Param is passed by value, moved pub fn set_reset_entropy(&mut self, v: ::std::vec::Vec) { self.reset_entropy = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_reset_entropy(&mut self) -> &mut ::std::vec::Vec { if self.reset_entropy.is_none() { self.reset_entropy = ::std::option::Option::Some(::std::vec::Vec::new()); } self.reset_entropy.as_mut().unwrap() } // Take field pub fn take_reset_entropy(&mut self) -> ::std::vec::Vec { self.reset_entropy.take().unwrap_or_else(|| ::std::vec::Vec::new()) } // optional string recovery_fake_word = 9; pub fn recovery_fake_word(&self) -> &str { match self.recovery_fake_word.as_ref() { Some(v) => v, None => "", } } pub fn clear_recovery_fake_word(&mut self) { self.recovery_fake_word = ::std::option::Option::None; } pub fn has_recovery_fake_word(&self) -> bool { self.recovery_fake_word.is_some() } // Param is passed by value, moved pub fn set_recovery_fake_word(&mut self, v: ::std::string::String) { self.recovery_fake_word = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_recovery_fake_word(&mut self) -> &mut ::std::string::String { if self.recovery_fake_word.is_none() { self.recovery_fake_word = ::std::option::Option::Some(::std::string::String::new()); } self.recovery_fake_word.as_mut().unwrap() } // Take field pub fn take_recovery_fake_word(&mut self) -> ::std::string::String { self.recovery_fake_word.take().unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 recovery_word_pos = 10; pub fn recovery_word_pos(&self) -> u32 { self.recovery_word_pos.unwrap_or(0) } pub fn clear_recovery_word_pos(&mut self) { self.recovery_word_pos = ::std::option::Option::None; } pub fn has_recovery_word_pos(&self) -> bool { self.recovery_word_pos.is_some() } // Param is passed by value, moved pub fn set_recovery_word_pos(&mut self, v: u32) { self.recovery_word_pos = ::std::option::Option::Some(v); } // optional uint32 reset_word_pos = 11; pub fn reset_word_pos(&self) -> u32 { self.reset_word_pos.unwrap_or(0) } pub fn clear_reset_word_pos(&mut self) { self.reset_word_pos = ::std::option::Option::None; } pub fn has_reset_word_pos(&self) -> bool { self.reset_word_pos.is_some() } // Param is passed by value, moved pub fn set_reset_word_pos(&mut self, v: u32) { self.reset_word_pos = ::std::option::Option::Some(v); } // optional .hw.trezor.messages.management.BackupType mnemonic_type = 12; pub fn mnemonic_type(&self) -> super::messages_management::BackupType { match self.mnemonic_type { Some(e) => e.enum_value_or(super::messages_management::BackupType::Bip39), None => super::messages_management::BackupType::Bip39, } } pub fn clear_mnemonic_type(&mut self) { self.mnemonic_type = ::std::option::Option::None; } pub fn has_mnemonic_type(&self) -> bool { self.mnemonic_type.is_some() } // Param is passed by value, moved pub fn set_mnemonic_type(&mut self, v: super::messages_management::BackupType) { self.mnemonic_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(13); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "layout", |m: &DebugLinkState| { &m.layout }, |m: &mut DebugLinkState| { &mut m.layout }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "pin", |m: &DebugLinkState| { &m.pin }, |m: &mut DebugLinkState| { &mut m.pin }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "matrix", |m: &DebugLinkState| { &m.matrix }, |m: &mut DebugLinkState| { &mut m.matrix }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "mnemonic_secret", |m: &DebugLinkState| { &m.mnemonic_secret }, |m: &mut DebugLinkState| { &mut m.mnemonic_secret }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::HDNodeType>( "node", |m: &DebugLinkState| { &m.node }, |m: &mut DebugLinkState| { &mut m.node }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "passphrase_protection", |m: &DebugLinkState| { &m.passphrase_protection }, |m: &mut DebugLinkState| { &mut m.passphrase_protection }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "reset_word", |m: &DebugLinkState| { &m.reset_word }, |m: &mut DebugLinkState| { &mut m.reset_word }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "reset_entropy", |m: &DebugLinkState| { &m.reset_entropy }, |m: &mut DebugLinkState| { &mut m.reset_entropy }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "recovery_fake_word", |m: &DebugLinkState| { &m.recovery_fake_word }, |m: &mut DebugLinkState| { &mut m.recovery_fake_word }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "recovery_word_pos", |m: &DebugLinkState| { &m.recovery_word_pos }, |m: &mut DebugLinkState| { &mut m.recovery_word_pos }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "reset_word_pos", |m: &DebugLinkState| { &m.reset_word_pos }, |m: &mut DebugLinkState| { &mut m.reset_word_pos }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "mnemonic_type", |m: &DebugLinkState| { &m.mnemonic_type }, |m: &mut DebugLinkState| { &mut m.mnemonic_type }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "tokens", |m: &DebugLinkState| { &m.tokens }, |m: &mut DebugLinkState| { &mut m.tokens }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkState", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkState { const NAME: &'static str = "DebugLinkState"; fn is_initialized(&self) -> bool { for v in &self.node { 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.layout = ::std::option::Option::Some(is.read_bytes()?); }, 18 => { self.pin = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.matrix = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.mnemonic_secret = ::std::option::Option::Some(is.read_bytes()?); }, 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.node)?; }, 48 => { self.passphrase_protection = ::std::option::Option::Some(is.read_bool()?); }, 58 => { self.reset_word = ::std::option::Option::Some(is.read_string()?); }, 66 => { self.reset_entropy = ::std::option::Option::Some(is.read_bytes()?); }, 74 => { self.recovery_fake_word = ::std::option::Option::Some(is.read_string()?); }, 80 => { self.recovery_word_pos = ::std::option::Option::Some(is.read_uint32()?); }, 88 => { self.reset_word_pos = ::std::option::Option::Some(is.read_uint32()?); }, 96 => { self.mnemonic_type = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, 106 => { self.tokens.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.layout.as_ref() { my_size += ::protobuf::rt::bytes_size(1, &v); } if let Some(v) = self.pin.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.matrix.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.mnemonic_secret.as_ref() { my_size += ::protobuf::rt::bytes_size(4, &v); } if let Some(v) = self.node.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.passphrase_protection { my_size += 1 + 1; } if let Some(v) = self.reset_word.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } if let Some(v) = self.reset_entropy.as_ref() { my_size += ::protobuf::rt::bytes_size(8, &v); } if let Some(v) = self.recovery_fake_word.as_ref() { my_size += ::protobuf::rt::string_size(9, &v); } if let Some(v) = self.recovery_word_pos { my_size += ::protobuf::rt::uint32_size(10, v); } if let Some(v) = self.reset_word_pos { my_size += ::protobuf::rt::uint32_size(11, v); } if let Some(v) = self.mnemonic_type { my_size += ::protobuf::rt::int32_size(12, v.value()); } for value in &self.tokens { my_size += ::protobuf::rt::string_size(13, &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.layout.as_ref() { os.write_bytes(1, v)?; } if let Some(v) = self.pin.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.matrix.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.mnemonic_secret.as_ref() { os.write_bytes(4, v)?; } if let Some(v) = self.node.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } if let Some(v) = self.passphrase_protection { os.write_bool(6, v)?; } if let Some(v) = self.reset_word.as_ref() { os.write_string(7, v)?; } if let Some(v) = self.reset_entropy.as_ref() { os.write_bytes(8, v)?; } if let Some(v) = self.recovery_fake_word.as_ref() { os.write_string(9, v)?; } if let Some(v) = self.recovery_word_pos { os.write_uint32(10, v)?; } if let Some(v) = self.reset_word_pos { os.write_uint32(11, v)?; } if let Some(v) = self.mnemonic_type { os.write_enum(12, ::protobuf::EnumOrUnknown::value(&v))?; } for v in &self.tokens { os.write_string(13, &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() -> DebugLinkState { DebugLinkState::new() } fn clear(&mut self) { self.layout = ::std::option::Option::None; self.pin = ::std::option::Option::None; self.matrix = ::std::option::Option::None; self.mnemonic_secret = ::std::option::Option::None; self.node.clear(); self.passphrase_protection = ::std::option::Option::None; self.reset_word = ::std::option::Option::None; self.reset_entropy = ::std::option::Option::None; self.recovery_fake_word = ::std::option::Option::None; self.recovery_word_pos = ::std::option::Option::None; self.reset_word_pos = ::std::option::Option::None; self.mnemonic_type = ::std::option::Option::None; self.tokens.clear(); self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkState { static instance: DebugLinkState = DebugLinkState { layout: ::std::option::Option::None, pin: ::std::option::Option::None, matrix: ::std::option::Option::None, mnemonic_secret: ::std::option::Option::None, node: ::protobuf::MessageField::none(), passphrase_protection: ::std::option::Option::None, reset_word: ::std::option::Option::None, reset_entropy: ::std::option::Option::None, recovery_fake_word: ::std::option::Option::None, recovery_word_pos: ::std::option::Option::None, reset_word_pos: ::std::option::Option::None, mnemonic_type: ::std::option::Option::None, tokens: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkState { 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("DebugLinkState").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkState { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkState { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkStop) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkStop { // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkStop.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkStop { fn default() -> &'a DebugLinkStop { ::default_instance() } } impl DebugLinkStop { pub fn new() -> DebugLinkStop { ::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::( "DebugLinkStop", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkStop { const NAME: &'static str = "DebugLinkStop"; 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(()) } // Compute sizes of nested messages #[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() -> DebugLinkStop { DebugLinkStop::new() } fn clear(&mut self) { self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkStop { static instance: DebugLinkStop = DebugLinkStop { special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkStop { 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("DebugLinkStop").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkStop { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkStop { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkLog) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkLog { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkLog.level) pub level: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkLog.bucket) pub bucket: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkLog.text) pub text: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkLog.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkLog { fn default() -> &'a DebugLinkLog { ::default_instance() } } impl DebugLinkLog { pub fn new() -> DebugLinkLog { ::std::default::Default::default() } // optional uint32 level = 1; pub fn level(&self) -> u32 { self.level.unwrap_or(0) } pub fn clear_level(&mut self) { self.level = ::std::option::Option::None; } pub fn has_level(&self) -> bool { self.level.is_some() } // Param is passed by value, moved pub fn set_level(&mut self, v: u32) { self.level = ::std::option::Option::Some(v); } // optional string bucket = 2; pub fn bucket(&self) -> &str { match self.bucket.as_ref() { Some(v) => v, None => "", } } pub fn clear_bucket(&mut self) { self.bucket = ::std::option::Option::None; } pub fn has_bucket(&self) -> bool { self.bucket.is_some() } // Param is passed by value, moved pub fn set_bucket(&mut self, v: ::std::string::String) { self.bucket = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_bucket(&mut self) -> &mut ::std::string::String { if self.bucket.is_none() { self.bucket = ::std::option::Option::Some(::std::string::String::new()); } self.bucket.as_mut().unwrap() } // Take field pub fn take_bucket(&mut self) -> ::std::string::String { self.bucket.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string text = 3; pub fn text(&self) -> &str { match self.text.as_ref() { Some(v) => v, None => "", } } pub fn clear_text(&mut self) { self.text = ::std::option::Option::None; } pub fn has_text(&self) -> bool { self.text.is_some() } // Param is passed by value, moved pub fn set_text(&mut self, v: ::std::string::String) { self.text = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_text(&mut self) -> &mut ::std::string::String { if self.text.is_none() { self.text = ::std::option::Option::Some(::std::string::String::new()); } self.text.as_mut().unwrap() } // Take field pub fn take_text(&mut self) -> ::std::string::String { self.text.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::<_, _>( "level", |m: &DebugLinkLog| { &m.level }, |m: &mut DebugLinkLog| { &mut m.level }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "bucket", |m: &DebugLinkLog| { &m.bucket }, |m: &mut DebugLinkLog| { &mut m.bucket }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "text", |m: &DebugLinkLog| { &m.text }, |m: &mut DebugLinkLog| { &mut m.text }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkLog", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkLog { const NAME: &'static str = "DebugLinkLog"; 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 { 8 => { self.level = ::std::option::Option::Some(is.read_uint32()?); }, 18 => { self.bucket = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.text = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.level { my_size += ::protobuf::rt::uint32_size(1, v); } if let Some(v) = self.bucket.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.text.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.level { os.write_uint32(1, v)?; } if let Some(v) = self.bucket.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.text.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() -> DebugLinkLog { DebugLinkLog::new() } fn clear(&mut self) { self.level = ::std::option::Option::None; self.bucket = ::std::option::Option::None; self.text = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkLog { static instance: DebugLinkLog = DebugLinkLog { level: ::std::option::Option::None, bucket: ::std::option::Option::None, text: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkLog { 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("DebugLinkLog").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkLog { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkLog { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkMemoryRead) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkMemoryRead { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkMemoryRead.address) pub address: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkMemoryRead.length) pub length: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkMemoryRead.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkMemoryRead { fn default() -> &'a DebugLinkMemoryRead { ::default_instance() } } impl DebugLinkMemoryRead { pub fn new() -> DebugLinkMemoryRead { ::std::default::Default::default() } // optional uint32 address = 1; pub fn address(&self) -> u32 { self.address.unwrap_or(0) } pub fn clear_address(&mut self) { self.address = ::std::option::Option::None; } pub fn has_address(&self) -> bool { self.address.is_some() } // Param is passed by value, moved pub fn set_address(&mut self, v: u32) { self.address = ::std::option::Option::Some(v); } // optional uint32 length = 2; pub fn length(&self) -> u32 { self.length.unwrap_or(0) } pub fn clear_length(&mut self) { self.length = ::std::option::Option::None; } pub fn has_length(&self) -> bool { self.length.is_some() } // Param is passed by value, moved pub fn set_length(&mut self, v: u32) { self.length = ::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_option_accessor::<_, _>( "address", |m: &DebugLinkMemoryRead| { &m.address }, |m: &mut DebugLinkMemoryRead| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "length", |m: &DebugLinkMemoryRead| { &m.length }, |m: &mut DebugLinkMemoryRead| { &mut m.length }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkMemoryRead", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkMemoryRead { const NAME: &'static str = "DebugLinkMemoryRead"; 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 { 8 => { self.address = ::std::option::Option::Some(is.read_uint32()?); }, 16 => { self.length = ::std::option::Option::Some(is.read_uint32()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.address { my_size += ::protobuf::rt::uint32_size(1, v); } if let Some(v) = self.length { my_size += ::protobuf::rt::uint32_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.address { os.write_uint32(1, v)?; } if let Some(v) = self.length { os.write_uint32(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() -> DebugLinkMemoryRead { DebugLinkMemoryRead::new() } fn clear(&mut self) { self.address = ::std::option::Option::None; self.length = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkMemoryRead { static instance: DebugLinkMemoryRead = DebugLinkMemoryRead { address: ::std::option::Option::None, length: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkMemoryRead { 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("DebugLinkMemoryRead").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkMemoryRead { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkMemoryRead { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkMemory) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkMemory { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkMemory.memory) pub memory: ::std::option::Option<::std::vec::Vec>, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkMemory.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkMemory { fn default() -> &'a DebugLinkMemory { ::default_instance() } } impl DebugLinkMemory { pub fn new() -> DebugLinkMemory { ::std::default::Default::default() } // optional bytes memory = 1; pub fn memory(&self) -> &[u8] { match self.memory.as_ref() { Some(v) => v, None => &[], } } pub fn clear_memory(&mut self) { self.memory = ::std::option::Option::None; } pub fn has_memory(&self) -> bool { self.memory.is_some() } // Param is passed by value, moved pub fn set_memory(&mut self, v: ::std::vec::Vec) { self.memory = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_memory(&mut self) -> &mut ::std::vec::Vec { if self.memory.is_none() { self.memory = ::std::option::Option::Some(::std::vec::Vec::new()); } self.memory.as_mut().unwrap() } // Take field pub fn take_memory(&mut self) -> ::std::vec::Vec { self.memory.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::<_, _>( "memory", |m: &DebugLinkMemory| { &m.memory }, |m: &mut DebugLinkMemory| { &mut m.memory }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkMemory", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkMemory { const NAME: &'static str = "DebugLinkMemory"; 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.memory = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.memory.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.memory.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() -> DebugLinkMemory { DebugLinkMemory::new() } fn clear(&mut self) { self.memory = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkMemory { static instance: DebugLinkMemory = DebugLinkMemory { memory: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkMemory { 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("DebugLinkMemory").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkMemory { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkMemory { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkMemoryWrite) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkMemoryWrite { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkMemoryWrite.address) pub address: ::std::option::Option, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkMemoryWrite.memory) pub memory: ::std::option::Option<::std::vec::Vec>, // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkMemoryWrite.flash) pub flash: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkMemoryWrite.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkMemoryWrite { fn default() -> &'a DebugLinkMemoryWrite { ::default_instance() } } impl DebugLinkMemoryWrite { pub fn new() -> DebugLinkMemoryWrite { ::std::default::Default::default() } // optional uint32 address = 1; pub fn address(&self) -> u32 { self.address.unwrap_or(0) } pub fn clear_address(&mut self) { self.address = ::std::option::Option::None; } pub fn has_address(&self) -> bool { self.address.is_some() } // Param is passed by value, moved pub fn set_address(&mut self, v: u32) { self.address = ::std::option::Option::Some(v); } // optional bytes memory = 2; pub fn memory(&self) -> &[u8] { match self.memory.as_ref() { Some(v) => v, None => &[], } } pub fn clear_memory(&mut self) { self.memory = ::std::option::Option::None; } pub fn has_memory(&self) -> bool { self.memory.is_some() } // Param is passed by value, moved pub fn set_memory(&mut self, v: ::std::vec::Vec) { self.memory = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_memory(&mut self) -> &mut ::std::vec::Vec { if self.memory.is_none() { self.memory = ::std::option::Option::Some(::std::vec::Vec::new()); } self.memory.as_mut().unwrap() } // Take field pub fn take_memory(&mut self) -> ::std::vec::Vec { self.memory.take().unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bool flash = 3; pub fn flash(&self) -> bool { self.flash.unwrap_or(false) } pub fn clear_flash(&mut self) { self.flash = ::std::option::Option::None; } pub fn has_flash(&self) -> bool { self.flash.is_some() } // Param is passed by value, moved pub fn set_flash(&mut self, v: bool) { self.flash = ::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_option_accessor::<_, _>( "address", |m: &DebugLinkMemoryWrite| { &m.address }, |m: &mut DebugLinkMemoryWrite| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "memory", |m: &DebugLinkMemoryWrite| { &m.memory }, |m: &mut DebugLinkMemoryWrite| { &mut m.memory }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "flash", |m: &DebugLinkMemoryWrite| { &m.flash }, |m: &mut DebugLinkMemoryWrite| { &mut m.flash }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkMemoryWrite", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkMemoryWrite { const NAME: &'static str = "DebugLinkMemoryWrite"; 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 { 8 => { self.address = ::std::option::Option::Some(is.read_uint32()?); }, 18 => { self.memory = ::std::option::Option::Some(is.read_bytes()?); }, 24 => { self.flash = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.address { my_size += ::protobuf::rt::uint32_size(1, v); } if let Some(v) = self.memory.as_ref() { my_size += ::protobuf::rt::bytes_size(2, &v); } if let Some(v) = self.flash { 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<()> { if let Some(v) = self.address { os.write_uint32(1, v)?; } if let Some(v) = self.memory.as_ref() { os.write_bytes(2, v)?; } if let Some(v) = self.flash { 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() -> DebugLinkMemoryWrite { DebugLinkMemoryWrite::new() } fn clear(&mut self) { self.address = ::std::option::Option::None; self.memory = ::std::option::Option::None; self.flash = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkMemoryWrite { static instance: DebugLinkMemoryWrite = DebugLinkMemoryWrite { address: ::std::option::Option::None, memory: ::std::option::Option::None, flash: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkMemoryWrite { 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("DebugLinkMemoryWrite").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkMemoryWrite { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkMemoryWrite { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkFlashErase) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkFlashErase { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkFlashErase.sector) pub sector: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkFlashErase.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkFlashErase { fn default() -> &'a DebugLinkFlashErase { ::default_instance() } } impl DebugLinkFlashErase { pub fn new() -> DebugLinkFlashErase { ::std::default::Default::default() } // optional uint32 sector = 1; pub fn sector(&self) -> u32 { self.sector.unwrap_or(0) } pub fn clear_sector(&mut self) { self.sector = ::std::option::Option::None; } pub fn has_sector(&self) -> bool { self.sector.is_some() } // Param is passed by value, moved pub fn set_sector(&mut self, v: u32) { self.sector = ::std::option::Option::Some(v); } 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::<_, _>( "sector", |m: &DebugLinkFlashErase| { &m.sector }, |m: &mut DebugLinkFlashErase| { &mut m.sector }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkFlashErase", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkFlashErase { const NAME: &'static str = "DebugLinkFlashErase"; 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 { 8 => { self.sector = ::std::option::Option::Some(is.read_uint32()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.sector { my_size += ::protobuf::rt::uint32_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.sector { os.write_uint32(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() -> DebugLinkFlashErase { DebugLinkFlashErase::new() } fn clear(&mut self) { self.sector = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkFlashErase { static instance: DebugLinkFlashErase = DebugLinkFlashErase { sector: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkFlashErase { 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("DebugLinkFlashErase").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkFlashErase { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkFlashErase { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkEraseSdCard) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkEraseSdCard { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkEraseSdCard.format) pub format: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkEraseSdCard.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkEraseSdCard { fn default() -> &'a DebugLinkEraseSdCard { ::default_instance() } } impl DebugLinkEraseSdCard { pub fn new() -> DebugLinkEraseSdCard { ::std::default::Default::default() } // optional bool format = 1; pub fn format(&self) -> bool { self.format.unwrap_or(false) } pub fn clear_format(&mut self) { self.format = ::std::option::Option::None; } pub fn has_format(&self) -> bool { self.format.is_some() } // Param is passed by value, moved pub fn set_format(&mut self, v: bool) { self.format = ::std::option::Option::Some(v); } 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::<_, _>( "format", |m: &DebugLinkEraseSdCard| { &m.format }, |m: &mut DebugLinkEraseSdCard| { &mut m.format }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkEraseSdCard", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkEraseSdCard { const NAME: &'static str = "DebugLinkEraseSdCard"; 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 { 8 => { self.format = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.format { 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<()> { if let Some(v) = self.format { os.write_bool(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() -> DebugLinkEraseSdCard { DebugLinkEraseSdCard::new() } fn clear(&mut self) { self.format = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkEraseSdCard { static instance: DebugLinkEraseSdCard = DebugLinkEraseSdCard { format: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkEraseSdCard { 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("DebugLinkEraseSdCard").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkEraseSdCard { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkEraseSdCard { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkWatchLayout) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkWatchLayout { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkWatchLayout.watch) pub watch: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkWatchLayout.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkWatchLayout { fn default() -> &'a DebugLinkWatchLayout { ::default_instance() } } impl DebugLinkWatchLayout { pub fn new() -> DebugLinkWatchLayout { ::std::default::Default::default() } // optional bool watch = 1; pub fn watch(&self) -> bool { self.watch.unwrap_or(false) } pub fn clear_watch(&mut self) { self.watch = ::std::option::Option::None; } pub fn has_watch(&self) -> bool { self.watch.is_some() } // Param is passed by value, moved pub fn set_watch(&mut self, v: bool) { self.watch = ::std::option::Option::Some(v); } 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::<_, _>( "watch", |m: &DebugLinkWatchLayout| { &m.watch }, |m: &mut DebugLinkWatchLayout| { &mut m.watch }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DebugLinkWatchLayout", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkWatchLayout { const NAME: &'static str = "DebugLinkWatchLayout"; 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 { 8 => { self.watch = ::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(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.watch { 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<()> { if let Some(v) = self.watch { os.write_bool(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() -> DebugLinkWatchLayout { DebugLinkWatchLayout::new() } fn clear(&mut self) { self.watch = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkWatchLayout { static instance: DebugLinkWatchLayout = DebugLinkWatchLayout { watch: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkWatchLayout { 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("DebugLinkWatchLayout").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkWatchLayout { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkWatchLayout { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkResetDebugEvents) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkResetDebugEvents { // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkResetDebugEvents.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DebugLinkResetDebugEvents { fn default() -> &'a DebugLinkResetDebugEvents { ::default_instance() } } impl DebugLinkResetDebugEvents { pub fn new() -> DebugLinkResetDebugEvents { ::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::( "DebugLinkResetDebugEvents", fields, oneofs, ) } } impl ::protobuf::Message for DebugLinkResetDebugEvents { const NAME: &'static str = "DebugLinkResetDebugEvents"; 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(()) } // Compute sizes of nested messages #[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() -> DebugLinkResetDebugEvents { DebugLinkResetDebugEvents::new() } fn clear(&mut self) { self.special_fields.clear(); } fn default_instance() -> &'static DebugLinkResetDebugEvents { static instance: DebugLinkResetDebugEvents = DebugLinkResetDebugEvents { special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DebugLinkResetDebugEvents { 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("DebugLinkResetDebugEvents").unwrap()).clone() } } impl ::std::fmt::Display for DebugLinkResetDebugEvents { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DebugLinkResetDebugEvents { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x14messages-debug.proto\x12\x18hw.trezor.messages.debug\x1a\x0emessag\ es.proto\x1a\x15messages-common.proto\x1a\x19messages-management.proto\"\ \xb0\x04\n\x11DebugLinkDecision\x12O\n\x06button\x18\x01\x20\x01(\x0e27.\ hw.trezor.messages.debug.DebugLinkDecision.DebugButtonR\x06button\x12U\n\ \x05swipe\x18\x02\x20\x01(\x0e2?.hw.trezor.messages.debug.DebugLinkDecis\ ion.DebugSwipeDirectionR\x05swipe\x12\x14\n\x05input\x18\x03\x20\x01(\tR\ \x05input\x12\x0c\n\x01x\x18\x04\x20\x01(\rR\x01x\x12\x0c\n\x01y\x18\x05\ \x20\x01(\rR\x01y\x12\x12\n\x04wait\x18\x06\x20\x01(\x08R\x04wait\x12\ \x17\n\x07hold_ms\x18\x07\x20\x01(\rR\x06holdMs\x12h\n\x0fphysical_butto\ n\x18\x08\x20\x01(\x0e2?.hw.trezor.messages.debug.DebugLinkDecision.Debu\ gPhysicalButtonR\x0ephysicalButton\"<\n\x13DebugSwipeDirection\x12\x06\n\ \x02UP\x10\0\x12\x08\n\x04DOWN\x10\x01\x12\x08\n\x04LEFT\x10\x02\x12\t\n\ \x05RIGHT\x10\x03\"(\n\x0bDebugButton\x12\x06\n\x02NO\x10\0\x12\x07\n\ \x03YES\x10\x01\x12\x08\n\x04INFO\x10\x02\"B\n\x13DebugPhysicalButton\ \x12\x0c\n\x08LEFT_BTN\x10\0\x12\x0e\n\nMIDDLE_BTN\x10\x01\x12\r\n\tRIGH\ T_BTN\x10\x02\")\n\x0fDebugLinkLayout\x12\x16\n\x06tokens\x18\x01\x20\ \x03(\tR\x06tokens\"-\n\x15DebugLinkReseedRandom\x12\x14\n\x05value\x18\ \x01\x20\x01(\rR\x05value\"j\n\x15DebugLinkRecordScreen\x12)\n\x10target\ _directory\x18\x01\x20\x01(\tR\x0ftargetDirectory\x12&\n\rrefresh_index\ \x18\x02\x20\x01(\r:\x010R\x0crefreshIndex\"~\n\x11DebugLinkGetState\x12\ $\n\x0ewait_word_list\x18\x01\x20\x01(\x08R\x0cwaitWordList\x12\"\n\rwai\ t_word_pos\x18\x02\x20\x01(\x08R\x0bwaitWordPos\x12\x1f\n\x0bwait_layout\ \x18\x03\x20\x01(\x08R\nwaitLayout\"\x97\x04\n\x0eDebugLinkState\x12\x16\ \n\x06layout\x18\x01\x20\x01(\x0cR\x06layout\x12\x10\n\x03pin\x18\x02\ \x20\x01(\tR\x03pin\x12\x16\n\x06matrix\x18\x03\x20\x01(\tR\x06matrix\ \x12'\n\x0fmnemonic_secret\x18\x04\x20\x01(\x0cR\x0emnemonicSecret\x129\ \n\x04node\x18\x05\x20\x01(\x0b2%.hw.trezor.messages.common.HDNodeTypeR\ \x04node\x123\n\x15passphrase_protection\x18\x06\x20\x01(\x08R\x14passph\ raseProtection\x12\x1d\n\nreset_word\x18\x07\x20\x01(\tR\tresetWord\x12#\ \n\rreset_entropy\x18\x08\x20\x01(\x0cR\x0cresetEntropy\x12,\n\x12recove\ ry_fake_word\x18\t\x20\x01(\tR\x10recoveryFakeWord\x12*\n\x11recovery_wo\ rd_pos\x18\n\x20\x01(\rR\x0frecoveryWordPos\x12$\n\x0ereset_word_pos\x18\ \x0b\x20\x01(\rR\x0cresetWordPos\x12N\n\rmnemonic_type\x18\x0c\x20\x01(\ \x0e2).hw.trezor.messages.management.BackupTypeR\x0cmnemonicType\x12\x16\ \n\x06tokens\x18\r\x20\x03(\tR\x06tokens\"\x0f\n\rDebugLinkStop\"P\n\x0c\ DebugLinkLog\x12\x14\n\x05level\x18\x01\x20\x01(\rR\x05level\x12\x16\n\ \x06bucket\x18\x02\x20\x01(\tR\x06bucket\x12\x12\n\x04text\x18\x03\x20\ \x01(\tR\x04text\"G\n\x13DebugLinkMemoryRead\x12\x18\n\x07address\x18\ \x01\x20\x01(\rR\x07address\x12\x16\n\x06length\x18\x02\x20\x01(\rR\x06l\ ength\")\n\x0fDebugLinkMemory\x12\x16\n\x06memory\x18\x01\x20\x01(\x0cR\ \x06memory\"^\n\x14DebugLinkMemoryWrite\x12\x18\n\x07address\x18\x01\x20\ \x01(\rR\x07address\x12\x16\n\x06memory\x18\x02\x20\x01(\x0cR\x06memory\ \x12\x14\n\x05flash\x18\x03\x20\x01(\x08R\x05flash\"-\n\x13DebugLinkFlas\ hErase\x12\x16\n\x06sector\x18\x01\x20\x01(\rR\x06sector\".\n\x14DebugLi\ nkEraseSdCard\x12\x16\n\x06format\x18\x01\x20\x01(\x08R\x06format\",\n\ \x14DebugLinkWatchLayout\x12\x14\n\x05watch\x18\x01\x20\x01(\x08R\x05wat\ ch\"\x1b\n\x19DebugLinkResetDebugEventsB=\n#com.satoshilabs.trezor.lib.p\ rotobufB\x12TrezorMessageDebug\x80\xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file 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() }) } /// `FileDescriptor` object which allows dynamic access to files 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(3); deps.push(super::messages::file_descriptor().clone()); deps.push(super::messages_common::file_descriptor().clone()); deps.push(super::messages_management::file_descriptor().clone()); let mut messages = ::std::vec::Vec::with_capacity(15); messages.push(DebugLinkDecision::generated_message_descriptor_data()); messages.push(DebugLinkLayout::generated_message_descriptor_data()); messages.push(DebugLinkReseedRandom::generated_message_descriptor_data()); messages.push(DebugLinkRecordScreen::generated_message_descriptor_data()); messages.push(DebugLinkGetState::generated_message_descriptor_data()); messages.push(DebugLinkState::generated_message_descriptor_data()); messages.push(DebugLinkStop::generated_message_descriptor_data()); messages.push(DebugLinkLog::generated_message_descriptor_data()); messages.push(DebugLinkMemoryRead::generated_message_descriptor_data()); messages.push(DebugLinkMemory::generated_message_descriptor_data()); messages.push(DebugLinkMemoryWrite::generated_message_descriptor_data()); messages.push(DebugLinkFlashErase::generated_message_descriptor_data()); messages.push(DebugLinkEraseSdCard::generated_message_descriptor_data()); messages.push(DebugLinkWatchLayout::generated_message_descriptor_data()); messages.push(DebugLinkResetDebugEvents::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(3); enums.push(debug_link_decision::DebugSwipeDirection::generated_enum_descriptor_data()); enums.push(debug_link_decision::DebugButton::generated_enum_descriptor_data()); enums.push(debug_link_decision::DebugPhysicalButton::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) }