// 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(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 `netsim/hci_packet.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:netsim.packet.HCIPacket) pub struct HCIPacket { // message fields // @@protoc_insertion_point(field:netsim.packet.HCIPacket.packet_type) pub packet_type: ::protobuf::EnumOrUnknown, // @@protoc_insertion_point(field:netsim.packet.HCIPacket.packet) pub packet: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:netsim.packet.HCIPacket.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a HCIPacket { fn default() -> &'a HCIPacket { ::default_instance() } } impl HCIPacket { pub fn new() -> HCIPacket { ::std::default::Default::default() } 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_simpler_field_accessor::<_, _>( "packet_type", |m: &HCIPacket| { &m.packet_type }, |m: &mut HCIPacket| { &mut m.packet_type }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "packet", |m: &HCIPacket| { &m.packet }, |m: &mut HCIPacket| { &mut m.packet }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "HCIPacket", fields, oneofs, ) } } impl ::protobuf::Message for HCIPacket { const NAME: &'static str = "HCIPacket"; 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.packet_type = is.read_enum_or_unknown()?; }, 18 => { self.packet = 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 self.packet_type != ::protobuf::EnumOrUnknown::new(hcipacket::PacketType::HCI_PACKET_UNSPECIFIED) { my_size += ::protobuf::rt::int32_size(1, self.packet_type.value()); } if !self.packet.is_empty() { my_size += ::protobuf::rt::bytes_size(2, &self.packet); } 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 self.packet_type != ::protobuf::EnumOrUnknown::new(hcipacket::PacketType::HCI_PACKET_UNSPECIFIED) { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.packet_type))?; } if !self.packet.is_empty() { os.write_bytes(2, &self.packet)?; } 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() -> HCIPacket { HCIPacket::new() } fn clear(&mut self) { self.packet_type = ::protobuf::EnumOrUnknown::new(hcipacket::PacketType::HCI_PACKET_UNSPECIFIED); self.packet.clear(); self.special_fields.clear(); } fn default_instance() -> &'static HCIPacket { static instance: HCIPacket = HCIPacket { packet_type: ::protobuf::EnumOrUnknown::from_i32(0), packet: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for HCIPacket { 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("HCIPacket").unwrap()).clone() } } impl ::std::fmt::Display for HCIPacket { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for HCIPacket { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `HCIPacket` pub mod hcipacket { #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:netsim.packet.HCIPacket.PacketType) pub enum PacketType { // @@protoc_insertion_point(enum_value:netsim.packet.HCIPacket.PacketType.HCI_PACKET_UNSPECIFIED) HCI_PACKET_UNSPECIFIED = 0, // @@protoc_insertion_point(enum_value:netsim.packet.HCIPacket.PacketType.COMMAND) COMMAND = 1, // @@protoc_insertion_point(enum_value:netsim.packet.HCIPacket.PacketType.ACL) ACL = 2, // @@protoc_insertion_point(enum_value:netsim.packet.HCIPacket.PacketType.SCO) SCO = 3, // @@protoc_insertion_point(enum_value:netsim.packet.HCIPacket.PacketType.EVENT) EVENT = 4, // @@protoc_insertion_point(enum_value:netsim.packet.HCIPacket.PacketType.ISO) ISO = 5, } impl ::protobuf::Enum for PacketType { const NAME: &'static str = "PacketType"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(PacketType::HCI_PACKET_UNSPECIFIED), 1 => ::std::option::Option::Some(PacketType::COMMAND), 2 => ::std::option::Option::Some(PacketType::ACL), 3 => ::std::option::Option::Some(PacketType::SCO), 4 => ::std::option::Option::Some(PacketType::EVENT), 5 => ::std::option::Option::Some(PacketType::ISO), _ => ::std::option::Option::None } } const VALUES: &'static [PacketType] = &[ PacketType::HCI_PACKET_UNSPECIFIED, PacketType::COMMAND, PacketType::ACL, PacketType::SCO, PacketType::EVENT, PacketType::ISO, ]; } impl ::protobuf::EnumFull for PacketType { 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("HCIPacket.PacketType").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 PacketType { fn default() -> Self { PacketType::HCI_PACKET_UNSPECIFIED } } impl PacketType { pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("HCIPacket.PacketType") } } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x17netsim/hci_packet.proto\x12\rnetsim.packet\"\xc6\x01\n\tHCIPacket\ \x12D\n\x0bpacket_type\x18\x01\x20\x01(\x0e2#.netsim.packet.HCIPacket.Pa\ cketTypeR\npacketType\x12\x16\n\x06packet\x18\x02\x20\x01(\x0cR\x06packe\ t\"[\n\nPacketType\x12\x1a\n\x16HCI_PACKET_UNSPECIFIED\x10\0\x12\x0b\n\ \x07COMMAND\x10\x01\x12\x07\n\x03ACL\x10\x02\x12\x07\n\x03SCO\x10\x03\ \x12\t\n\x05EVENT\x10\x04\x12\x07\n\x03ISO\x10\x05BJ\n\x1fcom.android.em\ ulation.bluetoothP\x01\xf8\x01\x01\xa2\x02\x03AEB\xaa\x02\x1bAndroid.Emu\ lation.Bluetoothb\x06proto3\ "; /// `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(1); messages.push(HCIPacket::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(1); enums.push(hcipacket::PacketType::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) }