// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc 3.21.12 // @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 `rootcanal/configuration.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:rootcanal.configuration.ControllerFeatures) pub struct ControllerFeatures { // message fields // @@protoc_insertion_point(field:rootcanal.configuration.ControllerFeatures.le_extended_advertising) pub le_extended_advertising: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerFeatures.le_periodic_advertising) pub le_periodic_advertising: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerFeatures.ll_privacy) pub ll_privacy: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerFeatures.le_2m_phy) pub le_2m_phy: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerFeatures.le_coded_phy) pub le_coded_phy: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerFeatures.le_connected_isochronous_stream) pub le_connected_isochronous_stream: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:rootcanal.configuration.ControllerFeatures.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ControllerFeatures { fn default() -> &'a ControllerFeatures { ::default_instance() } } impl ControllerFeatures { pub fn new() -> ControllerFeatures { ::std::default::Default::default() } // optional bool le_extended_advertising = 1; pub fn le_extended_advertising(&self) -> bool { self.le_extended_advertising.unwrap_or(false) } pub fn clear_le_extended_advertising(&mut self) { self.le_extended_advertising = ::std::option::Option::None; } pub fn has_le_extended_advertising(&self) -> bool { self.le_extended_advertising.is_some() } // Param is passed by value, moved pub fn set_le_extended_advertising(&mut self, v: bool) { self.le_extended_advertising = ::std::option::Option::Some(v); } // optional bool le_periodic_advertising = 2; pub fn le_periodic_advertising(&self) -> bool { self.le_periodic_advertising.unwrap_or(false) } pub fn clear_le_periodic_advertising(&mut self) { self.le_periodic_advertising = ::std::option::Option::None; } pub fn has_le_periodic_advertising(&self) -> bool { self.le_periodic_advertising.is_some() } // Param is passed by value, moved pub fn set_le_periodic_advertising(&mut self, v: bool) { self.le_periodic_advertising = ::std::option::Option::Some(v); } // optional bool ll_privacy = 3; pub fn ll_privacy(&self) -> bool { self.ll_privacy.unwrap_or(false) } pub fn clear_ll_privacy(&mut self) { self.ll_privacy = ::std::option::Option::None; } pub fn has_ll_privacy(&self) -> bool { self.ll_privacy.is_some() } // Param is passed by value, moved pub fn set_ll_privacy(&mut self, v: bool) { self.ll_privacy = ::std::option::Option::Some(v); } // optional bool le_2m_phy = 4; pub fn le_2m_phy(&self) -> bool { self.le_2m_phy.unwrap_or(false) } pub fn clear_le_2m_phy(&mut self) { self.le_2m_phy = ::std::option::Option::None; } pub fn has_le_2m_phy(&self) -> bool { self.le_2m_phy.is_some() } // Param is passed by value, moved pub fn set_le_2m_phy(&mut self, v: bool) { self.le_2m_phy = ::std::option::Option::Some(v); } // optional bool le_coded_phy = 5; pub fn le_coded_phy(&self) -> bool { self.le_coded_phy.unwrap_or(false) } pub fn clear_le_coded_phy(&mut self) { self.le_coded_phy = ::std::option::Option::None; } pub fn has_le_coded_phy(&self) -> bool { self.le_coded_phy.is_some() } // Param is passed by value, moved pub fn set_le_coded_phy(&mut self, v: bool) { self.le_coded_phy = ::std::option::Option::Some(v); } // optional bool le_connected_isochronous_stream = 6; pub fn le_connected_isochronous_stream(&self) -> bool { self.le_connected_isochronous_stream.unwrap_or(false) } pub fn clear_le_connected_isochronous_stream(&mut self) { self.le_connected_isochronous_stream = ::std::option::Option::None; } pub fn has_le_connected_isochronous_stream(&self) -> bool { self.le_connected_isochronous_stream.is_some() } // Param is passed by value, moved pub fn set_le_connected_isochronous_stream(&mut self, v: bool) { self.le_connected_isochronous_stream = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "le_extended_advertising", |m: &ControllerFeatures| { &m.le_extended_advertising }, |m: &mut ControllerFeatures| { &mut m.le_extended_advertising }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "le_periodic_advertising", |m: &ControllerFeatures| { &m.le_periodic_advertising }, |m: &mut ControllerFeatures| { &mut m.le_periodic_advertising }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "ll_privacy", |m: &ControllerFeatures| { &m.ll_privacy }, |m: &mut ControllerFeatures| { &mut m.ll_privacy }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "le_2m_phy", |m: &ControllerFeatures| { &m.le_2m_phy }, |m: &mut ControllerFeatures| { &mut m.le_2m_phy }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "le_coded_phy", |m: &ControllerFeatures| { &m.le_coded_phy }, |m: &mut ControllerFeatures| { &mut m.le_coded_phy }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "le_connected_isochronous_stream", |m: &ControllerFeatures| { &m.le_connected_isochronous_stream }, |m: &mut ControllerFeatures| { &mut m.le_connected_isochronous_stream }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ControllerFeatures", fields, oneofs, ) } } impl ::protobuf::Message for ControllerFeatures { const NAME: &'static str = "ControllerFeatures"; 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.le_extended_advertising = ::std::option::Option::Some(is.read_bool()?); }, 16 => { self.le_periodic_advertising = ::std::option::Option::Some(is.read_bool()?); }, 24 => { self.ll_privacy = ::std::option::Option::Some(is.read_bool()?); }, 32 => { self.le_2m_phy = ::std::option::Option::Some(is.read_bool()?); }, 40 => { self.le_coded_phy = ::std::option::Option::Some(is.read_bool()?); }, 48 => { self.le_connected_isochronous_stream = ::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.le_extended_advertising { my_size += 1 + 1; } if let Some(v) = self.le_periodic_advertising { my_size += 1 + 1; } if let Some(v) = self.ll_privacy { my_size += 1 + 1; } if let Some(v) = self.le_2m_phy { my_size += 1 + 1; } if let Some(v) = self.le_coded_phy { my_size += 1 + 1; } if let Some(v) = self.le_connected_isochronous_stream { 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.le_extended_advertising { os.write_bool(1, v)?; } if let Some(v) = self.le_periodic_advertising { os.write_bool(2, v)?; } if let Some(v) = self.ll_privacy { os.write_bool(3, v)?; } if let Some(v) = self.le_2m_phy { os.write_bool(4, v)?; } if let Some(v) = self.le_coded_phy { os.write_bool(5, v)?; } if let Some(v) = self.le_connected_isochronous_stream { os.write_bool(6, 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() -> ControllerFeatures { ControllerFeatures::new() } fn clear(&mut self) { self.le_extended_advertising = ::std::option::Option::None; self.le_periodic_advertising = ::std::option::Option::None; self.ll_privacy = ::std::option::Option::None; self.le_2m_phy = ::std::option::Option::None; self.le_coded_phy = ::std::option::Option::None; self.le_connected_isochronous_stream = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ControllerFeatures { static instance: ControllerFeatures = ControllerFeatures { le_extended_advertising: ::std::option::Option::None, le_periodic_advertising: ::std::option::Option::None, ll_privacy: ::std::option::Option::None, le_2m_phy: ::std::option::Option::None, le_coded_phy: ::std::option::Option::None, le_connected_isochronous_stream: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ControllerFeatures { 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("ControllerFeatures").unwrap()).clone() } } impl ::std::fmt::Display for ControllerFeatures { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ControllerFeatures { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:rootcanal.configuration.ControllerQuirks) pub struct ControllerQuirks { // message fields // @@protoc_insertion_point(field:rootcanal.configuration.ControllerQuirks.send_acl_data_before_connection_complete) pub send_acl_data_before_connection_complete: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerQuirks.has_default_random_address) pub has_default_random_address: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.ControllerQuirks.hardware_error_before_reset) pub hardware_error_before_reset: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:rootcanal.configuration.ControllerQuirks.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ControllerQuirks { fn default() -> &'a ControllerQuirks { ::default_instance() } } impl ControllerQuirks { pub fn new() -> ControllerQuirks { ::std::default::Default::default() } // optional bool send_acl_data_before_connection_complete = 1; pub fn send_acl_data_before_connection_complete(&self) -> bool { self.send_acl_data_before_connection_complete.unwrap_or(false) } pub fn clear_send_acl_data_before_connection_complete(&mut self) { self.send_acl_data_before_connection_complete = ::std::option::Option::None; } pub fn has_send_acl_data_before_connection_complete(&self) -> bool { self.send_acl_data_before_connection_complete.is_some() } // Param is passed by value, moved pub fn set_send_acl_data_before_connection_complete(&mut self, v: bool) { self.send_acl_data_before_connection_complete = ::std::option::Option::Some(v); } // optional bool has_default_random_address = 2; pub fn has_default_random_address(&self) -> bool { self.has_default_random_address.unwrap_or(false) } pub fn clear_has_default_random_address(&mut self) { self.has_default_random_address = ::std::option::Option::None; } pub fn has_has_default_random_address(&self) -> bool { self.has_default_random_address.is_some() } // Param is passed by value, moved pub fn set_has_default_random_address(&mut self, v: bool) { self.has_default_random_address = ::std::option::Option::Some(v); } // optional bool hardware_error_before_reset = 3; pub fn hardware_error_before_reset(&self) -> bool { self.hardware_error_before_reset.unwrap_or(false) } pub fn clear_hardware_error_before_reset(&mut self) { self.hardware_error_before_reset = ::std::option::Option::None; } pub fn has_hardware_error_before_reset(&self) -> bool { self.hardware_error_before_reset.is_some() } // Param is passed by value, moved pub fn set_hardware_error_before_reset(&mut self, v: bool) { self.hardware_error_before_reset = ::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::<_, _>( "send_acl_data_before_connection_complete", |m: &ControllerQuirks| { &m.send_acl_data_before_connection_complete }, |m: &mut ControllerQuirks| { &mut m.send_acl_data_before_connection_complete }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "has_default_random_address", |m: &ControllerQuirks| { &m.has_default_random_address }, |m: &mut ControllerQuirks| { &mut m.has_default_random_address }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "hardware_error_before_reset", |m: &ControllerQuirks| { &m.hardware_error_before_reset }, |m: &mut ControllerQuirks| { &mut m.hardware_error_before_reset }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ControllerQuirks", fields, oneofs, ) } } impl ::protobuf::Message for ControllerQuirks { const NAME: &'static str = "ControllerQuirks"; 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.send_acl_data_before_connection_complete = ::std::option::Option::Some(is.read_bool()?); }, 16 => { self.has_default_random_address = ::std::option::Option::Some(is.read_bool()?); }, 24 => { self.hardware_error_before_reset = ::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.send_acl_data_before_connection_complete { my_size += 1 + 1; } if let Some(v) = self.has_default_random_address { my_size += 1 + 1; } if let Some(v) = self.hardware_error_before_reset { 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.send_acl_data_before_connection_complete { os.write_bool(1, v)?; } if let Some(v) = self.has_default_random_address { os.write_bool(2, v)?; } if let Some(v) = self.hardware_error_before_reset { 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() -> ControllerQuirks { ControllerQuirks::new() } fn clear(&mut self) { self.send_acl_data_before_connection_complete = ::std::option::Option::None; self.has_default_random_address = ::std::option::Option::None; self.hardware_error_before_reset = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ControllerQuirks { static instance: ControllerQuirks = ControllerQuirks { send_acl_data_before_connection_complete: ::std::option::Option::None, has_default_random_address: ::std::option::Option::None, hardware_error_before_reset: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ControllerQuirks { 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("ControllerQuirks").unwrap()).clone() } } impl ::std::fmt::Display for ControllerQuirks { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ControllerQuirks { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:rootcanal.configuration.VendorFeatures) pub struct VendorFeatures { // message fields // @@protoc_insertion_point(field:rootcanal.configuration.VendorFeatures.csr) pub csr: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.VendorFeatures.android) pub android: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:rootcanal.configuration.VendorFeatures.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a VendorFeatures { fn default() -> &'a VendorFeatures { ::default_instance() } } impl VendorFeatures { pub fn new() -> VendorFeatures { ::std::default::Default::default() } // optional bool csr = 1; pub fn csr(&self) -> bool { self.csr.unwrap_or(false) } pub fn clear_csr(&mut self) { self.csr = ::std::option::Option::None; } pub fn has_csr(&self) -> bool { self.csr.is_some() } // Param is passed by value, moved pub fn set_csr(&mut self, v: bool) { self.csr = ::std::option::Option::Some(v); } // optional bool android = 2; pub fn android(&self) -> bool { self.android.unwrap_or(false) } pub fn clear_android(&mut self) { self.android = ::std::option::Option::None; } pub fn has_android(&self) -> bool { self.android.is_some() } // Param is passed by value, moved pub fn set_android(&mut self, v: bool) { self.android = ::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::<_, _>( "csr", |m: &VendorFeatures| { &m.csr }, |m: &mut VendorFeatures| { &mut m.csr }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "android", |m: &VendorFeatures| { &m.android }, |m: &mut VendorFeatures| { &mut m.android }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "VendorFeatures", fields, oneofs, ) } } impl ::protobuf::Message for VendorFeatures { const NAME: &'static str = "VendorFeatures"; 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.csr = ::std::option::Option::Some(is.read_bool()?); }, 16 => { self.android = ::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.csr { my_size += 1 + 1; } if let Some(v) = self.android { 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.csr { os.write_bool(1, v)?; } if let Some(v) = self.android { os.write_bool(2, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> VendorFeatures { VendorFeatures::new() } fn clear(&mut self) { self.csr = ::std::option::Option::None; self.android = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static VendorFeatures { static instance: VendorFeatures = VendorFeatures { csr: ::std::option::Option::None, android: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for VendorFeatures { 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("VendorFeatures").unwrap()).clone() } } impl ::std::fmt::Display for VendorFeatures { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for VendorFeatures { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:rootcanal.configuration.Controller) pub struct Controller { // message fields // @@protoc_insertion_point(field:rootcanal.configuration.Controller.preset) pub preset: ::std::option::Option<::protobuf::EnumOrUnknown>, // @@protoc_insertion_point(field:rootcanal.configuration.Controller.features) pub features: ::protobuf::MessageField, // @@protoc_insertion_point(field:rootcanal.configuration.Controller.quirks) pub quirks: ::protobuf::MessageField, // @@protoc_insertion_point(field:rootcanal.configuration.Controller.strict) pub strict: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.Controller.vendor) pub vendor: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:rootcanal.configuration.Controller.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Controller { fn default() -> &'a Controller { ::default_instance() } } impl Controller { pub fn new() -> Controller { ::std::default::Default::default() } // optional .rootcanal.configuration.ControllerPreset preset = 1; pub fn preset(&self) -> ControllerPreset { match self.preset { Some(e) => e.enum_value_or(ControllerPreset::DEFAULT), None => ControllerPreset::DEFAULT, } } pub fn clear_preset(&mut self) { self.preset = ::std::option::Option::None; } pub fn has_preset(&self) -> bool { self.preset.is_some() } // Param is passed by value, moved pub fn set_preset(&mut self, v: ControllerPreset) { self.preset = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } // optional bool strict = 4; pub fn strict(&self) -> bool { self.strict.unwrap_or(false) } pub fn clear_strict(&mut self) { self.strict = ::std::option::Option::None; } pub fn has_strict(&self) -> bool { self.strict.is_some() } // Param is passed by value, moved pub fn set_strict(&mut self, v: bool) { self.strict = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(5); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "preset", |m: &Controller| { &m.preset }, |m: &mut Controller| { &mut m.preset }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ControllerFeatures>( "features", |m: &Controller| { &m.features }, |m: &mut Controller| { &mut m.features }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ControllerQuirks>( "quirks", |m: &Controller| { &m.quirks }, |m: &mut Controller| { &mut m.quirks }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "strict", |m: &Controller| { &m.strict }, |m: &mut Controller| { &mut m.strict }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, VendorFeatures>( "vendor", |m: &Controller| { &m.vendor }, |m: &mut Controller| { &mut m.vendor }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Controller", fields, oneofs, ) } } impl ::protobuf::Message for Controller { const NAME: &'static str = "Controller"; 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.preset = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.features)?; }, 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.quirks)?; }, 32 => { self.strict = ::std::option::Option::Some(is.read_bool()?); }, 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.vendor)?; }, 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.preset { my_size += ::protobuf::rt::int32_size(1, v.value()); } if let Some(v) = self.features.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.quirks.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.strict { my_size += 1 + 1; } if let Some(v) = self.vendor.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.preset { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } if let Some(v) = self.features.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } if let Some(v) = self.quirks.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } if let Some(v) = self.strict { os.write_bool(4, v)?; } if let Some(v) = self.vendor.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Controller { Controller::new() } fn clear(&mut self) { self.preset = ::std::option::Option::None; self.features.clear(); self.quirks.clear(); self.strict = ::std::option::Option::None; self.vendor.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Controller { static instance: Controller = Controller { preset: ::std::option::Option::None, features: ::protobuf::MessageField::none(), quirks: ::protobuf::MessageField::none(), strict: ::std::option::Option::None, vendor: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Controller { 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("Controller").unwrap()).clone() } } impl ::std::fmt::Display for Controller { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Controller { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:rootcanal.configuration.TcpServer) pub struct TcpServer { // message fields // @@protoc_insertion_point(field:rootcanal.configuration.TcpServer.tcp_port) pub tcp_port: ::std::option::Option, // @@protoc_insertion_point(field:rootcanal.configuration.TcpServer.configuration) pub configuration: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:rootcanal.configuration.TcpServer.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a TcpServer { fn default() -> &'a TcpServer { ::default_instance() } } impl TcpServer { pub fn new() -> TcpServer { ::std::default::Default::default() } // required int32 tcp_port = 1; pub fn tcp_port(&self) -> i32 { self.tcp_port.unwrap_or(0) } pub fn clear_tcp_port(&mut self) { self.tcp_port = ::std::option::Option::None; } pub fn has_tcp_port(&self) -> bool { self.tcp_port.is_some() } // Param is passed by value, moved pub fn set_tcp_port(&mut self, v: i32) { self.tcp_port = ::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::<_, _>( "tcp_port", |m: &TcpServer| { &m.tcp_port }, |m: &mut TcpServer| { &mut m.tcp_port }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Controller>( "configuration", |m: &TcpServer| { &m.configuration }, |m: &mut TcpServer| { &mut m.configuration }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "TcpServer", fields, oneofs, ) } } impl ::protobuf::Message for TcpServer { const NAME: &'static str = "TcpServer"; fn is_initialized(&self) -> bool { if self.tcp_port.is_none() { return false; } for v in &self.configuration { 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 { 8 => { self.tcp_port = ::std::option::Option::Some(is.read_int32()?); }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.configuration)?; }, 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.tcp_port { my_size += ::protobuf::rt::int32_size(1, v); } if let Some(v) = self.configuration.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.tcp_port { os.write_int32(1, v)?; } if let Some(v) = self.configuration.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> TcpServer { TcpServer::new() } fn clear(&mut self) { self.tcp_port = ::std::option::Option::None; self.configuration.clear(); self.special_fields.clear(); } fn default_instance() -> &'static TcpServer { static instance: TcpServer = TcpServer { tcp_port: ::std::option::Option::None, configuration: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for TcpServer { 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("TcpServer").unwrap()).clone() } } impl ::std::fmt::Display for TcpServer { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for TcpServer { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:rootcanal.configuration.Configuration) pub struct Configuration { // message fields // @@protoc_insertion_point(field:rootcanal.configuration.Configuration.tcp_server) pub tcp_server: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:rootcanal.configuration.Configuration.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Configuration { fn default() -> &'a Configuration { ::default_instance() } } impl Configuration { pub fn new() -> Configuration { ::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::<_, _>( "tcp_server", |m: &Configuration| { &m.tcp_server }, |m: &mut Configuration| { &mut m.tcp_server }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Configuration", fields, oneofs, ) } } impl ::protobuf::Message for Configuration { const NAME: &'static str = "Configuration"; fn is_initialized(&self) -> bool { for v in &self.tcp_server { 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.tcp_server.push(is.read_message()?); }, 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.tcp_server { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.tcp_server { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Configuration { Configuration::new() } fn clear(&mut self) { self.tcp_server.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Configuration { static instance: Configuration = Configuration { tcp_server: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Configuration { 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("Configuration").unwrap()).clone() } } impl ::std::fmt::Display for Configuration { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Configuration { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:rootcanal.configuration.ControllerPreset) pub enum ControllerPreset { // @@protoc_insertion_point(enum_value:rootcanal.configuration.ControllerPreset.DEFAULT) DEFAULT = 0, // @@protoc_insertion_point(enum_value:rootcanal.configuration.ControllerPreset.LAIRD_BL654) LAIRD_BL654 = 1, // @@protoc_insertion_point(enum_value:rootcanal.configuration.ControllerPreset.CSR_RCK_PTS_DONGLE) CSR_RCK_PTS_DONGLE = 2, } impl ::protobuf::Enum for ControllerPreset { const NAME: &'static str = "ControllerPreset"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(ControllerPreset::DEFAULT), 1 => ::std::option::Option::Some(ControllerPreset::LAIRD_BL654), 2 => ::std::option::Option::Some(ControllerPreset::CSR_RCK_PTS_DONGLE), _ => ::std::option::Option::None } } const VALUES: &'static [ControllerPreset] = &[ ControllerPreset::DEFAULT, ControllerPreset::LAIRD_BL654, ControllerPreset::CSR_RCK_PTS_DONGLE, ]; } impl ::protobuf::EnumFull for ControllerPreset { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().enum_by_package_relative_name("ControllerPreset").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 ControllerPreset { fn default() -> Self { ControllerPreset::DEFAULT } } impl ControllerPreset { fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ControllerPreset") } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x1drootcanal/configuration.proto\x12\x17rootcanal.configuration\"\xa8\ \x02\n\x12ControllerFeatures\x126\n\x17le_extended_advertising\x18\x01\ \x20\x01(\x08R\x15leExtendedAdvertising\x126\n\x17le_periodic_advertisin\ g\x18\x02\x20\x01(\x08R\x15lePeriodicAdvertising\x12\x1d\n\nll_privacy\ \x18\x03\x20\x01(\x08R\tllPrivacy\x12\x1a\n\tle_2m_phy\x18\x04\x20\x01(\ \x08R\x07le2mPhy\x12\x20\n\x0cle_coded_phy\x18\x05\x20\x01(\x08R\nleCode\ dPhy\x12E\n\x1fle_connected_isochronous_stream\x18\x06\x20\x01(\x08R\x1c\ leConnectedIsochronousStream\"\xe5\x01\n\x10ControllerQuirks\x12U\n(send\ _acl_data_before_connection_complete\x18\x01\x20\x01(\x08R#sendAclDataBe\ foreConnectionComplete\x12;\n\x1ahas_default_random_address\x18\x02\x20\ \x01(\x08R\x17hasDefaultRandomAddress\x12=\n\x1bhardware_error_before_re\ set\x18\x03\x20\x01(\x08R\x18hardwareErrorBeforeReset\"<\n\x0eVendorFeat\ ures\x12\x10\n\x03csr\x18\x01\x20\x01(\x08R\x03csr\x12\x18\n\x07android\ \x18\x02\x20\x01(\x08R\x07android\"\xb4\x02\n\nController\x12A\n\x06pres\ et\x18\x01\x20\x01(\x0e2).rootcanal.configuration.ControllerPresetR\x06p\ reset\x12G\n\x08features\x18\x02\x20\x01(\x0b2+.rootcanal.configuration.\ ControllerFeaturesR\x08features\x12A\n\x06quirks\x18\x03\x20\x01(\x0b2).\ rootcanal.configuration.ControllerQuirksR\x06quirks\x12\x16\n\x06strict\ \x18\x04\x20\x01(\x08R\x06strict\x12?\n\x06vendor\x18\x05\x20\x01(\x0b2'\ .rootcanal.configuration.VendorFeaturesR\x06vendor\"q\n\tTcpServer\x12\ \x19\n\x08tcp_port\x18\x01\x20\x02(\x05R\x07tcpPort\x12I\n\rconfiguratio\ n\x18\x02\x20\x01(\x0b2#.rootcanal.configuration.ControllerR\rconfigurat\ ion\"R\n\rConfiguration\x12A\n\ntcp_server\x18\x01\x20\x03(\x0b2\".rootc\ anal.configuration.TcpServerR\ttcpServer*H\n\x10ControllerPreset\x12\x0b\ \n\x07DEFAULT\x10\0\x12\x0f\n\x0bLAIRD_BL654\x10\x01\x12\x16\n\x12CSR_RC\ K_PTS_DONGLE\x10\x02B\x02H\x02\ "; /// `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(0); let mut messages = ::std::vec::Vec::with_capacity(6); messages.push(ControllerFeatures::generated_message_descriptor_data()); messages.push(ControllerQuirks::generated_message_descriptor_data()); messages.push(VendorFeatures::generated_message_descriptor_data()); messages.push(Controller::generated_message_descriptor_data()); messages.push(TcpServer::generated_message_descriptor_data()); messages.push(Configuration::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(1); enums.push(ControllerPreset::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) }