diff --git a/protocol/src/authentication.rs b/protocol/src/authentication.rs index 2dc30125..49a0fc22 100644 --- a/protocol/src/authentication.rs +++ b/protocol/src/authentication.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientResponseEncrypted { // message fields login_credentials: ::protobuf::SingularPtrField, @@ -56,9 +56,10 @@ impl ClientResponseEncrypted { // required .LoginCredentials login_credentials = 10; - pub fn get_login_credentials(&self) -> &LoginCredentials { - self.login_credentials.as_ref().unwrap_or_else(|| LoginCredentials::default_instance()) + self.login_credentials + .as_ref() + .unwrap_or_else(|| LoginCredentials::default_instance()) } pub fn clear_login_credentials(&mut self) { self.login_credentials.clear(); @@ -84,14 +85,16 @@ impl ClientResponseEncrypted { // Take field pub fn take_login_credentials(&mut self) -> LoginCredentials { - self.login_credentials.take().unwrap_or_else(|| LoginCredentials::new()) + self.login_credentials + .take() + .unwrap_or_else(|| LoginCredentials::new()) } // optional .AccountCreation account_creation = 20; - pub fn get_account_creation(&self) -> AccountCreation { - self.account_creation.unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT) + self.account_creation + .unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT) } pub fn clear_account_creation(&mut self) { self.account_creation = ::std::option::Option::None; @@ -108,9 +111,10 @@ impl ClientResponseEncrypted { // optional .FingerprintResponseUnion fingerprint_response = 30; - pub fn get_fingerprint_response(&self) -> &FingerprintResponseUnion { - self.fingerprint_response.as_ref().unwrap_or_else(|| FingerprintResponseUnion::default_instance()) + self.fingerprint_response + .as_ref() + .unwrap_or_else(|| FingerprintResponseUnion::default_instance()) } pub fn clear_fingerprint_response(&mut self) { self.fingerprint_response.clear(); @@ -136,14 +140,17 @@ impl ClientResponseEncrypted { // Take field pub fn take_fingerprint_response(&mut self) -> FingerprintResponseUnion { - self.fingerprint_response.take().unwrap_or_else(|| FingerprintResponseUnion::new()) + self.fingerprint_response + .take() + .unwrap_or_else(|| FingerprintResponseUnion::new()) } // optional .PeerTicketUnion peer_ticket = 40; - pub fn get_peer_ticket(&self) -> &PeerTicketUnion { - self.peer_ticket.as_ref().unwrap_or_else(|| PeerTicketUnion::default_instance()) + self.peer_ticket + .as_ref() + .unwrap_or_else(|| PeerTicketUnion::default_instance()) } pub fn clear_peer_ticket(&mut self) { self.peer_ticket.clear(); @@ -169,14 +176,17 @@ impl ClientResponseEncrypted { // Take field pub fn take_peer_ticket(&mut self) -> PeerTicketUnion { - self.peer_ticket.take().unwrap_or_else(|| PeerTicketUnion::new()) + self.peer_ticket + .take() + .unwrap_or_else(|| PeerTicketUnion::new()) } // required .SystemInfo system_info = 50; - pub fn get_system_info(&self) -> &SystemInfo { - self.system_info.as_ref().unwrap_or_else(|| SystemInfo::default_instance()) + self.system_info + .as_ref() + .unwrap_or_else(|| SystemInfo::default_instance()) } pub fn clear_system_info(&mut self) { self.system_info.clear(); @@ -207,7 +217,6 @@ impl ClientResponseEncrypted { // optional string platform_model = 60; - pub fn get_platform_model(&self) -> &str { match self.platform_model.as_ref() { Some(v) => &v, @@ -238,12 +247,13 @@ impl ClientResponseEncrypted { // Take field pub fn take_platform_model(&mut self) -> ::std::string::String { - self.platform_model.take().unwrap_or_else(|| ::std::string::String::new()) + self.platform_model + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string version_string = 70; - pub fn get_version_string(&self) -> &str { match self.version_string.as_ref() { Some(v) => &v, @@ -274,14 +284,17 @@ impl ClientResponseEncrypted { // Take field pub fn take_version_string(&mut self) -> ::std::string::String { - self.version_string.take().unwrap_or_else(|| ::std::string::String::new()) + self.version_string + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .LibspotifyAppKey appkey = 80; - pub fn get_appkey(&self) -> &LibspotifyAppKey { - self.appkey.as_ref().unwrap_or_else(|| LibspotifyAppKey::default_instance()) + self.appkey + .as_ref() + .unwrap_or_else(|| LibspotifyAppKey::default_instance()) } pub fn clear_appkey(&mut self) { self.appkey.clear(); @@ -307,14 +320,17 @@ impl ClientResponseEncrypted { // Take field pub fn take_appkey(&mut self) -> LibspotifyAppKey { - self.appkey.take().unwrap_or_else(|| LibspotifyAppKey::new()) + self.appkey + .take() + .unwrap_or_else(|| LibspotifyAppKey::new()) } // optional .ClientInfo client_info = 90; - pub fn get_client_info(&self) -> &ClientInfo { - self.client_info.as_ref().unwrap_or_else(|| ClientInfo::default_instance()) + self.client_info + .as_ref() + .unwrap_or_else(|| ClientInfo::default_instance()) } pub fn clear_client_info(&mut self) { self.client_info.clear(); @@ -356,69 +372,109 @@ impl ::protobuf::Message for ClientResponseEncrypted { if !v.is_initialized() { return false; } - }; + } for v in &self.fingerprint_response { if !v.is_initialized() { return false; } - }; + } for v in &self.peer_ticket { if !v.is_initialized() { return false; } - }; + } for v in &self.system_info { if !v.is_initialized() { return false; } - }; + } for v in &self.appkey { if !v.is_initialized() { return false; } - }; + } for v in &self.client_info { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_credentials)?; - }, - 20 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.account_creation, 20, &mut self.unknown_fields)? - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.login_credentials, + )?; + } + 20 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.account_creation, + 20, + &mut self.unknown_fields, + )?, 30 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fingerprint_response)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.fingerprint_response, + )?; + } 40 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.peer_ticket)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.peer_ticket, + )?; + } 50 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.system_info)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.system_info, + )?; + } 60 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.platform_model)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.platform_model, + )?; + } 70 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.version_string)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.version_string, + )?; + } 80 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.appkey)?; - }, + } 90 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.client_info)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.client_info, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -466,7 +522,10 @@ impl ::protobuf::Message for ClientResponseEncrypted { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.login_credentials.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -541,69 +600,112 @@ impl ::protobuf::Message for ClientResponseEncrypted { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "login_credentials", - |m: &ClientResponseEncrypted| { &m.login_credentials }, - |m: &mut ClientResponseEncrypted| { &mut m.login_credentials }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "login_credentials", + |m: &ClientResponseEncrypted| &m.login_credentials, + |m: &mut ClientResponseEncrypted| &mut m.login_credentials, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "account_creation", - |m: &ClientResponseEncrypted| { &m.account_creation }, - |m: &mut ClientResponseEncrypted| { &mut m.account_creation }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "fingerprint_response", - |m: &ClientResponseEncrypted| { &m.fingerprint_response }, - |m: &mut ClientResponseEncrypted| { &mut m.fingerprint_response }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "peer_ticket", - |m: &ClientResponseEncrypted| { &m.peer_ticket }, - |m: &mut ClientResponseEncrypted| { &mut m.peer_ticket }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "system_info", - |m: &ClientResponseEncrypted| { &m.system_info }, - |m: &mut ClientResponseEncrypted| { &mut m.system_info }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "platform_model", - |m: &ClientResponseEncrypted| { &m.platform_model }, - |m: &mut ClientResponseEncrypted| { &mut m.platform_model }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "version_string", - |m: &ClientResponseEncrypted| { &m.version_string }, - |m: &mut ClientResponseEncrypted| { &mut m.version_string }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "appkey", - |m: &ClientResponseEncrypted| { &m.appkey }, - |m: &mut ClientResponseEncrypted| { &mut m.appkey }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "client_info", - |m: &ClientResponseEncrypted| { &m.client_info }, - |m: &mut ClientResponseEncrypted| { &mut m.client_info }, + |m: &ClientResponseEncrypted| &m.account_creation, + |m: &mut ClientResponseEncrypted| &mut m.account_creation, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "fingerprint_response", + |m: &ClientResponseEncrypted| &m.fingerprint_response, + |m: &mut ClientResponseEncrypted| &mut m.fingerprint_response, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "peer_ticket", + |m: &ClientResponseEncrypted| &m.peer_ticket, + |m: &mut ClientResponseEncrypted| &mut m.peer_ticket, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "system_info", + |m: &ClientResponseEncrypted| &m.system_info, + |m: &mut ClientResponseEncrypted| &mut m.system_info, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "platform_model", + |m: &ClientResponseEncrypted| &m.platform_model, + |m: &mut ClientResponseEncrypted| &mut m.platform_model, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "version_string", + |m: &ClientResponseEncrypted| &m.version_string, + |m: &mut ClientResponseEncrypted| &mut m.version_string, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "appkey", + |m: &ClientResponseEncrypted| &m.appkey, + |m: &mut ClientResponseEncrypted| &mut m.appkey, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "client_info", + |m: &ClientResponseEncrypted| &m.client_info, + |m: &mut ClientResponseEncrypted| &mut m.client_info, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientResponseEncrypted", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ClientResponseEncrypted { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientResponseEncrypted::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ClientResponseEncrypted::new) } } } @@ -634,7 +736,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientResponseEncrypted { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCredentials { // message fields username: ::protobuf::SingularField<::std::string::String>, @@ -658,7 +760,6 @@ impl LoginCredentials { // optional string username = 10; - pub fn get_username(&self) -> &str { match self.username.as_ref() { Some(v) => &v, @@ -689,14 +790,16 @@ impl LoginCredentials { // Take field pub fn take_username(&mut self) -> ::std::string::String { - self.username.take().unwrap_or_else(|| ::std::string::String::new()) + self.username + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // required .AuthenticationType typ = 20; - pub fn get_typ(&self) -> AuthenticationType { - self.typ.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) + self.typ + .unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; @@ -713,7 +816,6 @@ impl LoginCredentials { // optional bytes auth_data = 30; - pub fn get_auth_data(&self) -> &[u8] { match self.auth_data.as_ref() { Some(v) => &v, @@ -744,7 +846,9 @@ impl LoginCredentials { // Take field pub fn take_auth_data(&mut self) -> ::std::vec::Vec { - self.auth_data.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.auth_data + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -756,22 +860,34 @@ impl ::protobuf::Message for LoginCredentials { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.username)?; - }, - 20 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 20, &mut self.unknown_fields)? - }, + } + 20 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.typ, + 20, + &mut self.unknown_fields, + )?, 30 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.auth_data)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -795,7 +911,10 @@ impl ::protobuf::Message for LoginCredentials { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.username.as_ref() { os.write_string(10, &v)?; } @@ -840,39 +959,52 @@ impl ::protobuf::Message for LoginCredentials { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "username", - |m: &LoginCredentials| { &m.username }, - |m: &mut LoginCredentials| { &mut m.username }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "username", + |m: &LoginCredentials| &m.username, + |m: &mut LoginCredentials| &mut m.username, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "typ", - |m: &LoginCredentials| { &m.typ }, - |m: &mut LoginCredentials| { &mut m.typ }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "auth_data", - |m: &LoginCredentials| { &m.auth_data }, - |m: &mut LoginCredentials| { &mut m.auth_data }, + |m: &LoginCredentials| &m.typ, + |m: &mut LoginCredentials| &mut m.typ, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "auth_data", + |m: &LoginCredentials| &m.auth_data, + |m: &mut LoginCredentials| &mut m.auth_data, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "LoginCredentials", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LoginCredentials { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCredentials::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCredentials::new) } } } @@ -897,7 +1029,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCredentials { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FingerprintResponseUnion { // message fields grain: ::protobuf::SingularPtrField, @@ -920,9 +1052,10 @@ impl FingerprintResponseUnion { // optional .FingerprintGrainResponse grain = 10; - pub fn get_grain(&self) -> &FingerprintGrainResponse { - self.grain.as_ref().unwrap_or_else(|| FingerprintGrainResponse::default_instance()) + self.grain + .as_ref() + .unwrap_or_else(|| FingerprintGrainResponse::default_instance()) } pub fn clear_grain(&mut self) { self.grain.clear(); @@ -948,14 +1081,17 @@ impl FingerprintResponseUnion { // Take field pub fn take_grain(&mut self) -> FingerprintGrainResponse { - self.grain.take().unwrap_or_else(|| FingerprintGrainResponse::new()) + self.grain + .take() + .unwrap_or_else(|| FingerprintGrainResponse::new()) } // optional .FingerprintHmacRipemdResponse hmac_ripemd = 20; - pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdResponse { - self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance()) + self.hmac_ripemd + .as_ref() + .unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance()) } pub fn clear_hmac_ripemd(&mut self) { self.hmac_ripemd.clear(); @@ -981,7 +1117,9 @@ impl FingerprintResponseUnion { // Take field pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdResponse { - self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdResponse::new()) + self.hmac_ripemd + .take() + .unwrap_or_else(|| FingerprintHmacRipemdResponse::new()) } } @@ -991,28 +1129,40 @@ impl ::protobuf::Message for FingerprintResponseUnion { if !v.is_initialized() { return false; } - }; + } for v in &self.hmac_ripemd { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grain)?; - }, + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hmac_ripemd)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.hmac_ripemd, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1035,7 +1185,10 @@ impl ::protobuf::Message for FingerprintResponseUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.grain.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1081,34 +1234,44 @@ impl ::protobuf::Message for FingerprintResponseUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "grain", - |m: &FingerprintResponseUnion| { &m.grain }, - |m: &mut FingerprintResponseUnion| { &mut m.grain }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "hmac_ripemd", - |m: &FingerprintResponseUnion| { &m.hmac_ripemd }, - |m: &mut FingerprintResponseUnion| { &mut m.hmac_ripemd }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "grain", + |m: &FingerprintResponseUnion| &m.grain, + |m: &mut FingerprintResponseUnion| &mut m.grain, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "hmac_ripemd", + |m: &FingerprintResponseUnion| &m.hmac_ripemd, + |m: &mut FingerprintResponseUnion| &mut m.hmac_ripemd, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "FingerprintResponseUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static FingerprintResponseUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FingerprintResponseUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(FingerprintResponseUnion::new) } } } @@ -1132,7 +1295,7 @@ impl ::protobuf::reflect::ProtobufValue for FingerprintResponseUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FingerprintGrainResponse { // message fields encrypted_key: ::protobuf::SingularField<::std::vec::Vec>, @@ -1154,7 +1317,6 @@ impl FingerprintGrainResponse { // required bytes encrypted_key = 10; - pub fn get_encrypted_key(&self) -> &[u8] { match self.encrypted_key.as_ref() { Some(v) => &v, @@ -1185,7 +1347,9 @@ impl FingerprintGrainResponse { // Take field pub fn take_encrypted_key(&mut self) -> ::std::vec::Vec { - self.encrypted_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.encrypted_key + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -1197,16 +1361,28 @@ impl ::protobuf::Message for FingerprintGrainResponse { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.encrypted_key)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.encrypted_key, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1224,7 +1400,10 @@ impl ::protobuf::Message for FingerprintGrainResponse { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.encrypted_key.as_ref() { os.write_bytes(10, &v)?; } @@ -1263,29 +1442,34 @@ impl ::protobuf::Message for FingerprintGrainResponse { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "encrypted_key", - |m: &FingerprintGrainResponse| { &m.encrypted_key }, - |m: &mut FingerprintGrainResponse| { &mut m.encrypted_key }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "encrypted_key", + |m: &FingerprintGrainResponse| &m.encrypted_key, + |m: &mut FingerprintGrainResponse| &mut m.encrypted_key, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "FingerprintGrainResponse", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static FingerprintGrainResponse { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FingerprintGrainResponse::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(FingerprintGrainResponse::new) } } } @@ -1308,7 +1492,7 @@ impl ::protobuf::reflect::ProtobufValue for FingerprintGrainResponse { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FingerprintHmacRipemdResponse { // message fields hmac: ::protobuf::SingularField<::std::vec::Vec>, @@ -1330,7 +1514,6 @@ impl FingerprintHmacRipemdResponse { // required bytes hmac = 10; - pub fn get_hmac(&self) -> &[u8] { match self.hmac.as_ref() { Some(v) => &v, @@ -1373,16 +1556,24 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hmac)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1400,7 +1591,10 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hmac.as_ref() { os.write_bytes(10, &v)?; } @@ -1439,7 +1633,8 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); @@ -1458,10 +1653,9 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { } fn default_instance() -> &'static FingerprintHmacRipemdResponse { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FingerprintHmacRipemdResponse::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(FingerprintHmacRipemdResponse::new) } } } @@ -1484,7 +1678,7 @@ impl ::protobuf::reflect::ProtobufValue for FingerprintHmacRipemdResponse { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PeerTicketUnion { // message fields public_key: ::protobuf::SingularPtrField, @@ -1507,9 +1701,10 @@ impl PeerTicketUnion { // optional .PeerTicketPublicKey public_key = 10; - pub fn get_public_key(&self) -> &PeerTicketPublicKey { - self.public_key.as_ref().unwrap_or_else(|| PeerTicketPublicKey::default_instance()) + self.public_key + .as_ref() + .unwrap_or_else(|| PeerTicketPublicKey::default_instance()) } pub fn clear_public_key(&mut self) { self.public_key.clear(); @@ -1535,14 +1730,17 @@ impl PeerTicketUnion { // Take field pub fn take_public_key(&mut self) -> PeerTicketPublicKey { - self.public_key.take().unwrap_or_else(|| PeerTicketPublicKey::new()) + self.public_key + .take() + .unwrap_or_else(|| PeerTicketPublicKey::new()) } // optional .PeerTicketOld old_ticket = 20; - pub fn get_old_ticket(&self) -> &PeerTicketOld { - self.old_ticket.as_ref().unwrap_or_else(|| PeerTicketOld::default_instance()) + self.old_ticket + .as_ref() + .unwrap_or_else(|| PeerTicketOld::default_instance()) } pub fn clear_old_ticket(&mut self) { self.old_ticket.clear(); @@ -1568,7 +1766,9 @@ impl PeerTicketUnion { // Take field pub fn take_old_ticket(&mut self) -> PeerTicketOld { - self.old_ticket.take().unwrap_or_else(|| PeerTicketOld::new()) + self.old_ticket + .take() + .unwrap_or_else(|| PeerTicketOld::new()) } } @@ -1578,28 +1778,44 @@ impl ::protobuf::Message for PeerTicketUnion { if !v.is_initialized() { return false; } - }; + } for v in &self.old_ticket { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.public_key)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.public_key, + )?; + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.old_ticket)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.old_ticket, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1622,7 +1838,10 @@ impl ::protobuf::Message for PeerTicketUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.public_key.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1668,24 +1887,35 @@ impl ::protobuf::Message for PeerTicketUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "public_key", - |m: &PeerTicketUnion| { &m.public_key }, - |m: &mut PeerTicketUnion| { &mut m.public_key }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "old_ticket", - |m: &PeerTicketUnion| { &m.old_ticket }, - |m: &mut PeerTicketUnion| { &mut m.old_ticket }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "public_key", + |m: &PeerTicketUnion| &m.public_key, + |m: &mut PeerTicketUnion| &mut m.public_key, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "old_ticket", + |m: &PeerTicketUnion| &m.old_ticket, + |m: &mut PeerTicketUnion| &mut m.old_ticket, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PeerTicketUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1693,9 +1923,7 @@ impl ::protobuf::Message for PeerTicketUnion { fn default_instance() -> &'static PeerTicketUnion { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PeerTicketUnion::new) - } + unsafe { instance.get(PeerTicketUnion::new) } } } @@ -1719,7 +1947,7 @@ impl ::protobuf::reflect::ProtobufValue for PeerTicketUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PeerTicketPublicKey { // message fields public_key: ::protobuf::SingularField<::std::vec::Vec>, @@ -1741,7 +1969,6 @@ impl PeerTicketPublicKey { // required bytes public_key = 10; - pub fn get_public_key(&self) -> &[u8] { match self.public_key.as_ref() { Some(v) => &v, @@ -1772,7 +1999,9 @@ impl PeerTicketPublicKey { // Take field pub fn take_public_key(&mut self) -> ::std::vec::Vec { - self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.public_key + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -1784,16 +2013,24 @@ impl ::protobuf::Message for PeerTicketPublicKey { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.public_key)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1811,7 +2048,10 @@ impl ::protobuf::Message for PeerTicketPublicKey { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.public_key.as_ref() { os.write_bytes(10, &v)?; } @@ -1850,29 +2090,34 @@ impl ::protobuf::Message for PeerTicketPublicKey { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "public_key", - |m: &PeerTicketPublicKey| { &m.public_key }, - |m: &mut PeerTicketPublicKey| { &mut m.public_key }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "public_key", + |m: &PeerTicketPublicKey| &m.public_key, + |m: &mut PeerTicketPublicKey| &mut m.public_key, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PeerTicketPublicKey", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static PeerTicketPublicKey { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PeerTicketPublicKey::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(PeerTicketPublicKey::new) } } } @@ -1895,7 +2140,7 @@ impl ::protobuf::reflect::ProtobufValue for PeerTicketPublicKey { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PeerTicketOld { // message fields peer_ticket: ::protobuf::SingularField<::std::vec::Vec>, @@ -1918,7 +2163,6 @@ impl PeerTicketOld { // required bytes peer_ticket = 10; - pub fn get_peer_ticket(&self) -> &[u8] { match self.peer_ticket.as_ref() { Some(v) => &v, @@ -1949,12 +2193,13 @@ impl PeerTicketOld { // Take field pub fn take_peer_ticket(&mut self) -> ::std::vec::Vec { - self.peer_ticket.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.peer_ticket + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // required bytes peer_ticket_signature = 20; - pub fn get_peer_ticket_signature(&self) -> &[u8] { match self.peer_ticket_signature.as_ref() { Some(v) => &v, @@ -1985,7 +2230,9 @@ impl PeerTicketOld { // Take field pub fn take_peer_ticket_signature(&mut self) -> ::std::vec::Vec { - self.peer_ticket_signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.peer_ticket_signature + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -2000,19 +2247,31 @@ impl ::protobuf::Message for PeerTicketOld { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.peer_ticket)?; - }, + } 20 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.peer_ticket_signature)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.peer_ticket_signature, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2033,7 +2292,10 @@ impl ::protobuf::Message for PeerTicketOld { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.peer_ticket.as_ref() { os.write_bytes(10, &v)?; } @@ -2075,24 +2337,35 @@ impl ::protobuf::Message for PeerTicketOld { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "peer_ticket", - |m: &PeerTicketOld| { &m.peer_ticket }, - |m: &mut PeerTicketOld| { &mut m.peer_ticket }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "peer_ticket_signature", - |m: &PeerTicketOld| { &m.peer_ticket_signature }, - |m: &mut PeerTicketOld| { &mut m.peer_ticket_signature }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "peer_ticket", + |m: &PeerTicketOld| &m.peer_ticket, + |m: &mut PeerTicketOld| &mut m.peer_ticket, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "peer_ticket_signature", + |m: &PeerTicketOld| &m.peer_ticket_signature, + |m: &mut PeerTicketOld| &mut m.peer_ticket_signature, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PeerTicketOld", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2100,9 +2373,7 @@ impl ::protobuf::Message for PeerTicketOld { fn default_instance() -> &'static PeerTicketOld { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PeerTicketOld::new) - } + unsafe { instance.get(PeerTicketOld::new) } } } @@ -2126,7 +2397,7 @@ impl ::protobuf::reflect::ProtobufValue for PeerTicketOld { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct SystemInfo { // message fields cpu_family: ::std::option::Option, @@ -2157,7 +2428,6 @@ impl SystemInfo { // required .CpuFamily cpu_family = 10; - pub fn get_cpu_family(&self) -> CpuFamily { self.cpu_family.unwrap_or(CpuFamily::CPU_UNKNOWN) } @@ -2176,7 +2446,6 @@ impl SystemInfo { // optional uint32 cpu_subtype = 20; - pub fn get_cpu_subtype(&self) -> u32 { self.cpu_subtype.unwrap_or(0) } @@ -2195,7 +2464,6 @@ impl SystemInfo { // optional uint32 cpu_ext = 30; - pub fn get_cpu_ext(&self) -> u32 { self.cpu_ext.unwrap_or(0) } @@ -2214,7 +2482,6 @@ impl SystemInfo { // optional .Brand brand = 40; - pub fn get_brand(&self) -> Brand { self.brand.unwrap_or(Brand::BRAND_UNBRANDED) } @@ -2233,7 +2500,6 @@ impl SystemInfo { // optional uint32 brand_flags = 50; - pub fn get_brand_flags(&self) -> u32 { self.brand_flags.unwrap_or(0) } @@ -2252,7 +2518,6 @@ impl SystemInfo { // required .Os os = 60; - pub fn get_os(&self) -> Os { self.os.unwrap_or(Os::OS_UNKNOWN) } @@ -2271,7 +2536,6 @@ impl SystemInfo { // optional uint32 os_version = 70; - pub fn get_os_version(&self) -> u32 { self.os_version.unwrap_or(0) } @@ -2290,7 +2554,6 @@ impl SystemInfo { // optional uint32 os_ext = 80; - pub fn get_os_ext(&self) -> u32 { self.os_ext.unwrap_or(0) } @@ -2309,7 +2572,6 @@ impl SystemInfo { // optional string system_information_string = 90; - pub fn get_system_information_string(&self) -> &str { match self.system_information_string.as_ref() { Some(v) => &v, @@ -2340,12 +2602,13 @@ impl SystemInfo { // Take field pub fn take_system_information_string(&mut self) -> ::std::string::String { - self.system_information_string.take().unwrap_or_else(|| ::std::string::String::new()) + self.system_information_string + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string device_id = 100; - pub fn get_device_id(&self) -> &str { match self.device_id.as_ref() { Some(v) => &v, @@ -2376,7 +2639,9 @@ impl SystemInfo { // Take field pub fn take_device_id(&mut self) -> ::std::string::String { - self.device_id.take().unwrap_or_else(|| ::std::string::String::new()) + self.device_id + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -2391,63 +2656,97 @@ impl ::protobuf::Message for SystemInfo { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 10 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.cpu_family, 10, &mut self.unknown_fields)? - }, + 10 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.cpu_family, + 10, + &mut self.unknown_fields, + )?, 20 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.cpu_subtype = ::std::option::Option::Some(tmp); - }, + } 30 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.cpu_ext = ::std::option::Option::Some(tmp); - }, - 40 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.brand, 40, &mut self.unknown_fields)? - }, + } + 40 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.brand, + 40, + &mut self.unknown_fields, + )?, 50 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.brand_flags = ::std::option::Option::Some(tmp); - }, - 60 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.os, 60, &mut self.unknown_fields)? - }, + } + 60 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.os, + 60, + &mut self.unknown_fields, + )?, 70 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.os_version = ::std::option::Option::Some(tmp); - }, + } 80 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.os_ext = ::std::option::Option::Some(tmp); - }, + } 90 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.system_information_string)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.system_information_string, + )?; + } 100 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.device_id)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2492,7 +2791,10 @@ impl ::protobuf::Message for SystemInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.cpu_family { os.write_enum(10, v.value())?; } @@ -2558,64 +2860,99 @@ impl ::protobuf::Message for SystemInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "cpu_family", - |m: &SystemInfo| { &m.cpu_family }, - |m: &mut SystemInfo| { &mut m.cpu_family }, + |m: &SystemInfo| &m.cpu_family, + |m: &mut SystemInfo| &mut m.cpu_family, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "cpu_subtype", - |m: &SystemInfo| { &m.cpu_subtype }, - |m: &mut SystemInfo| { &mut m.cpu_subtype }, + |m: &SystemInfo| &m.cpu_subtype, + |m: &mut SystemInfo| &mut m.cpu_subtype, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "cpu_ext", - |m: &SystemInfo| { &m.cpu_ext }, - |m: &mut SystemInfo| { &mut m.cpu_ext }, + |m: &SystemInfo| &m.cpu_ext, + |m: &mut SystemInfo| &mut m.cpu_ext, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "brand", - |m: &SystemInfo| { &m.brand }, - |m: &mut SystemInfo| { &mut m.brand }, + |m: &SystemInfo| &m.brand, + |m: &mut SystemInfo| &mut m.brand, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "brand_flags", - |m: &SystemInfo| { &m.brand_flags }, - |m: &mut SystemInfo| { &mut m.brand_flags }, + |m: &SystemInfo| &m.brand_flags, + |m: &mut SystemInfo| &mut m.brand_flags, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "os", - |m: &SystemInfo| { &m.os }, - |m: &mut SystemInfo| { &mut m.os }, + |m: &SystemInfo| &m.os, + |m: &mut SystemInfo| &mut m.os, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "os_version", - |m: &SystemInfo| { &m.os_version }, - |m: &mut SystemInfo| { &mut m.os_version }, + |m: &SystemInfo| &m.os_version, + |m: &mut SystemInfo| &mut m.os_version, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "os_ext", - |m: &SystemInfo| { &m.os_ext }, - |m: &mut SystemInfo| { &mut m.os_ext }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "system_information_string", - |m: &SystemInfo| { &m.system_information_string }, - |m: &mut SystemInfo| { &mut m.system_information_string }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "device_id", - |m: &SystemInfo| { &m.device_id }, - |m: &mut SystemInfo| { &mut m.device_id }, + |m: &SystemInfo| &m.os_ext, + |m: &mut SystemInfo| &mut m.os_ext, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "system_information_string", + |m: &SystemInfo| &m.system_information_string, + |m: &mut SystemInfo| &mut m.system_information_string, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "device_id", + |m: &SystemInfo| &m.device_id, + |m: &mut SystemInfo| &mut m.device_id, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "SystemInfo", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2623,9 +2960,7 @@ impl ::protobuf::Message for SystemInfo { fn default_instance() -> &'static SystemInfo { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(SystemInfo::new) - } + unsafe { instance.get(SystemInfo::new) } } } @@ -2657,7 +2992,7 @@ impl ::protobuf::reflect::ProtobufValue for SystemInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LibspotifyAppKey { // message fields version: ::std::option::Option, @@ -2683,7 +3018,6 @@ impl LibspotifyAppKey { // required uint32 version = 1; - pub fn get_version(&self) -> u32 { self.version.unwrap_or(0) } @@ -2702,7 +3036,6 @@ impl LibspotifyAppKey { // required bytes devkey = 2; - pub fn get_devkey(&self) -> &[u8] { match self.devkey.as_ref() { Some(v) => &v, @@ -2738,7 +3071,6 @@ impl LibspotifyAppKey { // required bytes signature = 3; - pub fn get_signature(&self) -> &[u8] { match self.signature.as_ref() { Some(v) => &v, @@ -2769,12 +3101,13 @@ impl LibspotifyAppKey { // Take field pub fn take_signature(&mut self) -> ::std::vec::Vec { - self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.signature + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // required string useragent = 4; - pub fn get_useragent(&self) -> &str { match self.useragent.as_ref() { Some(v) => &v, @@ -2805,12 +3138,13 @@ impl LibspotifyAppKey { // Take field pub fn take_useragent(&mut self) -> ::std::string::String { - self.useragent.take().unwrap_or_else(|| ::std::string::String::new()) + self.useragent + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // required bytes callback_hash = 5; - pub fn get_callback_hash(&self) -> &[u8] { match self.callback_hash.as_ref() { Some(v) => &v, @@ -2841,7 +3175,9 @@ impl LibspotifyAppKey { // Take field pub fn take_callback_hash(&mut self) -> ::std::vec::Vec { - self.callback_hash.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.callback_hash + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -2865,32 +3201,46 @@ impl ::protobuf::Message for LibspotifyAppKey { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.version = ::std::option::Option::Some(tmp); - }, + } 2 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.devkey)?; - }, + } 3 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?; - }, + } 4 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.useragent)?; - }, + } 5 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.callback_hash)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.callback_hash, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2920,7 +3270,10 @@ impl ::protobuf::Message for LibspotifyAppKey { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.version { os.write_uint32(1, v)?; } @@ -2971,49 +3324,72 @@ impl ::protobuf::Message for LibspotifyAppKey { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "version", - |m: &LibspotifyAppKey| { &m.version }, - |m: &mut LibspotifyAppKey| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "devkey", - |m: &LibspotifyAppKey| { &m.devkey }, - |m: &mut LibspotifyAppKey| { &mut m.devkey }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "signature", - |m: &LibspotifyAppKey| { &m.signature }, - |m: &mut LibspotifyAppKey| { &mut m.signature }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "useragent", - |m: &LibspotifyAppKey| { &m.useragent }, - |m: &mut LibspotifyAppKey| { &mut m.useragent }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "callback_hash", - |m: &LibspotifyAppKey| { &m.callback_hash }, - |m: &mut LibspotifyAppKey| { &mut m.callback_hash }, + |m: &LibspotifyAppKey| &m.version, + |m: &mut LibspotifyAppKey| &mut m.version, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "devkey", + |m: &LibspotifyAppKey| &m.devkey, + |m: &mut LibspotifyAppKey| &mut m.devkey, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "signature", + |m: &LibspotifyAppKey| &m.signature, + |m: &mut LibspotifyAppKey| &mut m.signature, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "useragent", + |m: &LibspotifyAppKey| &m.useragent, + |m: &mut LibspotifyAppKey| &mut m.useragent, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "callback_hash", + |m: &LibspotifyAppKey| &m.callback_hash, + |m: &mut LibspotifyAppKey| &mut m.callback_hash, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "LibspotifyAppKey", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LibspotifyAppKey { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LibspotifyAppKey::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LibspotifyAppKey::new) } } } @@ -3040,7 +3416,7 @@ impl ::protobuf::reflect::ProtobufValue for LibspotifyAppKey { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientInfo { // message fields limited: ::std::option::Option, @@ -3064,7 +3440,6 @@ impl ClientInfo { // optional bool limited = 1; - pub fn get_limited(&self) -> bool { self.limited.unwrap_or(false) } @@ -3083,9 +3458,10 @@ impl ClientInfo { // optional .ClientInfoFacebook fb = 2; - pub fn get_fb(&self) -> &ClientInfoFacebook { - self.fb.as_ref().unwrap_or_else(|| ClientInfoFacebook::default_instance()) + self.fb + .as_ref() + .unwrap_or_else(|| ClientInfoFacebook::default_instance()) } pub fn clear_fb(&mut self) { self.fb.clear(); @@ -3116,7 +3492,6 @@ impl ClientInfo { // optional string language = 3; - pub fn get_language(&self) -> &str { match self.language.as_ref() { Some(v) => &v, @@ -3147,7 +3522,9 @@ impl ClientInfo { // Take field pub fn take_language(&mut self) -> ::std::string::String { - self.language.take().unwrap_or_else(|| ::std::string::String::new()) + self.language + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -3157,30 +3534,40 @@ impl ::protobuf::Message for ClientInfo { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.limited = ::std::option::Option::Some(tmp); - }, + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fb)?; - }, + } 3 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.language)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3205,7 +3592,10 @@ impl ::protobuf::Message for ClientInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.limited { os.write_bool(1, v)?; } @@ -3252,29 +3642,41 @@ impl ::protobuf::Message for ClientInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "limited", - |m: &ClientInfo| { &m.limited }, - |m: &mut ClientInfo| { &mut m.limited }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "fb", - |m: &ClientInfo| { &m.fb }, - |m: &mut ClientInfo| { &mut m.fb }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "language", - |m: &ClientInfo| { &m.language }, - |m: &mut ClientInfo| { &mut m.language }, + |m: &ClientInfo| &m.limited, + |m: &mut ClientInfo| &mut m.limited, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "fb", |m: &ClientInfo| &m.fb, |m: &mut ClientInfo| &mut m.fb + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "language", + |m: &ClientInfo| &m.language, + |m: &mut ClientInfo| &mut m.language, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientInfo", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3282,9 +3684,7 @@ impl ::protobuf::Message for ClientInfo { fn default_instance() -> &'static ClientInfo { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientInfo::new) - } + unsafe { instance.get(ClientInfo::new) } } } @@ -3309,7 +3709,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientInfoFacebook { // message fields machine_id: ::protobuf::SingularField<::std::string::String>, @@ -3331,7 +3731,6 @@ impl ClientInfoFacebook { // optional string machine_id = 1; - pub fn get_machine_id(&self) -> &str { match self.machine_id.as_ref() { Some(v) => &v, @@ -3362,7 +3761,9 @@ impl ClientInfoFacebook { // Take field pub fn take_machine_id(&mut self) -> ::std::string::String { - self.machine_id.take().unwrap_or_else(|| ::std::string::String::new()) + self.machine_id + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -3371,16 +3772,24 @@ impl ::protobuf::Message for ClientInfoFacebook { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.machine_id)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3398,7 +3807,10 @@ impl ::protobuf::Message for ClientInfoFacebook { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.machine_id.as_ref() { os.write_string(1, &v)?; } @@ -3437,29 +3849,34 @@ impl ::protobuf::Message for ClientInfoFacebook { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "machine_id", - |m: &ClientInfoFacebook| { &m.machine_id }, - |m: &mut ClientInfoFacebook| { &mut m.machine_id }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "machine_id", + |m: &ClientInfoFacebook| &m.machine_id, + |m: &mut ClientInfoFacebook| &mut m.machine_id, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientInfoFacebook", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ClientInfoFacebook { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientInfoFacebook::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ClientInfoFacebook::new) } } } @@ -3482,7 +3899,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientInfoFacebook { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct APWelcome { // message fields canonical_username: ::protobuf::SingularField<::std::string::String>, @@ -3511,7 +3928,6 @@ impl APWelcome { // required string canonical_username = 10; - pub fn get_canonical_username(&self) -> &str { match self.canonical_username.as_ref() { Some(v) => &v, @@ -3542,12 +3958,13 @@ impl APWelcome { // Take field pub fn take_canonical_username(&mut self) -> ::std::string::String { - self.canonical_username.take().unwrap_or_else(|| ::std::string::String::new()) + self.canonical_username + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // required .AccountType account_type_logged_in = 20; - pub fn get_account_type_logged_in(&self) -> AccountType { self.account_type_logged_in.unwrap_or(AccountType::Spotify) } @@ -3566,9 +3983,9 @@ impl APWelcome { // required .AccountType credentials_type_logged_in = 25; - pub fn get_credentials_type_logged_in(&self) -> AccountType { - self.credentials_type_logged_in.unwrap_or(AccountType::Spotify) + self.credentials_type_logged_in + .unwrap_or(AccountType::Spotify) } pub fn clear_credentials_type_logged_in(&mut self) { self.credentials_type_logged_in = ::std::option::Option::None; @@ -3585,9 +4002,9 @@ impl APWelcome { // required .AuthenticationType reusable_auth_credentials_type = 30; - pub fn get_reusable_auth_credentials_type(&self) -> AuthenticationType { - self.reusable_auth_credentials_type.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) + self.reusable_auth_credentials_type + .unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) } pub fn clear_reusable_auth_credentials_type(&mut self) { self.reusable_auth_credentials_type = ::std::option::Option::None; @@ -3604,7 +4021,6 @@ impl APWelcome { // required bytes reusable_auth_credentials = 40; - pub fn get_reusable_auth_credentials(&self) -> &[u8] { match self.reusable_auth_credentials.as_ref() { Some(v) => &v, @@ -3635,12 +4051,13 @@ impl APWelcome { // Take field pub fn take_reusable_auth_credentials(&mut self) -> ::std::vec::Vec { - self.reusable_auth_credentials.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.reusable_auth_credentials + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bytes lfs_secret = 50; - pub fn get_lfs_secret(&self) -> &[u8] { match self.lfs_secret.as_ref() { Some(v) => &v, @@ -3671,14 +4088,17 @@ impl APWelcome { // Take field pub fn take_lfs_secret(&mut self) -> ::std::vec::Vec { - self.lfs_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.lfs_secret + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional .AccountInfo account_info = 60; - pub fn get_account_info(&self) -> &AccountInfo { - self.account_info.as_ref().unwrap_or_else(|| AccountInfo::default_instance()) + self.account_info + .as_ref() + .unwrap_or_else(|| AccountInfo::default_instance()) } pub fn clear_account_info(&mut self) { self.account_info.clear(); @@ -3704,14 +4124,17 @@ impl APWelcome { // Take field pub fn take_account_info(&mut self) -> AccountInfo { - self.account_info.take().unwrap_or_else(|| AccountInfo::new()) + self.account_info + .take() + .unwrap_or_else(|| AccountInfo::new()) } // optional .AccountInfoFacebook fb = 70; - pub fn get_fb(&self) -> &AccountInfoFacebook { - self.fb.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) + self.fb + .as_ref() + .unwrap_or_else(|| AccountInfoFacebook::default_instance()) } pub fn clear_fb(&mut self) { self.fb.clear(); @@ -3762,46 +4185,78 @@ impl ::protobuf::Message for APWelcome { if !v.is_initialized() { return false; } - }; + } for v in &self.fb { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.canonical_username)?; - }, - 20 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.account_type_logged_in, 20, &mut self.unknown_fields)? - }, - 25 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.credentials_type_logged_in, 25, &mut self.unknown_fields)? - }, - 30 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.reusable_auth_credentials_type, 30, &mut self.unknown_fields)? - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.canonical_username, + )?; + } + 20 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.account_type_logged_in, + 20, + &mut self.unknown_fields, + )?, + 25 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.credentials_type_logged_in, + 25, + &mut self.unknown_fields, + )?, + 30 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.reusable_auth_credentials_type, + 30, + &mut self.unknown_fields, + )?, 40 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.reusable_auth_credentials)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.reusable_auth_credentials, + )?; + } 50 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.lfs_secret)?; - }, + } 60 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_info)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.account_info, + )?; + } 70 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fb)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3842,7 +4297,10 @@ impl ::protobuf::Message for APWelcome { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.canonical_username.as_ref() { os.write_string(10, &v)?; } @@ -3906,54 +4364,87 @@ impl ::protobuf::Message for APWelcome { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "canonical_username", - |m: &APWelcome| { &m.canonical_username }, - |m: &mut APWelcome| { &mut m.canonical_username }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "canonical_username", + |m: &APWelcome| &m.canonical_username, + |m: &mut APWelcome| &mut m.canonical_username, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "account_type_logged_in", - |m: &APWelcome| { &m.account_type_logged_in }, - |m: &mut APWelcome| { &mut m.account_type_logged_in }, + |m: &APWelcome| &m.account_type_logged_in, + |m: &mut APWelcome| &mut m.account_type_logged_in, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "credentials_type_logged_in", - |m: &APWelcome| { &m.credentials_type_logged_in }, - |m: &mut APWelcome| { &mut m.credentials_type_logged_in }, + |m: &APWelcome| &m.credentials_type_logged_in, + |m: &mut APWelcome| &mut m.credentials_type_logged_in, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "reusable_auth_credentials_type", - |m: &APWelcome| { &m.reusable_auth_credentials_type }, - |m: &mut APWelcome| { &mut m.reusable_auth_credentials_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "reusable_auth_credentials", - |m: &APWelcome| { &m.reusable_auth_credentials }, - |m: &mut APWelcome| { &mut m.reusable_auth_credentials }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "lfs_secret", - |m: &APWelcome| { &m.lfs_secret }, - |m: &mut APWelcome| { &mut m.lfs_secret }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "account_info", - |m: &APWelcome| { &m.account_info }, - |m: &mut APWelcome| { &mut m.account_info }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "fb", - |m: &APWelcome| { &m.fb }, - |m: &mut APWelcome| { &mut m.fb }, + |m: &APWelcome| &m.reusable_auth_credentials_type, + |m: &mut APWelcome| &mut m.reusable_auth_credentials_type, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "reusable_auth_credentials", + |m: &APWelcome| &m.reusable_auth_credentials, + |m: &mut APWelcome| &mut m.reusable_auth_credentials, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "lfs_secret", + |m: &APWelcome| &m.lfs_secret, + |m: &mut APWelcome| &mut m.lfs_secret, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "account_info", + |m: &APWelcome| &m.account_info, + |m: &mut APWelcome| &mut m.account_info, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "fb", |m: &APWelcome| &m.fb, |m: &mut APWelcome| &mut m.fb + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "APWelcome", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3961,9 +4452,7 @@ impl ::protobuf::Message for APWelcome { fn default_instance() -> &'static APWelcome { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(APWelcome::new) - } + unsafe { instance.get(APWelcome::new) } } } @@ -3993,7 +4482,7 @@ impl ::protobuf::reflect::ProtobufValue for APWelcome { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct AccountInfo { // message fields spotify: ::protobuf::SingularPtrField, @@ -4016,9 +4505,10 @@ impl AccountInfo { // optional .AccountInfoSpotify spotify = 1; - pub fn get_spotify(&self) -> &AccountInfoSpotify { - self.spotify.as_ref().unwrap_or_else(|| AccountInfoSpotify::default_instance()) + self.spotify + .as_ref() + .unwrap_or_else(|| AccountInfoSpotify::default_instance()) } pub fn clear_spotify(&mut self) { self.spotify.clear(); @@ -4044,14 +4534,17 @@ impl AccountInfo { // Take field pub fn take_spotify(&mut self) -> AccountInfoSpotify { - self.spotify.take().unwrap_or_else(|| AccountInfoSpotify::new()) + self.spotify + .take() + .unwrap_or_else(|| AccountInfoSpotify::new()) } // optional .AccountInfoFacebook facebook = 2; - pub fn get_facebook(&self) -> &AccountInfoFacebook { - self.facebook.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) + self.facebook + .as_ref() + .unwrap_or_else(|| AccountInfoFacebook::default_instance()) } pub fn clear_facebook(&mut self) { self.facebook.clear(); @@ -4077,7 +4570,9 @@ impl AccountInfo { // Take field pub fn take_facebook(&mut self) -> AccountInfoFacebook { - self.facebook.take().unwrap_or_else(|| AccountInfoFacebook::new()) + self.facebook + .take() + .unwrap_or_else(|| AccountInfoFacebook::new()) } } @@ -4087,28 +4582,36 @@ impl ::protobuf::Message for AccountInfo { if !v.is_initialized() { return false; } - }; + } for v in &self.facebook { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.spotify)?; - }, + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.facebook)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4131,7 +4634,10 @@ impl ::protobuf::Message for AccountInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.spotify.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -4177,24 +4683,35 @@ impl ::protobuf::Message for AccountInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "spotify", - |m: &AccountInfo| { &m.spotify }, - |m: &mut AccountInfo| { &mut m.spotify }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "facebook", - |m: &AccountInfo| { &m.facebook }, - |m: &mut AccountInfo| { &mut m.facebook }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "spotify", + |m: &AccountInfo| &m.spotify, + |m: &mut AccountInfo| &mut m.spotify, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "facebook", + |m: &AccountInfo| &m.facebook, + |m: &mut AccountInfo| &mut m.facebook, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "AccountInfo", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -4202,9 +4719,7 @@ impl ::protobuf::Message for AccountInfo { fn default_instance() -> &'static AccountInfo { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(AccountInfo::new) - } + unsafe { instance.get(AccountInfo::new) } } } @@ -4228,7 +4743,7 @@ impl ::protobuf::reflect::ProtobufValue for AccountInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct AccountInfoSpotify { // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -4252,13 +4767,21 @@ impl ::protobuf::Message for AccountInfoSpotify { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4273,7 +4796,10 @@ impl ::protobuf::Message for AccountInfoSpotify { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4309,24 +4835,24 @@ impl ::protobuf::Message for AccountInfoSpotify { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let fields = ::std::vec::Vec::new(); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "AccountInfoSpotify", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static AccountInfoSpotify { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(AccountInfoSpotify::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(AccountInfoSpotify::new) } } } @@ -4348,7 +4874,7 @@ impl ::protobuf::reflect::ProtobufValue for AccountInfoSpotify { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct AccountInfoFacebook { // message fields access_token: ::protobuf::SingularField<::std::string::String>, @@ -4371,7 +4897,6 @@ impl AccountInfoFacebook { // optional string access_token = 1; - pub fn get_access_token(&self) -> &str { match self.access_token.as_ref() { Some(v) => &v, @@ -4402,12 +4927,13 @@ impl AccountInfoFacebook { // Take field pub fn take_access_token(&mut self) -> ::std::string::String { - self.access_token.take().unwrap_or_else(|| ::std::string::String::new()) + self.access_token + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string machine_id = 2; - pub fn get_machine_id(&self) -> &str { match self.machine_id.as_ref() { Some(v) => &v, @@ -4438,7 +4964,9 @@ impl AccountInfoFacebook { // Take field pub fn take_machine_id(&mut self) -> ::std::string::String { - self.machine_id.take().unwrap_or_else(|| ::std::string::String::new()) + self.machine_id + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -4447,19 +4975,31 @@ impl ::protobuf::Message for AccountInfoFacebook { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.access_token)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.access_token, + )?; + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.machine_id)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4480,7 +5020,10 @@ impl ::protobuf::Message for AccountInfoFacebook { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.access_token.as_ref() { os.write_string(1, &v)?; } @@ -4522,34 +5065,44 @@ impl ::protobuf::Message for AccountInfoFacebook { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "access_token", - |m: &AccountInfoFacebook| { &m.access_token }, - |m: &mut AccountInfoFacebook| { &mut m.access_token }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "machine_id", - |m: &AccountInfoFacebook| { &m.machine_id }, - |m: &mut AccountInfoFacebook| { &mut m.machine_id }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "access_token", + |m: &AccountInfoFacebook| &m.access_token, + |m: &mut AccountInfoFacebook| &mut m.access_token, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "machine_id", + |m: &AccountInfoFacebook| &m.machine_id, + |m: &mut AccountInfoFacebook| &mut m.machine_id, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "AccountInfoFacebook", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static AccountInfoFacebook { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(AccountInfoFacebook::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(AccountInfoFacebook::new) } } } @@ -4573,7 +5126,7 @@ impl ::protobuf::reflect::ProtobufValue for AccountInfoFacebook { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum AuthenticationType { AUTHENTICATION_USER_PASS = 0, AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS = 1, @@ -4590,11 +5143,15 @@ impl ::protobuf::ProtobufEnum for AuthenticationType { fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_USER_PASS), - 1 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS), - 2 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS), + 1 => ::std::option::Option::Some( + AuthenticationType::AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS, + ), + 2 => ::std::option::Option::Some( + AuthenticationType::AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS, + ), 3 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_SPOTIFY_TOKEN), 4 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_FACEBOOK_TOKEN), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -4610,17 +5167,20 @@ impl ::protobuf::ProtobufEnum for AuthenticationType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("AuthenticationType", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "AuthenticationType", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for AuthenticationType { -} +impl ::std::marker::Copy for AuthenticationType {} impl ::std::default::Default for AuthenticationType { fn default() -> Self { @@ -4634,7 +5194,7 @@ impl ::protobuf::reflect::ProtobufValue for AuthenticationType { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum AccountCreation { ACCOUNT_CREATION_ALWAYS_PROMPT = 1, ACCOUNT_CREATION_ALWAYS_CREATE = 3, @@ -4649,7 +5209,7 @@ impl ::protobuf::ProtobufEnum for AccountCreation { match value { 1 => ::std::option::Option::Some(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT), 3 => ::std::option::Option::Some(AccountCreation::ACCOUNT_CREATION_ALWAYS_CREATE), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -4662,17 +5222,20 @@ impl ::protobuf::ProtobufEnum for AccountCreation { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("AccountCreation", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "AccountCreation", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for AccountCreation { -} +impl ::std::marker::Copy for AccountCreation {} // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for AccountCreation { @@ -4687,7 +5250,7 @@ impl ::protobuf::reflect::ProtobufValue for AccountCreation { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum CpuFamily { CPU_UNKNOWN = 0, CPU_X86 = 1, @@ -4718,7 +5281,7 @@ impl ::protobuf::ProtobufEnum for CpuFamily { 7 => ::std::option::Option::Some(CpuFamily::CPU_SH), 8 => ::std::option::Option::Some(CpuFamily::CPU_MIPS), 9 => ::std::option::Option::Some(CpuFamily::CPU_BLACKFIN), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -4739,17 +5302,20 @@ impl ::protobuf::ProtobufEnum for CpuFamily { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("CpuFamily", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "CpuFamily", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for CpuFamily { -} +impl ::std::marker::Copy for CpuFamily {} impl ::std::default::Default for CpuFamily { fn default() -> Self { @@ -4763,7 +5329,7 @@ impl ::protobuf::reflect::ProtobufValue for CpuFamily { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Brand { BRAND_UNBRANDED = 0, BRAND_INQ = 1, @@ -4782,7 +5348,7 @@ impl ::protobuf::ProtobufEnum for Brand { 1 => ::std::option::Option::Some(Brand::BRAND_INQ), 2 => ::std::option::Option::Some(Brand::BRAND_HTC), 3 => ::std::option::Option::Some(Brand::BRAND_NOKIA), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -4797,17 +5363,20 @@ impl ::protobuf::ProtobufEnum for Brand { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Brand", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Brand", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Brand { -} +impl ::std::marker::Copy for Brand {} impl ::std::default::Default for Brand { fn default() -> Self { @@ -4821,7 +5390,7 @@ impl ::protobuf::reflect::ProtobufValue for Brand { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Os { OS_UNKNOWN = 0, OS_WINDOWS = 1, @@ -4878,7 +5447,7 @@ impl ::protobuf::ProtobufEnum for Os { 20 => ::std::option::Option::Some(Os::OS_MEEGO), 21 => ::std::option::Option::Some(Os::OS_QNXNTO), 22 => ::std::option::Option::Some(Os::OS_BCO), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -4912,17 +5481,20 @@ impl ::protobuf::ProtobufEnum for Os { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Os", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Os", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Os { -} +impl ::std::marker::Copy for Os {} impl ::std::default::Default for Os { fn default() -> Self { @@ -4936,7 +5508,7 @@ impl ::protobuf::reflect::ProtobufValue for Os { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum AccountType { Spotify = 0, Facebook = 1, @@ -4951,30 +5523,30 @@ impl ::protobuf::ProtobufEnum for AccountType { match value { 0 => ::std::option::Option::Some(AccountType::Spotify), 1 => ::std::option::Option::Some(AccountType::Facebook), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } fn values() -> &'static [Self] { - static values: &'static [AccountType] = &[ - AccountType::Spotify, - AccountType::Facebook, - ]; + static values: &'static [AccountType] = &[AccountType::Spotify, AccountType::Facebook]; values } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("AccountType", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "AccountType", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for AccountType { -} +impl ::std::marker::Copy for AccountType {} impl ::std::default::Default for AccountType { fn default() -> Self { @@ -5062,16 +5634,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x10\0\x12\x0c\n\x08Facebook\x10\x01\x1a\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/keyexchange.rs b/protocol/src/keyexchange.rs index cfe1aec3..7b1b294b 100644 --- a/protocol/src/keyexchange.rs +++ b/protocol/src/keyexchange.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientHello { // message fields build_info: ::protobuf::SingularPtrField, @@ -55,9 +55,10 @@ impl ClientHello { // required .BuildInfo build_info = 10; - pub fn get_build_info(&self) -> &BuildInfo { - self.build_info.as_ref().unwrap_or_else(|| BuildInfo::default_instance()) + self.build_info + .as_ref() + .unwrap_or_else(|| BuildInfo::default_instance()) } pub fn clear_build_info(&mut self) { self.build_info.clear(); @@ -88,7 +89,6 @@ impl ClientHello { // repeated .Fingerprint fingerprints_supported = 20; - pub fn get_fingerprints_supported(&self) -> &[Fingerprint] { &self.fingerprints_supported } @@ -113,7 +113,6 @@ impl ClientHello { // repeated .Cryptosuite cryptosuites_supported = 30; - pub fn get_cryptosuites_supported(&self) -> &[Cryptosuite] { &self.cryptosuites_supported } @@ -138,7 +137,6 @@ impl ClientHello { // repeated .Powscheme powschemes_supported = 40; - pub fn get_powschemes_supported(&self) -> &[Powscheme] { &self.powschemes_supported } @@ -163,9 +161,10 @@ impl ClientHello { // required .LoginCryptoHelloUnion login_crypto_hello = 50; - pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion { - self.login_crypto_hello.as_ref().unwrap_or_else(|| LoginCryptoHelloUnion::default_instance()) + self.login_crypto_hello + .as_ref() + .unwrap_or_else(|| LoginCryptoHelloUnion::default_instance()) } pub fn clear_login_crypto_hello(&mut self) { self.login_crypto_hello.clear(); @@ -191,12 +190,13 @@ impl ClientHello { // Take field pub fn take_login_crypto_hello(&mut self) -> LoginCryptoHelloUnion { - self.login_crypto_hello.take().unwrap_or_else(|| LoginCryptoHelloUnion::new()) + self.login_crypto_hello + .take() + .unwrap_or_else(|| LoginCryptoHelloUnion::new()) } // required bytes client_nonce = 60; - pub fn get_client_nonce(&self) -> &[u8] { match self.client_nonce.as_ref() { Some(v) => &v, @@ -227,12 +227,13 @@ impl ClientHello { // Take field pub fn take_client_nonce(&mut self) -> ::std::vec::Vec { - self.client_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.client_nonce + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bytes padding = 70; - pub fn get_padding(&self) -> &[u8] { match self.padding.as_ref() { Some(v) => &v, @@ -263,14 +264,17 @@ impl ClientHello { // Take field pub fn take_padding(&mut self) -> ::std::vec::Vec { - self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.padding + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional .FeatureSet feature_set = 80; - pub fn get_feature_set(&self) -> &FeatureSet { - self.feature_set.as_ref().unwrap_or_else(|| FeatureSet::default_instance()) + self.feature_set + .as_ref() + .unwrap_or_else(|| FeatureSet::default_instance()) } pub fn clear_feature_set(&mut self) { self.feature_set.clear(); @@ -315,51 +319,87 @@ impl ::protobuf::Message for ClientHello { if !v.is_initialized() { return false; } - }; + } for v in &self.login_crypto_hello { if !v.is_initialized() { return false; } - }; + } for v in &self.feature_set { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.build_info)?; - }, - 20 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.fingerprints_supported, 20, &mut self.unknown_fields)? - }, - 30 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.cryptosuites_supported, 30, &mut self.unknown_fields)? - }, - 40 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.powschemes_supported, 40, &mut self.unknown_fields)? - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.build_info, + )?; + } + 20 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.fingerprints_supported, + 20, + &mut self.unknown_fields, + )?, + 30 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.cryptosuites_supported, + 30, + &mut self.unknown_fields, + )?, + 40 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.powschemes_supported, + 40, + &mut self.unknown_fields, + )?, 50 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_crypto_hello)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.login_crypto_hello, + )?; + } 60 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.client_nonce)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.client_nonce, + )?; + } 70 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?; - }, + } 80 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.feature_set)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.feature_set, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -375,13 +415,13 @@ impl ::protobuf::Message for ClientHello { } for value in &self.fingerprints_supported { my_size += ::protobuf::rt::enum_size(20, *value); - }; + } for value in &self.cryptosuites_supported { my_size += ::protobuf::rt::enum_size(30, *value); - }; + } for value in &self.powschemes_supported { my_size += ::protobuf::rt::enum_size(40, *value); - }; + } if let Some(ref v) = self.login_crypto_hello.as_ref() { let len = v.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -401,7 +441,10 @@ impl ::protobuf::Message for ClientHello { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.build_info.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -409,13 +452,13 @@ impl ::protobuf::Message for ClientHello { } for v in &self.fingerprints_supported { os.write_enum(20, v.value())?; - }; + } for v in &self.cryptosuites_supported { os.write_enum(30, v.value())?; - }; + } for v in &self.powschemes_supported { os.write_enum(40, v.value())?; - }; + } if let Some(ref v) = self.login_crypto_hello.as_ref() { os.write_tag(50, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -467,54 +510,89 @@ impl ::protobuf::Message for ClientHello { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "build_info", - |m: &ClientHello| { &m.build_info }, - |m: &mut ClientHello| { &mut m.build_info }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "build_info", + |m: &ClientHello| &m.build_info, + |m: &mut ClientHello| &mut m.build_info, + ), + ); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "fingerprints_supported", - |m: &ClientHello| { &m.fingerprints_supported }, - |m: &mut ClientHello| { &mut m.fingerprints_supported }, + |m: &ClientHello| &m.fingerprints_supported, + |m: &mut ClientHello| &mut m.fingerprints_supported, )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "cryptosuites_supported", - |m: &ClientHello| { &m.cryptosuites_supported }, - |m: &mut ClientHello| { &mut m.cryptosuites_supported }, + |m: &ClientHello| &m.cryptosuites_supported, + |m: &mut ClientHello| &mut m.cryptosuites_supported, )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "powschemes_supported", - |m: &ClientHello| { &m.powschemes_supported }, - |m: &mut ClientHello| { &mut m.powschemes_supported }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "login_crypto_hello", - |m: &ClientHello| { &m.login_crypto_hello }, - |m: &mut ClientHello| { &mut m.login_crypto_hello }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "client_nonce", - |m: &ClientHello| { &m.client_nonce }, - |m: &mut ClientHello| { &mut m.client_nonce }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "padding", - |m: &ClientHello| { &m.padding }, - |m: &mut ClientHello| { &mut m.padding }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "feature_set", - |m: &ClientHello| { &m.feature_set }, - |m: &mut ClientHello| { &mut m.feature_set }, + |m: &ClientHello| &m.powschemes_supported, + |m: &mut ClientHello| &mut m.powschemes_supported, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "login_crypto_hello", + |m: &ClientHello| &m.login_crypto_hello, + |m: &mut ClientHello| &mut m.login_crypto_hello, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "client_nonce", + |m: &ClientHello| &m.client_nonce, + |m: &mut ClientHello| &mut m.client_nonce, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "padding", + |m: &ClientHello| &m.padding, + |m: &mut ClientHello| &mut m.padding, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "feature_set", + |m: &ClientHello| &m.feature_set, + |m: &mut ClientHello| &mut m.feature_set, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientHello", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -522,9 +600,7 @@ impl ::protobuf::Message for ClientHello { fn default_instance() -> &'static ClientHello { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientHello::new) - } + unsafe { instance.get(ClientHello::new) } } } @@ -554,7 +630,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientHello { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct BuildInfo { // message fields product: ::std::option::Option, @@ -579,7 +655,6 @@ impl BuildInfo { // required .Product product = 10; - pub fn get_product(&self) -> Product { self.product.unwrap_or(Product::PRODUCT_CLIENT) } @@ -598,7 +673,6 @@ impl BuildInfo { // repeated .ProductFlags product_flags = 20; - pub fn get_product_flags(&self) -> &[ProductFlags] { &self.product_flags } @@ -623,7 +697,6 @@ impl BuildInfo { // required .Platform platform = 30; - pub fn get_platform(&self) -> Platform { self.platform.unwrap_or(Platform::PLATFORM_WIN32_X86) } @@ -642,7 +715,6 @@ impl BuildInfo { // required uint64 version = 40; - pub fn get_version(&self) -> u64 { self.version.unwrap_or(0) } @@ -674,29 +746,51 @@ impl ::protobuf::Message for BuildInfo { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 10 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.product, 10, &mut self.unknown_fields)? - }, - 20 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.product_flags, 20, &mut self.unknown_fields)? - }, - 30 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.platform, 30, &mut self.unknown_fields)? - }, + 10 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.product, + 10, + &mut self.unknown_fields, + )?, + 20 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.product_flags, + 20, + &mut self.unknown_fields, + )?, + 30 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.platform, + 30, + &mut self.unknown_fields, + )?, 40 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.version = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -711,7 +805,7 @@ impl ::protobuf::Message for BuildInfo { } for value in &self.product_flags { my_size += ::protobuf::rt::enum_size(20, *value); - }; + } if let Some(v) = self.platform { my_size += ::protobuf::rt::enum_size(30, v); } @@ -723,13 +817,16 @@ impl ::protobuf::Message for BuildInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.product { os.write_enum(10, v.value())?; } for v in &self.product_flags { os.write_enum(20, v.value())?; - }; + } if let Some(v) = self.platform { os.write_enum(30, v.value())?; } @@ -771,34 +868,47 @@ impl ::protobuf::Message for BuildInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "product", - |m: &BuildInfo| { &m.product }, - |m: &mut BuildInfo| { &mut m.product }, + |m: &BuildInfo| &m.product, + |m: &mut BuildInfo| &mut m.product, )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "product_flags", - |m: &BuildInfo| { &m.product_flags }, - |m: &mut BuildInfo| { &mut m.product_flags }, + |m: &BuildInfo| &m.product_flags, + |m: &mut BuildInfo| &mut m.product_flags, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "platform", - |m: &BuildInfo| { &m.platform }, - |m: &mut BuildInfo| { &mut m.platform }, + |m: &BuildInfo| &m.platform, + |m: &mut BuildInfo| &mut m.platform, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint64, + >( "version", - |m: &BuildInfo| { &m.version }, - |m: &mut BuildInfo| { &mut m.version }, + |m: &BuildInfo| &m.version, + |m: &mut BuildInfo| &mut m.version, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "BuildInfo", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -806,9 +916,7 @@ impl ::protobuf::Message for BuildInfo { fn default_instance() -> &'static BuildInfo { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(BuildInfo::new) - } + unsafe { instance.get(BuildInfo::new) } } } @@ -834,7 +942,7 @@ impl ::protobuf::reflect::ProtobufValue for BuildInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCryptoHelloUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, @@ -856,9 +964,10 @@ impl LoginCryptoHelloUnion { // optional .LoginCryptoDiffieHellmanHello diffie_hellman = 10; - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance()) + self.diffie_hellman + .as_ref() + .unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance()) } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); @@ -884,7 +993,9 @@ impl LoginCryptoHelloUnion { // Take field pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanHello { - self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::new()) + self.diffie_hellman + .take() + .unwrap_or_else(|| LoginCryptoDiffieHellmanHello::new()) } } @@ -894,20 +1005,32 @@ impl ::protobuf::Message for LoginCryptoHelloUnion { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diffie_hellman)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.diffie_hellman, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -926,7 +1049,10 @@ impl ::protobuf::Message for LoginCryptoHelloUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.diffie_hellman.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -967,29 +1093,34 @@ impl ::protobuf::Message for LoginCryptoHelloUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "diffie_hellman", - |m: &LoginCryptoHelloUnion| { &m.diffie_hellman }, - |m: &mut LoginCryptoHelloUnion| { &mut m.diffie_hellman }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "diffie_hellman", + |m: &LoginCryptoHelloUnion| &m.diffie_hellman, + |m: &mut LoginCryptoHelloUnion| &mut m.diffie_hellman, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "LoginCryptoHelloUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LoginCryptoHelloUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCryptoHelloUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCryptoHelloUnion::new) } } } @@ -1012,7 +1143,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCryptoHelloUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCryptoDiffieHellmanHello { // message fields gc: ::protobuf::SingularField<::std::vec::Vec>, @@ -1035,7 +1166,6 @@ impl LoginCryptoDiffieHellmanHello { // required bytes gc = 10; - pub fn get_gc(&self) -> &[u8] { match self.gc.as_ref() { Some(v) => &v, @@ -1071,7 +1201,6 @@ impl LoginCryptoDiffieHellmanHello { // required uint32 server_keys_known = 20; - pub fn get_server_keys_known(&self) -> u32 { self.server_keys_known.unwrap_or(0) } @@ -1100,23 +1229,33 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gc)?; - }, + } 20 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.server_keys_known = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1137,7 +1276,10 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gc.as_ref() { os.write_bytes(10, &v)?; } @@ -1179,7 +1321,8 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); @@ -1203,10 +1346,9 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { } fn default_instance() -> &'static LoginCryptoDiffieHellmanHello { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCryptoDiffieHellmanHello::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCryptoDiffieHellmanHello::new) } } } @@ -1230,7 +1372,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanHello { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FeatureSet { // message fields autoupdate2: ::std::option::Option, @@ -1253,7 +1395,6 @@ impl FeatureSet { // optional bool autoupdate2 = 1; - pub fn get_autoupdate2(&self) -> bool { self.autoupdate2.unwrap_or(false) } @@ -1272,7 +1413,6 @@ impl FeatureSet { // optional bool current_location = 2; - pub fn get_current_location(&self) -> bool { self.current_location.unwrap_or(false) } @@ -1295,27 +1435,39 @@ impl ::protobuf::Message for FeatureSet { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.autoupdate2 = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.current_location = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1336,7 +1488,10 @@ impl ::protobuf::Message for FeatureSet { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.autoupdate2 { os.write_bool(1, v)?; } @@ -1378,24 +1533,31 @@ impl ::protobuf::Message for FeatureSet { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "autoupdate2", - |m: &FeatureSet| { &m.autoupdate2 }, - |m: &mut FeatureSet| { &mut m.autoupdate2 }, + |m: &FeatureSet| &m.autoupdate2, + |m: &mut FeatureSet| &mut m.autoupdate2, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "current_location", - |m: &FeatureSet| { &m.current_location }, - |m: &mut FeatureSet| { &mut m.current_location }, + |m: &FeatureSet| &m.current_location, + |m: &mut FeatureSet| &mut m.current_location, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "FeatureSet", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1403,9 +1565,7 @@ impl ::protobuf::Message for FeatureSet { fn default_instance() -> &'static FeatureSet { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FeatureSet::new) - } + unsafe { instance.get(FeatureSet::new) } } } @@ -1429,7 +1589,7 @@ impl ::protobuf::reflect::ProtobufValue for FeatureSet { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct APResponseMessage { // message fields challenge: ::protobuf::SingularPtrField, @@ -1453,9 +1613,10 @@ impl APResponseMessage { // optional .APChallenge challenge = 10; - pub fn get_challenge(&self) -> &APChallenge { - self.challenge.as_ref().unwrap_or_else(|| APChallenge::default_instance()) + self.challenge + .as_ref() + .unwrap_or_else(|| APChallenge::default_instance()) } pub fn clear_challenge(&mut self) { self.challenge.clear(); @@ -1486,9 +1647,10 @@ impl APResponseMessage { // optional .UpgradeRequiredMessage upgrade = 20; - pub fn get_upgrade(&self) -> &UpgradeRequiredMessage { - self.upgrade.as_ref().unwrap_or_else(|| UpgradeRequiredMessage::default_instance()) + self.upgrade + .as_ref() + .unwrap_or_else(|| UpgradeRequiredMessage::default_instance()) } pub fn clear_upgrade(&mut self) { self.upgrade.clear(); @@ -1514,14 +1676,17 @@ impl APResponseMessage { // Take field pub fn take_upgrade(&mut self) -> UpgradeRequiredMessage { - self.upgrade.take().unwrap_or_else(|| UpgradeRequiredMessage::new()) + self.upgrade + .take() + .unwrap_or_else(|| UpgradeRequiredMessage::new()) } // optional .APLoginFailed login_failed = 30; - pub fn get_login_failed(&self) -> &APLoginFailed { - self.login_failed.as_ref().unwrap_or_else(|| APLoginFailed::default_instance()) + self.login_failed + .as_ref() + .unwrap_or_else(|| APLoginFailed::default_instance()) } pub fn clear_login_failed(&mut self) { self.login_failed.clear(); @@ -1547,7 +1712,9 @@ impl APResponseMessage { // Take field pub fn take_login_failed(&mut self) -> APLoginFailed { - self.login_failed.take().unwrap_or_else(|| APLoginFailed::new()) + self.login_failed + .take() + .unwrap_or_else(|| APLoginFailed::new()) } } @@ -1557,36 +1724,48 @@ impl ::protobuf::Message for APResponseMessage { if !v.is_initialized() { return false; } - }; + } for v in &self.upgrade { if !v.is_initialized() { return false; } - }; + } for v in &self.login_failed { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.challenge)?; - }, + } 20 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.upgrade)?; - }, + } 30 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_failed)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.login_failed, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1613,7 +1792,10 @@ impl ::protobuf::Message for APResponseMessage { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.challenge.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1664,39 +1846,54 @@ impl ::protobuf::Message for APResponseMessage { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "challenge", - |m: &APResponseMessage| { &m.challenge }, - |m: &mut APResponseMessage| { &mut m.challenge }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "upgrade", - |m: &APResponseMessage| { &m.upgrade }, - |m: &mut APResponseMessage| { &mut m.upgrade }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "login_failed", - |m: &APResponseMessage| { &m.login_failed }, - |m: &mut APResponseMessage| { &mut m.login_failed }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "challenge", + |m: &APResponseMessage| &m.challenge, + |m: &mut APResponseMessage| &mut m.challenge, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "upgrade", + |m: &APResponseMessage| &m.upgrade, + |m: &mut APResponseMessage| &mut m.upgrade, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "login_failed", + |m: &APResponseMessage| &m.login_failed, + |m: &mut APResponseMessage| &mut m.login_failed, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "APResponseMessage", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static APResponseMessage { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(APResponseMessage::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(APResponseMessage::new) } } } @@ -1721,7 +1918,7 @@ impl ::protobuf::reflect::ProtobufValue for APResponseMessage { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct APChallenge { // message fields login_crypto_challenge: ::protobuf::SingularPtrField, @@ -1748,9 +1945,10 @@ impl APChallenge { // required .LoginCryptoChallengeUnion login_crypto_challenge = 10; - pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion { - self.login_crypto_challenge.as_ref().unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance()) + self.login_crypto_challenge + .as_ref() + .unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance()) } pub fn clear_login_crypto_challenge(&mut self) { self.login_crypto_challenge.clear(); @@ -1776,14 +1974,17 @@ impl APChallenge { // Take field pub fn take_login_crypto_challenge(&mut self) -> LoginCryptoChallengeUnion { - self.login_crypto_challenge.take().unwrap_or_else(|| LoginCryptoChallengeUnion::new()) + self.login_crypto_challenge + .take() + .unwrap_or_else(|| LoginCryptoChallengeUnion::new()) } // required .FingerprintChallengeUnion fingerprint_challenge = 20; - pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion { - self.fingerprint_challenge.as_ref().unwrap_or_else(|| FingerprintChallengeUnion::default_instance()) + self.fingerprint_challenge + .as_ref() + .unwrap_or_else(|| FingerprintChallengeUnion::default_instance()) } pub fn clear_fingerprint_challenge(&mut self) { self.fingerprint_challenge.clear(); @@ -1809,14 +2010,17 @@ impl APChallenge { // Take field pub fn take_fingerprint_challenge(&mut self) -> FingerprintChallengeUnion { - self.fingerprint_challenge.take().unwrap_or_else(|| FingerprintChallengeUnion::new()) + self.fingerprint_challenge + .take() + .unwrap_or_else(|| FingerprintChallengeUnion::new()) } // required .PoWChallengeUnion pow_challenge = 30; - pub fn get_pow_challenge(&self) -> &PoWChallengeUnion { - self.pow_challenge.as_ref().unwrap_or_else(|| PoWChallengeUnion::default_instance()) + self.pow_challenge + .as_ref() + .unwrap_or_else(|| PoWChallengeUnion::default_instance()) } pub fn clear_pow_challenge(&mut self) { self.pow_challenge.clear(); @@ -1842,14 +2046,17 @@ impl APChallenge { // Take field pub fn take_pow_challenge(&mut self) -> PoWChallengeUnion { - self.pow_challenge.take().unwrap_or_else(|| PoWChallengeUnion::new()) + self.pow_challenge + .take() + .unwrap_or_else(|| PoWChallengeUnion::new()) } // required .CryptoChallengeUnion crypto_challenge = 40; - pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion { - self.crypto_challenge.as_ref().unwrap_or_else(|| CryptoChallengeUnion::default_instance()) + self.crypto_challenge + .as_ref() + .unwrap_or_else(|| CryptoChallengeUnion::default_instance()) } pub fn clear_crypto_challenge(&mut self) { self.crypto_challenge.clear(); @@ -1875,12 +2082,13 @@ impl APChallenge { // Take field pub fn take_crypto_challenge(&mut self) -> CryptoChallengeUnion { - self.crypto_challenge.take().unwrap_or_else(|| CryptoChallengeUnion::new()) + self.crypto_challenge + .take() + .unwrap_or_else(|| CryptoChallengeUnion::new()) } // required bytes server_nonce = 50; - pub fn get_server_nonce(&self) -> &[u8] { match self.server_nonce.as_ref() { Some(v) => &v, @@ -1911,12 +2119,13 @@ impl APChallenge { // Take field pub fn take_server_nonce(&mut self) -> ::std::vec::Vec { - self.server_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.server_nonce + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bytes padding = 60; - pub fn get_padding(&self) -> &[u8] { match self.padding.as_ref() { Some(v) => &v, @@ -1947,7 +2156,9 @@ impl APChallenge { // Take field pub fn take_padding(&mut self) -> ::std::vec::Vec { - self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.padding + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -1972,50 +2183,78 @@ impl ::protobuf::Message for APChallenge { if !v.is_initialized() { return false; } - }; + } for v in &self.fingerprint_challenge { if !v.is_initialized() { return false; } - }; + } for v in &self.pow_challenge { if !v.is_initialized() { return false; } - }; + } for v in &self.crypto_challenge { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_crypto_challenge)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.login_crypto_challenge, + )?; + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fingerprint_challenge)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.fingerprint_challenge, + )?; + } 30 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pow_challenge)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.pow_challenge, + )?; + } 40 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.crypto_challenge)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.crypto_challenge, + )?; + } 50 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.server_nonce)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.server_nonce, + )?; + } 60 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2052,7 +2291,10 @@ impl ::protobuf::Message for APChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.login_crypto_challenge.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2114,44 +2356,75 @@ impl ::protobuf::Message for APChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "login_crypto_challenge", - |m: &APChallenge| { &m.login_crypto_challenge }, - |m: &mut APChallenge| { &mut m.login_crypto_challenge }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "fingerprint_challenge", - |m: &APChallenge| { &m.fingerprint_challenge }, - |m: &mut APChallenge| { &mut m.fingerprint_challenge }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pow_challenge", - |m: &APChallenge| { &m.pow_challenge }, - |m: &mut APChallenge| { &mut m.pow_challenge }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "crypto_challenge", - |m: &APChallenge| { &m.crypto_challenge }, - |m: &mut APChallenge| { &mut m.crypto_challenge }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "server_nonce", - |m: &APChallenge| { &m.server_nonce }, - |m: &mut APChallenge| { &mut m.server_nonce }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "padding", - |m: &APChallenge| { &m.padding }, - |m: &mut APChallenge| { &mut m.padding }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "login_crypto_challenge", + |m: &APChallenge| &m.login_crypto_challenge, + |m: &mut APChallenge| &mut m.login_crypto_challenge, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "fingerprint_challenge", + |m: &APChallenge| &m.fingerprint_challenge, + |m: &mut APChallenge| &mut m.fingerprint_challenge, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "pow_challenge", + |m: &APChallenge| &m.pow_challenge, + |m: &mut APChallenge| &mut m.pow_challenge, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "crypto_challenge", + |m: &APChallenge| &m.crypto_challenge, + |m: &mut APChallenge| &mut m.crypto_challenge, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "server_nonce", + |m: &APChallenge| &m.server_nonce, + |m: &mut APChallenge| &mut m.server_nonce, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "padding", + |m: &APChallenge| &m.padding, + |m: &mut APChallenge| &mut m.padding, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "APChallenge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2159,9 +2432,7 @@ impl ::protobuf::Message for APChallenge { fn default_instance() -> &'static APChallenge { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(APChallenge::new) - } + unsafe { instance.get(APChallenge::new) } } } @@ -2189,7 +2460,7 @@ impl ::protobuf::reflect::ProtobufValue for APChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCryptoChallengeUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, @@ -2211,9 +2482,10 @@ impl LoginCryptoChallengeUnion { // optional .LoginCryptoDiffieHellmanChallenge diffie_hellman = 10; - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance()) + self.diffie_hellman + .as_ref() + .unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance()) } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); @@ -2239,7 +2511,9 @@ impl LoginCryptoChallengeUnion { // Take field pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanChallenge { - self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::new()) + self.diffie_hellman + .take() + .unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::new()) } } @@ -2249,20 +2523,32 @@ impl ::protobuf::Message for LoginCryptoChallengeUnion { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diffie_hellman)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.diffie_hellman, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2281,7 +2567,10 @@ impl ::protobuf::Message for LoginCryptoChallengeUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.diffie_hellman.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2322,29 +2611,34 @@ impl ::protobuf::Message for LoginCryptoChallengeUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "diffie_hellman", - |m: &LoginCryptoChallengeUnion| { &m.diffie_hellman }, - |m: &mut LoginCryptoChallengeUnion| { &mut m.diffie_hellman }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "diffie_hellman", + |m: &LoginCryptoChallengeUnion| &m.diffie_hellman, + |m: &mut LoginCryptoChallengeUnion| &mut m.diffie_hellman, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "LoginCryptoChallengeUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LoginCryptoChallengeUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCryptoChallengeUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCryptoChallengeUnion::new) } } } @@ -2367,7 +2661,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCryptoChallengeUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCryptoDiffieHellmanChallenge { // message fields gs: ::protobuf::SingularField<::std::vec::Vec>, @@ -2391,7 +2685,6 @@ impl LoginCryptoDiffieHellmanChallenge { // required bytes gs = 10; - pub fn get_gs(&self) -> &[u8] { match self.gs.as_ref() { Some(v) => &v, @@ -2427,7 +2720,6 @@ impl LoginCryptoDiffieHellmanChallenge { // required int32 server_signature_key = 20; - pub fn get_server_signature_key(&self) -> i32 { self.server_signature_key.unwrap_or(0) } @@ -2446,7 +2738,6 @@ impl LoginCryptoDiffieHellmanChallenge { // required bytes gs_signature = 30; - pub fn get_gs_signature(&self) -> &[u8] { match self.gs_signature.as_ref() { Some(v) => &v, @@ -2477,7 +2768,9 @@ impl LoginCryptoDiffieHellmanChallenge { // Take field pub fn take_gs_signature(&mut self) -> ::std::vec::Vec { - self.gs_signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.gs_signature + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -2495,26 +2788,40 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gs)?; - }, + } 20 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.server_signature_key = ::std::option::Option::Some(tmp); - }, + } 30 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gs_signature)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.gs_signature, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2538,7 +2845,10 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gs.as_ref() { os.write_bytes(10, &v)?; } @@ -2583,39 +2893,54 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gs", - |m: &LoginCryptoDiffieHellmanChallenge| { &m.gs }, - |m: &mut LoginCryptoDiffieHellmanChallenge| { &mut m.gs }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "gs", + |m: &LoginCryptoDiffieHellmanChallenge| &m.gs, + |m: &mut LoginCryptoDiffieHellmanChallenge| &mut m.gs, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "server_signature_key", - |m: &LoginCryptoDiffieHellmanChallenge| { &m.server_signature_key }, - |m: &mut LoginCryptoDiffieHellmanChallenge| { &mut m.server_signature_key }, + |m: &LoginCryptoDiffieHellmanChallenge| &m.server_signature_key, + |m: &mut LoginCryptoDiffieHellmanChallenge| &mut m.server_signature_key, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gs_signature", - |m: &LoginCryptoDiffieHellmanChallenge| { &m.gs_signature }, - |m: &mut LoginCryptoDiffieHellmanChallenge| { &mut m.gs_signature }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "gs_signature", + |m: &LoginCryptoDiffieHellmanChallenge| &m.gs_signature, + |m: &mut LoginCryptoDiffieHellmanChallenge| &mut m.gs_signature, + ), + ); + ::protobuf::reflect::MessageDescriptor::new_pb_name::< + LoginCryptoDiffieHellmanChallenge, + >( "LoginCryptoDiffieHellmanChallenge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LoginCryptoDiffieHellmanChallenge { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCryptoDiffieHellmanChallenge::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCryptoDiffieHellmanChallenge::new) } } } @@ -2640,7 +2965,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FingerprintChallengeUnion { // message fields grain: ::protobuf::SingularPtrField, @@ -2663,9 +2988,10 @@ impl FingerprintChallengeUnion { // optional .FingerprintGrainChallenge grain = 10; - pub fn get_grain(&self) -> &FingerprintGrainChallenge { - self.grain.as_ref().unwrap_or_else(|| FingerprintGrainChallenge::default_instance()) + self.grain + .as_ref() + .unwrap_or_else(|| FingerprintGrainChallenge::default_instance()) } pub fn clear_grain(&mut self) { self.grain.clear(); @@ -2691,14 +3017,17 @@ impl FingerprintChallengeUnion { // Take field pub fn take_grain(&mut self) -> FingerprintGrainChallenge { - self.grain.take().unwrap_or_else(|| FingerprintGrainChallenge::new()) + self.grain + .take() + .unwrap_or_else(|| FingerprintGrainChallenge::new()) } // optional .FingerprintHmacRipemdChallenge hmac_ripemd = 20; - pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge { - self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance()) + self.hmac_ripemd + .as_ref() + .unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance()) } pub fn clear_hmac_ripemd(&mut self) { self.hmac_ripemd.clear(); @@ -2724,7 +3053,9 @@ impl FingerprintChallengeUnion { // Take field pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdChallenge { - self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdChallenge::new()) + self.hmac_ripemd + .take() + .unwrap_or_else(|| FingerprintHmacRipemdChallenge::new()) } } @@ -2734,28 +3065,40 @@ impl ::protobuf::Message for FingerprintChallengeUnion { if !v.is_initialized() { return false; } - }; + } for v in &self.hmac_ripemd { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grain)?; - }, + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hmac_ripemd)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.hmac_ripemd, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2778,7 +3121,10 @@ impl ::protobuf::Message for FingerprintChallengeUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.grain.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2824,34 +3170,44 @@ impl ::protobuf::Message for FingerprintChallengeUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "grain", - |m: &FingerprintChallengeUnion| { &m.grain }, - |m: &mut FingerprintChallengeUnion| { &mut m.grain }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "hmac_ripemd", - |m: &FingerprintChallengeUnion| { &m.hmac_ripemd }, - |m: &mut FingerprintChallengeUnion| { &mut m.hmac_ripemd }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "grain", + |m: &FingerprintChallengeUnion| &m.grain, + |m: &mut FingerprintChallengeUnion| &mut m.grain, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "hmac_ripemd", + |m: &FingerprintChallengeUnion| &m.hmac_ripemd, + |m: &mut FingerprintChallengeUnion| &mut m.hmac_ripemd, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "FingerprintChallengeUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static FingerprintChallengeUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FingerprintChallengeUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(FingerprintChallengeUnion::new) } } } @@ -2875,7 +3231,7 @@ impl ::protobuf::reflect::ProtobufValue for FingerprintChallengeUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FingerprintGrainChallenge { // message fields kek: ::protobuf::SingularField<::std::vec::Vec>, @@ -2897,7 +3253,6 @@ impl FingerprintGrainChallenge { // required bytes kek = 10; - pub fn get_kek(&self) -> &[u8] { match self.kek.as_ref() { Some(v) => &v, @@ -2940,16 +3295,24 @@ impl ::protobuf::Message for FingerprintGrainChallenge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.kek)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2967,7 +3330,10 @@ impl ::protobuf::Message for FingerprintGrainChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.kek.as_ref() { os.write_bytes(10, &v)?; } @@ -3006,29 +3372,34 @@ impl ::protobuf::Message for FingerprintGrainChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "kek", - |m: &FingerprintGrainChallenge| { &m.kek }, - |m: &mut FingerprintGrainChallenge| { &mut m.kek }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "kek", + |m: &FingerprintGrainChallenge| &m.kek, + |m: &mut FingerprintGrainChallenge| &mut m.kek, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "FingerprintGrainChallenge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static FingerprintGrainChallenge { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FingerprintGrainChallenge::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(FingerprintGrainChallenge::new) } } } @@ -3051,7 +3422,7 @@ impl ::protobuf::reflect::ProtobufValue for FingerprintGrainChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct FingerprintHmacRipemdChallenge { // message fields challenge: ::protobuf::SingularField<::std::vec::Vec>, @@ -3073,7 +3444,6 @@ impl FingerprintHmacRipemdChallenge { // required bytes challenge = 10; - pub fn get_challenge(&self) -> &[u8] { match self.challenge.as_ref() { Some(v) => &v, @@ -3104,7 +3474,9 @@ impl FingerprintHmacRipemdChallenge { // Take field pub fn take_challenge(&mut self) -> ::std::vec::Vec { - self.challenge.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.challenge + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -3116,16 +3488,24 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.challenge)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3143,7 +3523,10 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.challenge.as_ref() { os.write_bytes(10, &v)?; } @@ -3182,7 +3565,8 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); @@ -3201,10 +3585,9 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { } fn default_instance() -> &'static FingerprintHmacRipemdChallenge { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(FingerprintHmacRipemdChallenge::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(FingerprintHmacRipemdChallenge::new) } } } @@ -3227,7 +3610,7 @@ impl ::protobuf::reflect::ProtobufValue for FingerprintHmacRipemdChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PoWChallengeUnion { // message fields hash_cash: ::protobuf::SingularPtrField, @@ -3249,9 +3632,10 @@ impl PoWChallengeUnion { // optional .PoWHashCashChallenge hash_cash = 10; - pub fn get_hash_cash(&self) -> &PoWHashCashChallenge { - self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashChallenge::default_instance()) + self.hash_cash + .as_ref() + .unwrap_or_else(|| PoWHashCashChallenge::default_instance()) } pub fn clear_hash_cash(&mut self) { self.hash_cash.clear(); @@ -3277,7 +3661,9 @@ impl PoWChallengeUnion { // Take field pub fn take_hash_cash(&mut self) -> PoWHashCashChallenge { - self.hash_cash.take().unwrap_or_else(|| PoWHashCashChallenge::new()) + self.hash_cash + .take() + .unwrap_or_else(|| PoWHashCashChallenge::new()) } } @@ -3287,20 +3673,28 @@ impl ::protobuf::Message for PoWChallengeUnion { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hash_cash)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3319,7 +3713,10 @@ impl ::protobuf::Message for PoWChallengeUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hash_cash.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -3360,29 +3757,34 @@ impl ::protobuf::Message for PoWChallengeUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "hash_cash", - |m: &PoWChallengeUnion| { &m.hash_cash }, - |m: &mut PoWChallengeUnion| { &mut m.hash_cash }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "hash_cash", + |m: &PoWChallengeUnion| &m.hash_cash, + |m: &mut PoWChallengeUnion| &mut m.hash_cash, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PoWChallengeUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static PoWChallengeUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PoWChallengeUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(PoWChallengeUnion::new) } } } @@ -3405,7 +3807,7 @@ impl ::protobuf::reflect::ProtobufValue for PoWChallengeUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PoWHashCashChallenge { // message fields prefix: ::protobuf::SingularField<::std::vec::Vec>, @@ -3429,7 +3831,6 @@ impl PoWHashCashChallenge { // optional bytes prefix = 10; - pub fn get_prefix(&self) -> &[u8] { match self.prefix.as_ref() { Some(v) => &v, @@ -3465,7 +3866,6 @@ impl PoWHashCashChallenge { // optional int32 length = 20; - pub fn get_length(&self) -> i32 { self.length.unwrap_or(0) } @@ -3484,7 +3884,6 @@ impl PoWHashCashChallenge { // optional int32 target = 30; - pub fn get_target(&self) -> i32 { self.target.unwrap_or(0) } @@ -3507,30 +3906,42 @@ impl ::protobuf::Message for PoWHashCashChallenge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.prefix)?; - }, + } 20 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.length = ::std::option::Option::Some(tmp); - }, + } 30 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.target = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3554,7 +3965,10 @@ impl ::protobuf::Message for PoWHashCashChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.prefix.as_ref() { os.write_bytes(10, &v)?; } @@ -3599,39 +4013,50 @@ impl ::protobuf::Message for PoWHashCashChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "prefix", - |m: &PoWHashCashChallenge| { &m.prefix }, - |m: &mut PoWHashCashChallenge| { &mut m.prefix }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "prefix", + |m: &PoWHashCashChallenge| &m.prefix, + |m: &mut PoWHashCashChallenge| &mut m.prefix, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "length", - |m: &PoWHashCashChallenge| { &m.length }, - |m: &mut PoWHashCashChallenge| { &mut m.length }, + |m: &PoWHashCashChallenge| &m.length, + |m: &mut PoWHashCashChallenge| &mut m.length, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "target", - |m: &PoWHashCashChallenge| { &m.target }, - |m: &mut PoWHashCashChallenge| { &mut m.target }, + |m: &PoWHashCashChallenge| &m.target, + |m: &mut PoWHashCashChallenge| &mut m.target, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PoWHashCashChallenge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static PoWHashCashChallenge { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PoWHashCashChallenge::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(PoWHashCashChallenge::new) } } } @@ -3656,7 +4081,7 @@ impl ::protobuf::reflect::ProtobufValue for PoWHashCashChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct CryptoChallengeUnion { // message fields shannon: ::protobuf::SingularPtrField, @@ -3679,9 +4104,10 @@ impl CryptoChallengeUnion { // optional .CryptoShannonChallenge shannon = 10; - pub fn get_shannon(&self) -> &CryptoShannonChallenge { - self.shannon.as_ref().unwrap_or_else(|| CryptoShannonChallenge::default_instance()) + self.shannon + .as_ref() + .unwrap_or_else(|| CryptoShannonChallenge::default_instance()) } pub fn clear_shannon(&mut self) { self.shannon.clear(); @@ -3707,14 +4133,17 @@ impl CryptoChallengeUnion { // Take field pub fn take_shannon(&mut self) -> CryptoShannonChallenge { - self.shannon.take().unwrap_or_else(|| CryptoShannonChallenge::new()) + self.shannon + .take() + .unwrap_or_else(|| CryptoShannonChallenge::new()) } // optional .CryptoRc4Sha1HmacChallenge rc4_sha1_hmac = 20; - pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge { - self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance()) + self.rc4_sha1_hmac + .as_ref() + .unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance()) } pub fn clear_rc4_sha1_hmac(&mut self) { self.rc4_sha1_hmac.clear(); @@ -3740,7 +4169,9 @@ impl CryptoChallengeUnion { // Take field pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacChallenge { - self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::new()) + self.rc4_sha1_hmac + .take() + .unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::new()) } } @@ -3750,28 +4181,40 @@ impl ::protobuf::Message for CryptoChallengeUnion { if !v.is_initialized() { return false; } - }; + } for v in &self.rc4_sha1_hmac { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shannon)?; - }, + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rc4_sha1_hmac)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.rc4_sha1_hmac, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3794,7 +4237,10 @@ impl ::protobuf::Message for CryptoChallengeUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.shannon.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -3840,34 +4286,44 @@ impl ::protobuf::Message for CryptoChallengeUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "shannon", - |m: &CryptoChallengeUnion| { &m.shannon }, - |m: &mut CryptoChallengeUnion| { &mut m.shannon }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rc4_sha1_hmac", - |m: &CryptoChallengeUnion| { &m.rc4_sha1_hmac }, - |m: &mut CryptoChallengeUnion| { &mut m.rc4_sha1_hmac }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "shannon", + |m: &CryptoChallengeUnion| &m.shannon, + |m: &mut CryptoChallengeUnion| &mut m.shannon, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "rc4_sha1_hmac", + |m: &CryptoChallengeUnion| &m.rc4_sha1_hmac, + |m: &mut CryptoChallengeUnion| &mut m.rc4_sha1_hmac, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "CryptoChallengeUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static CryptoChallengeUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(CryptoChallengeUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(CryptoChallengeUnion::new) } } } @@ -3891,7 +4347,7 @@ impl ::protobuf::reflect::ProtobufValue for CryptoChallengeUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct CryptoShannonChallenge { // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -3915,13 +4371,21 @@ impl ::protobuf::Message for CryptoShannonChallenge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3936,7 +4400,10 @@ impl ::protobuf::Message for CryptoShannonChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -3972,24 +4439,24 @@ impl ::protobuf::Message for CryptoShannonChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let fields = ::std::vec::Vec::new(); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "CryptoShannonChallenge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static CryptoShannonChallenge { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(CryptoShannonChallenge::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(CryptoShannonChallenge::new) } } } @@ -4011,7 +4478,7 @@ impl ::protobuf::reflect::ProtobufValue for CryptoShannonChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct CryptoRc4Sha1HmacChallenge { // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -4035,13 +4502,21 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacChallenge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4056,7 +4531,10 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacChallenge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4092,24 +4570,24 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacChallenge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let fields = ::std::vec::Vec::new(); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "CryptoRc4Sha1HmacChallenge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static CryptoRc4Sha1HmacChallenge { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(CryptoRc4Sha1HmacChallenge::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(CryptoRc4Sha1HmacChallenge::new) } } } @@ -4131,7 +4609,7 @@ impl ::protobuf::reflect::ProtobufValue for CryptoRc4Sha1HmacChallenge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct UpgradeRequiredMessage { // message fields upgrade_signed_part: ::protobuf::SingularField<::std::vec::Vec>, @@ -4155,7 +4633,6 @@ impl UpgradeRequiredMessage { // required bytes upgrade_signed_part = 10; - pub fn get_upgrade_signed_part(&self) -> &[u8] { match self.upgrade_signed_part.as_ref() { Some(v) => &v, @@ -4186,12 +4663,13 @@ impl UpgradeRequiredMessage { // Take field pub fn take_upgrade_signed_part(&mut self) -> ::std::vec::Vec { - self.upgrade_signed_part.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.upgrade_signed_part + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // required bytes signature = 20; - pub fn get_signature(&self) -> &[u8] { match self.signature.as_ref() { Some(v) => &v, @@ -4222,12 +4700,13 @@ impl UpgradeRequiredMessage { // Take field pub fn take_signature(&mut self) -> ::std::vec::Vec { - self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.signature + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional string http_suffix = 30; - pub fn get_http_suffix(&self) -> &str { match self.http_suffix.as_ref() { Some(v) => &v, @@ -4258,7 +4737,9 @@ impl UpgradeRequiredMessage { // Take field pub fn take_http_suffix(&mut self) -> ::std::string::String { - self.http_suffix.take().unwrap_or_else(|| ::std::string::String::new()) + self.http_suffix + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -4273,22 +4754,38 @@ impl ::protobuf::Message for UpgradeRequiredMessage { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.upgrade_signed_part)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.upgrade_signed_part, + )?; + } 20 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?; - }, + } 30 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.http_suffix)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.http_suffix, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4312,7 +4809,10 @@ impl ::protobuf::Message for UpgradeRequiredMessage { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.upgrade_signed_part.as_ref() { os.write_bytes(10, &v)?; } @@ -4357,39 +4857,54 @@ impl ::protobuf::Message for UpgradeRequiredMessage { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "upgrade_signed_part", - |m: &UpgradeRequiredMessage| { &m.upgrade_signed_part }, - |m: &mut UpgradeRequiredMessage| { &mut m.upgrade_signed_part }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "signature", - |m: &UpgradeRequiredMessage| { &m.signature }, - |m: &mut UpgradeRequiredMessage| { &mut m.signature }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "http_suffix", - |m: &UpgradeRequiredMessage| { &m.http_suffix }, - |m: &mut UpgradeRequiredMessage| { &mut m.http_suffix }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "upgrade_signed_part", + |m: &UpgradeRequiredMessage| &m.upgrade_signed_part, + |m: &mut UpgradeRequiredMessage| &mut m.upgrade_signed_part, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "signature", + |m: &UpgradeRequiredMessage| &m.signature, + |m: &mut UpgradeRequiredMessage| &mut m.signature, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "http_suffix", + |m: &UpgradeRequiredMessage| &m.http_suffix, + |m: &mut UpgradeRequiredMessage| &mut m.http_suffix, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "UpgradeRequiredMessage", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static UpgradeRequiredMessage { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(UpgradeRequiredMessage::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(UpgradeRequiredMessage::new) } } } @@ -4414,7 +4929,7 @@ impl ::protobuf::reflect::ProtobufValue for UpgradeRequiredMessage { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct APLoginFailed { // message fields error_code: ::std::option::Option, @@ -4439,7 +4954,6 @@ impl APLoginFailed { // required .ErrorCode error_code = 10; - pub fn get_error_code(&self) -> ErrorCode { self.error_code.unwrap_or(ErrorCode::ProtocolError) } @@ -4458,7 +4972,6 @@ impl APLoginFailed { // optional int32 retry_delay = 20; - pub fn get_retry_delay(&self) -> i32 { self.retry_delay.unwrap_or(0) } @@ -4477,7 +4990,6 @@ impl APLoginFailed { // optional int32 expiry = 30; - pub fn get_expiry(&self) -> i32 { self.expiry.unwrap_or(0) } @@ -4496,7 +5008,6 @@ impl APLoginFailed { // optional string error_description = 40; - pub fn get_error_description(&self) -> &str { match self.error_description.as_ref() { Some(v) => &v, @@ -4527,7 +5038,9 @@ impl APLoginFailed { // Take field pub fn take_error_description(&mut self) -> ::std::string::String { - self.error_description.take().unwrap_or_else(|| ::std::string::String::new()) + self.error_description + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -4539,33 +5052,53 @@ impl ::protobuf::Message for APLoginFailed { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 10 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.error_code, 10, &mut self.unknown_fields)? - }, + 10 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.error_code, + 10, + &mut self.unknown_fields, + )?, 20 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.retry_delay = ::std::option::Option::Some(tmp); - }, + } 30 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.expiry = ::std::option::Option::Some(tmp); - }, + } 40 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.error_description)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.error_description, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4592,7 +5125,10 @@ impl ::protobuf::Message for APLoginFailed { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.error_code { os.write_enum(10, v.value())?; } @@ -4640,34 +5176,49 @@ impl ::protobuf::Message for APLoginFailed { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "error_code", - |m: &APLoginFailed| { &m.error_code }, - |m: &mut APLoginFailed| { &mut m.error_code }, + |m: &APLoginFailed| &m.error_code, + |m: &mut APLoginFailed| &mut m.error_code, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "retry_delay", - |m: &APLoginFailed| { &m.retry_delay }, - |m: &mut APLoginFailed| { &mut m.retry_delay }, + |m: &APLoginFailed| &m.retry_delay, + |m: &mut APLoginFailed| &mut m.retry_delay, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "expiry", - |m: &APLoginFailed| { &m.expiry }, - |m: &mut APLoginFailed| { &mut m.expiry }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "error_description", - |m: &APLoginFailed| { &m.error_description }, - |m: &mut APLoginFailed| { &mut m.error_description }, + |m: &APLoginFailed| &m.expiry, + |m: &mut APLoginFailed| &mut m.expiry, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "error_description", + |m: &APLoginFailed| &m.error_description, + |m: &mut APLoginFailed| &mut m.error_description, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "APLoginFailed", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -4675,9 +5226,7 @@ impl ::protobuf::Message for APLoginFailed { fn default_instance() -> &'static APLoginFailed { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(APLoginFailed::new) - } + unsafe { instance.get(APLoginFailed::new) } } } @@ -4703,7 +5252,7 @@ impl ::protobuf::reflect::ProtobufValue for APLoginFailed { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientResponsePlaintext { // message fields login_crypto_response: ::protobuf::SingularPtrField, @@ -4727,9 +5276,10 @@ impl ClientResponsePlaintext { // required .LoginCryptoResponseUnion login_crypto_response = 10; - pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion { - self.login_crypto_response.as_ref().unwrap_or_else(|| LoginCryptoResponseUnion::default_instance()) + self.login_crypto_response + .as_ref() + .unwrap_or_else(|| LoginCryptoResponseUnion::default_instance()) } pub fn clear_login_crypto_response(&mut self) { self.login_crypto_response.clear(); @@ -4755,14 +5305,17 @@ impl ClientResponsePlaintext { // Take field pub fn take_login_crypto_response(&mut self) -> LoginCryptoResponseUnion { - self.login_crypto_response.take().unwrap_or_else(|| LoginCryptoResponseUnion::new()) + self.login_crypto_response + .take() + .unwrap_or_else(|| LoginCryptoResponseUnion::new()) } // required .PoWResponseUnion pow_response = 20; - pub fn get_pow_response(&self) -> &PoWResponseUnion { - self.pow_response.as_ref().unwrap_or_else(|| PoWResponseUnion::default_instance()) + self.pow_response + .as_ref() + .unwrap_or_else(|| PoWResponseUnion::default_instance()) } pub fn clear_pow_response(&mut self) { self.pow_response.clear(); @@ -4788,14 +5341,17 @@ impl ClientResponsePlaintext { // Take field pub fn take_pow_response(&mut self) -> PoWResponseUnion { - self.pow_response.take().unwrap_or_else(|| PoWResponseUnion::new()) + self.pow_response + .take() + .unwrap_or_else(|| PoWResponseUnion::new()) } // required .CryptoResponseUnion crypto_response = 30; - pub fn get_crypto_response(&self) -> &CryptoResponseUnion { - self.crypto_response.as_ref().unwrap_or_else(|| CryptoResponseUnion::default_instance()) + self.crypto_response + .as_ref() + .unwrap_or_else(|| CryptoResponseUnion::default_instance()) } pub fn clear_crypto_response(&mut self) { self.crypto_response.clear(); @@ -4821,7 +5377,9 @@ impl ClientResponsePlaintext { // Take field pub fn take_crypto_response(&mut self) -> CryptoResponseUnion { - self.crypto_response.take().unwrap_or_else(|| CryptoResponseUnion::new()) + self.crypto_response + .take() + .unwrap_or_else(|| CryptoResponseUnion::new()) } } @@ -4840,36 +5398,56 @@ impl ::protobuf::Message for ClientResponsePlaintext { if !v.is_initialized() { return false; } - }; + } for v in &self.pow_response { if !v.is_initialized() { return false; } - }; + } for v in &self.crypto_response { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_crypto_response)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.login_crypto_response, + )?; + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pow_response)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.pow_response, + )?; + } 30 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.crypto_response)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.crypto_response, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4896,7 +5474,10 @@ impl ::protobuf::Message for ClientResponsePlaintext { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.login_crypto_response.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -4947,39 +5528,54 @@ impl ::protobuf::Message for ClientResponsePlaintext { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "login_crypto_response", - |m: &ClientResponsePlaintext| { &m.login_crypto_response }, - |m: &mut ClientResponsePlaintext| { &mut m.login_crypto_response }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pow_response", - |m: &ClientResponsePlaintext| { &m.pow_response }, - |m: &mut ClientResponsePlaintext| { &mut m.pow_response }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "crypto_response", - |m: &ClientResponsePlaintext| { &m.crypto_response }, - |m: &mut ClientResponsePlaintext| { &mut m.crypto_response }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "login_crypto_response", + |m: &ClientResponsePlaintext| &m.login_crypto_response, + |m: &mut ClientResponsePlaintext| &mut m.login_crypto_response, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "pow_response", + |m: &ClientResponsePlaintext| &m.pow_response, + |m: &mut ClientResponsePlaintext| &mut m.pow_response, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "crypto_response", + |m: &ClientResponsePlaintext| &m.crypto_response, + |m: &mut ClientResponsePlaintext| &mut m.crypto_response, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientResponsePlaintext", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ClientResponsePlaintext { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientResponsePlaintext::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ClientResponsePlaintext::new) } } } @@ -5004,7 +5600,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientResponsePlaintext { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCryptoResponseUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, @@ -5026,9 +5622,10 @@ impl LoginCryptoResponseUnion { // optional .LoginCryptoDiffieHellmanResponse diffie_hellman = 10; - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance()) + self.diffie_hellman + .as_ref() + .unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance()) } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); @@ -5054,7 +5651,9 @@ impl LoginCryptoResponseUnion { // Take field pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanResponse { - self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::new()) + self.diffie_hellman + .take() + .unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::new()) } } @@ -5064,20 +5663,32 @@ impl ::protobuf::Message for LoginCryptoResponseUnion { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diffie_hellman)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.diffie_hellman, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5096,7 +5707,10 @@ impl ::protobuf::Message for LoginCryptoResponseUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.diffie_hellman.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -5137,29 +5751,34 @@ impl ::protobuf::Message for LoginCryptoResponseUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "diffie_hellman", - |m: &LoginCryptoResponseUnion| { &m.diffie_hellman }, - |m: &mut LoginCryptoResponseUnion| { &mut m.diffie_hellman }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "diffie_hellman", + |m: &LoginCryptoResponseUnion| &m.diffie_hellman, + |m: &mut LoginCryptoResponseUnion| &mut m.diffie_hellman, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "LoginCryptoResponseUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LoginCryptoResponseUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCryptoResponseUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCryptoResponseUnion::new) } } } @@ -5182,7 +5801,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCryptoResponseUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LoginCryptoDiffieHellmanResponse { // message fields hmac: ::protobuf::SingularField<::std::vec::Vec>, @@ -5204,7 +5823,6 @@ impl LoginCryptoDiffieHellmanResponse { // required bytes hmac = 10; - pub fn get_hmac(&self) -> &[u8] { match self.hmac.as_ref() { Some(v) => &v, @@ -5247,16 +5865,24 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hmac)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5274,7 +5900,10 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hmac.as_ref() { os.write_bytes(10, &v)?; } @@ -5313,29 +5942,36 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "hmac", - |m: &LoginCryptoDiffieHellmanResponse| { &m.hmac }, - |m: &mut LoginCryptoDiffieHellmanResponse| { &mut m.hmac }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "hmac", + |m: &LoginCryptoDiffieHellmanResponse| &m.hmac, + |m: &mut LoginCryptoDiffieHellmanResponse| &mut m.hmac, + ), + ); + ::protobuf::reflect::MessageDescriptor::new_pb_name::< + LoginCryptoDiffieHellmanResponse, + >( "LoginCryptoDiffieHellmanResponse", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static LoginCryptoDiffieHellmanResponse { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LoginCryptoDiffieHellmanResponse::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(LoginCryptoDiffieHellmanResponse::new) } } } @@ -5358,7 +5994,7 @@ impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanResponse { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PoWResponseUnion { // message fields hash_cash: ::protobuf::SingularPtrField, @@ -5380,9 +6016,10 @@ impl PoWResponseUnion { // optional .PoWHashCashResponse hash_cash = 10; - pub fn get_hash_cash(&self) -> &PoWHashCashResponse { - self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashResponse::default_instance()) + self.hash_cash + .as_ref() + .unwrap_or_else(|| PoWHashCashResponse::default_instance()) } pub fn clear_hash_cash(&mut self) { self.hash_cash.clear(); @@ -5408,7 +6045,9 @@ impl PoWResponseUnion { // Take field pub fn take_hash_cash(&mut self) -> PoWHashCashResponse { - self.hash_cash.take().unwrap_or_else(|| PoWHashCashResponse::new()) + self.hash_cash + .take() + .unwrap_or_else(|| PoWHashCashResponse::new()) } } @@ -5418,20 +6057,28 @@ impl ::protobuf::Message for PoWResponseUnion { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hash_cash)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5450,7 +6097,10 @@ impl ::protobuf::Message for PoWResponseUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hash_cash.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -5491,29 +6141,34 @@ impl ::protobuf::Message for PoWResponseUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "hash_cash", - |m: &PoWResponseUnion| { &m.hash_cash }, - |m: &mut PoWResponseUnion| { &mut m.hash_cash }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "hash_cash", + |m: &PoWResponseUnion| &m.hash_cash, + |m: &mut PoWResponseUnion| &mut m.hash_cash, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PoWResponseUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static PoWResponseUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PoWResponseUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(PoWResponseUnion::new) } } } @@ -5536,7 +6191,7 @@ impl ::protobuf::reflect::ProtobufValue for PoWResponseUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PoWHashCashResponse { // message fields hash_suffix: ::protobuf::SingularField<::std::vec::Vec>, @@ -5558,7 +6213,6 @@ impl PoWHashCashResponse { // required bytes hash_suffix = 10; - pub fn get_hash_suffix(&self) -> &[u8] { match self.hash_suffix.as_ref() { Some(v) => &v, @@ -5589,7 +6243,9 @@ impl PoWHashCashResponse { // Take field pub fn take_hash_suffix(&mut self) -> ::std::vec::Vec { - self.hash_suffix.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.hash_suffix + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -5601,16 +6257,24 @@ impl ::protobuf::Message for PoWHashCashResponse { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hash_suffix)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5628,7 +6292,10 @@ impl ::protobuf::Message for PoWHashCashResponse { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hash_suffix.as_ref() { os.write_bytes(10, &v)?; } @@ -5667,29 +6334,34 @@ impl ::protobuf::Message for PoWHashCashResponse { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "hash_suffix", - |m: &PoWHashCashResponse| { &m.hash_suffix }, - |m: &mut PoWHashCashResponse| { &mut m.hash_suffix }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "hash_suffix", + |m: &PoWHashCashResponse| &m.hash_suffix, + |m: &mut PoWHashCashResponse| &mut m.hash_suffix, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "PoWHashCashResponse", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static PoWHashCashResponse { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PoWHashCashResponse::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(PoWHashCashResponse::new) } } } @@ -5712,7 +6384,7 @@ impl ::protobuf::reflect::ProtobufValue for PoWHashCashResponse { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct CryptoResponseUnion { // message fields shannon: ::protobuf::SingularPtrField, @@ -5735,9 +6407,10 @@ impl CryptoResponseUnion { // optional .CryptoShannonResponse shannon = 10; - pub fn get_shannon(&self) -> &CryptoShannonResponse { - self.shannon.as_ref().unwrap_or_else(|| CryptoShannonResponse::default_instance()) + self.shannon + .as_ref() + .unwrap_or_else(|| CryptoShannonResponse::default_instance()) } pub fn clear_shannon(&mut self) { self.shannon.clear(); @@ -5763,14 +6436,17 @@ impl CryptoResponseUnion { // Take field pub fn take_shannon(&mut self) -> CryptoShannonResponse { - self.shannon.take().unwrap_or_else(|| CryptoShannonResponse::new()) + self.shannon + .take() + .unwrap_or_else(|| CryptoShannonResponse::new()) } // optional .CryptoRc4Sha1HmacResponse rc4_sha1_hmac = 20; - pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse { - self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance()) + self.rc4_sha1_hmac + .as_ref() + .unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance()) } pub fn clear_rc4_sha1_hmac(&mut self) { self.rc4_sha1_hmac.clear(); @@ -5796,7 +6472,9 @@ impl CryptoResponseUnion { // Take field pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacResponse { - self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::new()) + self.rc4_sha1_hmac + .take() + .unwrap_or_else(|| CryptoRc4Sha1HmacResponse::new()) } } @@ -5806,28 +6484,40 @@ impl ::protobuf::Message for CryptoResponseUnion { if !v.is_initialized() { return false; } - }; + } for v in &self.rc4_sha1_hmac { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 10 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shannon)?; - }, + } 20 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rc4_sha1_hmac)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.rc4_sha1_hmac, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5850,7 +6540,10 @@ impl ::protobuf::Message for CryptoResponseUnion { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.shannon.as_ref() { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -5896,34 +6589,44 @@ impl ::protobuf::Message for CryptoResponseUnion { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "shannon", - |m: &CryptoResponseUnion| { &m.shannon }, - |m: &mut CryptoResponseUnion| { &mut m.shannon }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rc4_sha1_hmac", - |m: &CryptoResponseUnion| { &m.rc4_sha1_hmac }, - |m: &mut CryptoResponseUnion| { &mut m.rc4_sha1_hmac }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "shannon", + |m: &CryptoResponseUnion| &m.shannon, + |m: &mut CryptoResponseUnion| &mut m.shannon, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "rc4_sha1_hmac", + |m: &CryptoResponseUnion| &m.rc4_sha1_hmac, + |m: &mut CryptoResponseUnion| &mut m.rc4_sha1_hmac, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "CryptoResponseUnion", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static CryptoResponseUnion { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(CryptoResponseUnion::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(CryptoResponseUnion::new) } } } @@ -5947,7 +6650,7 @@ impl ::protobuf::reflect::ProtobufValue for CryptoResponseUnion { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct CryptoShannonResponse { // message fields dummy: ::std::option::Option, @@ -5969,7 +6672,6 @@ impl CryptoShannonResponse { // optional int32 dummy = 1; - pub fn get_dummy(&self) -> i32 { self.dummy.unwrap_or(0) } @@ -5992,20 +6694,30 @@ impl ::protobuf::Message for CryptoShannonResponse { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.dummy = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6023,7 +6735,10 @@ impl ::protobuf::Message for CryptoShannonResponse { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.dummy { os.write_int32(1, v)?; } @@ -6062,29 +6777,32 @@ impl ::protobuf::Message for CryptoShannonResponse { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "dummy", - |m: &CryptoShannonResponse| { &m.dummy }, - |m: &mut CryptoShannonResponse| { &mut m.dummy }, + |m: &CryptoShannonResponse| &m.dummy, + |m: &mut CryptoShannonResponse| &mut m.dummy, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "CryptoShannonResponse", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static CryptoShannonResponse { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(CryptoShannonResponse::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(CryptoShannonResponse::new) } } } @@ -6107,7 +6825,7 @@ impl ::protobuf::reflect::ProtobufValue for CryptoShannonResponse { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct CryptoRc4Sha1HmacResponse { // message fields dummy: ::std::option::Option, @@ -6129,7 +6847,6 @@ impl CryptoRc4Sha1HmacResponse { // optional int32 dummy = 1; - pub fn get_dummy(&self) -> i32 { self.dummy.unwrap_or(0) } @@ -6152,20 +6869,30 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.dummy = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6183,7 +6910,10 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.dummy { os.write_int32(1, v)?; } @@ -6222,29 +6952,32 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "dummy", - |m: &CryptoRc4Sha1HmacResponse| { &m.dummy }, - |m: &mut CryptoRc4Sha1HmacResponse| { &mut m.dummy }, + |m: &CryptoRc4Sha1HmacResponse| &m.dummy, + |m: &mut CryptoRc4Sha1HmacResponse| &mut m.dummy, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "CryptoRc4Sha1HmacResponse", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static CryptoRc4Sha1HmacResponse { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(CryptoRc4Sha1HmacResponse::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(CryptoRc4Sha1HmacResponse::new) } } } @@ -6267,7 +7000,7 @@ impl ::protobuf::reflect::ProtobufValue for CryptoRc4Sha1HmacResponse { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Product { PRODUCT_CLIENT = 0, PRODUCT_LIBSPOTIFY = 1, @@ -6288,7 +7021,7 @@ impl ::protobuf::ProtobufEnum for Product { 2 => ::std::option::Option::Some(Product::PRODUCT_MOBILE), 3 => ::std::option::Option::Some(Product::PRODUCT_PARTNER), 5 => ::std::option::Option::Some(Product::PRODUCT_LIBSPOTIFY_EMBEDDED), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6304,17 +7037,20 @@ impl ::protobuf::ProtobufEnum for Product { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Product", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Product", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Product { -} +impl ::std::marker::Copy for Product {} impl ::std::default::Default for Product { fn default() -> Self { @@ -6328,7 +7064,7 @@ impl ::protobuf::reflect::ProtobufValue for Product { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ProductFlags { PRODUCT_FLAG_NONE = 0, PRODUCT_FLAG_DEV_BUILD = 1, @@ -6343,7 +7079,7 @@ impl ::protobuf::ProtobufEnum for ProductFlags { match value { 0 => ::std::option::Option::Some(ProductFlags::PRODUCT_FLAG_NONE), 1 => ::std::option::Option::Some(ProductFlags::PRODUCT_FLAG_DEV_BUILD), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6356,17 +7092,20 @@ impl ::protobuf::ProtobufEnum for ProductFlags { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ProductFlags", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ProductFlags", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ProductFlags { -} +impl ::std::marker::Copy for ProductFlags {} impl ::std::default::Default for ProductFlags { fn default() -> Self { @@ -6380,7 +7119,7 @@ impl ::protobuf::reflect::ProtobufValue for ProductFlags { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Platform { PLATFORM_WIN32_X86 = 0, PLATFORM_OSX_X86 = 1, @@ -6439,7 +7178,7 @@ impl ::protobuf::ProtobufEnum for Platform { 21 => ::std::option::Option::Some(Platform::PLATFORM_ONKYO_ARM), 22 => ::std::option::Option::Some(Platform::PLATFORM_QNXNTO_ARM), 23 => ::std::option::Option::Some(Platform::PLATFORM_BCO_ARM), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6474,17 +7213,20 @@ impl ::protobuf::ProtobufEnum for Platform { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Platform", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Platform", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Platform { -} +impl ::std::marker::Copy for Platform {} impl ::std::default::Default for Platform { fn default() -> Self { @@ -6498,7 +7240,7 @@ impl ::protobuf::reflect::ProtobufValue for Platform { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Fingerprint { FINGERPRINT_GRAIN = 0, FINGERPRINT_HMAC_RIPEMD = 1, @@ -6513,7 +7255,7 @@ impl ::protobuf::ProtobufEnum for Fingerprint { match value { 0 => ::std::option::Option::Some(Fingerprint::FINGERPRINT_GRAIN), 1 => ::std::option::Option::Some(Fingerprint::FINGERPRINT_HMAC_RIPEMD), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6526,17 +7268,20 @@ impl ::protobuf::ProtobufEnum for Fingerprint { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Fingerprint", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Fingerprint", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Fingerprint { -} +impl ::std::marker::Copy for Fingerprint {} impl ::std::default::Default for Fingerprint { fn default() -> Self { @@ -6550,7 +7295,7 @@ impl ::protobuf::reflect::ProtobufValue for Fingerprint { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Cryptosuite { CRYPTO_SUITE_SHANNON = 0, CRYPTO_SUITE_RC4_SHA1_HMAC = 1, @@ -6565,7 +7310,7 @@ impl ::protobuf::ProtobufEnum for Cryptosuite { match value { 0 => ::std::option::Option::Some(Cryptosuite::CRYPTO_SUITE_SHANNON), 1 => ::std::option::Option::Some(Cryptosuite::CRYPTO_SUITE_RC4_SHA1_HMAC), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6578,17 +7323,20 @@ impl ::protobuf::ProtobufEnum for Cryptosuite { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Cryptosuite", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Cryptosuite", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Cryptosuite { -} +impl ::std::marker::Copy for Cryptosuite {} impl ::std::default::Default for Cryptosuite { fn default() -> Self { @@ -6602,7 +7350,7 @@ impl ::protobuf::reflect::ProtobufValue for Cryptosuite { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Powscheme { POW_HASH_CASH = 0, } @@ -6615,29 +7363,30 @@ impl ::protobuf::ProtobufEnum for Powscheme { fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(Powscheme::POW_HASH_CASH), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } fn values() -> &'static [Self] { - static values: &'static [Powscheme] = &[ - Powscheme::POW_HASH_CASH, - ]; + static values: &'static [Powscheme] = &[Powscheme::POW_HASH_CASH]; values } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Powscheme", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Powscheme", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Powscheme { -} +impl ::std::marker::Copy for Powscheme {} impl ::std::default::Default for Powscheme { fn default() -> Self { @@ -6651,7 +7400,7 @@ impl ::protobuf::reflect::ProtobufValue for Powscheme { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ErrorCode { ProtocolError = 0, TryAnotherAP = 2, @@ -6684,7 +7433,7 @@ impl ::protobuf::ProtobufEnum for ErrorCode { 15 => ::std::option::Option::Some(ErrorCode::ExtraVerificationRequired), 16 => ::std::option::Option::Some(ErrorCode::InvalidAppKey), 17 => ::std::option::Option::Some(ErrorCode::ApplicationBanned), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6706,17 +7455,20 @@ impl ::protobuf::ProtobufEnum for ErrorCode { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ErrorCode", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ErrorCode", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ErrorCode { -} +impl ::std::marker::Copy for ErrorCode {} impl ::std::default::Default for ErrorCode { fn default() -> Self { @@ -6824,16 +7576,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/mercury.rs b/protocol/src/mercury.rs index ab6f5f9a..c7f50f8f 100644 --- a/protocol/src/mercury.rs +++ b/protocol/src/mercury.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct MercuryMultiGetRequest { // message fields request: ::protobuf::RepeatedField, @@ -48,7 +48,6 @@ impl MercuryMultiGetRequest { // repeated .MercuryRequest request = 1; - pub fn get_request(&self) -> &[MercuryRequest] { &self.request } @@ -78,20 +77,28 @@ impl ::protobuf::Message for MercuryMultiGetRequest { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.request)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -104,18 +111,21 @@ impl ::protobuf::Message for MercuryMultiGetRequest { for value in &self.request { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.request { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -151,29 +161,34 @@ impl ::protobuf::Message for MercuryMultiGetRequest { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "request", - |m: &MercuryMultiGetRequest| { &m.request }, - |m: &mut MercuryMultiGetRequest| { &mut m.request }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "request", + |m: &MercuryMultiGetRequest| &m.request, + |m: &mut MercuryMultiGetRequest| &mut m.request, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "MercuryMultiGetRequest", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static MercuryMultiGetRequest { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(MercuryMultiGetRequest::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(MercuryMultiGetRequest::new) } } } @@ -196,7 +211,7 @@ impl ::protobuf::reflect::ProtobufValue for MercuryMultiGetRequest { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct MercuryMultiGetReply { // message fields reply: ::protobuf::RepeatedField, @@ -218,7 +233,6 @@ impl MercuryMultiGetReply { // repeated .MercuryReply reply = 1; - pub fn get_reply(&self) -> &[MercuryReply] { &self.reply } @@ -248,20 +262,28 @@ impl ::protobuf::Message for MercuryMultiGetReply { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.reply)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -274,18 +296,21 @@ impl ::protobuf::Message for MercuryMultiGetReply { for value in &self.reply { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.reply { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -321,29 +346,34 @@ impl ::protobuf::Message for MercuryMultiGetReply { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "reply", - |m: &MercuryMultiGetReply| { &m.reply }, - |m: &mut MercuryMultiGetReply| { &mut m.reply }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "reply", + |m: &MercuryMultiGetReply| &m.reply, + |m: &mut MercuryMultiGetReply| &mut m.reply, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "MercuryMultiGetReply", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static MercuryMultiGetReply { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(MercuryMultiGetReply::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(MercuryMultiGetReply::new) } } } @@ -366,7 +396,7 @@ impl ::protobuf::reflect::ProtobufValue for MercuryMultiGetReply { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct MercuryRequest { // message fields uri: ::protobuf::SingularField<::std::string::String>, @@ -391,7 +421,6 @@ impl MercuryRequest { // optional string uri = 1; - pub fn get_uri(&self) -> &str { match self.uri.as_ref() { Some(v) => &v, @@ -422,12 +451,13 @@ impl MercuryRequest { // Take field pub fn take_uri(&mut self) -> ::std::string::String { - self.uri.take().unwrap_or_else(|| ::std::string::String::new()) + self.uri + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string content_type = 2; - pub fn get_content_type(&self) -> &str { match self.content_type.as_ref() { Some(v) => &v, @@ -458,12 +488,13 @@ impl MercuryRequest { // Take field pub fn take_content_type(&mut self) -> ::std::string::String { - self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) + self.content_type + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bytes body = 3; - pub fn get_body(&self) -> &[u8] { match self.body.as_ref() { Some(v) => &v, @@ -499,7 +530,6 @@ impl MercuryRequest { // optional bytes etag = 4; - pub fn get_etag(&self) -> &[u8] { match self.etag.as_ref() { Some(v) => &v, @@ -539,25 +569,37 @@ impl ::protobuf::Message for MercuryRequest { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?; - }, + } 2 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content_type)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.content_type, + )?; + } 3 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.body)?; - }, + } 4 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.etag)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -584,7 +626,10 @@ impl ::protobuf::Message for MercuryRequest { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.uri.as_ref() { os.write_string(1, &v)?; } @@ -632,34 +677,55 @@ impl ::protobuf::Message for MercuryRequest { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "uri", - |m: &MercuryRequest| { &m.uri }, - |m: &mut MercuryRequest| { &mut m.uri }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "content_type", - |m: &MercuryRequest| { &m.content_type }, - |m: &mut MercuryRequest| { &mut m.content_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "body", - |m: &MercuryRequest| { &m.body }, - |m: &mut MercuryRequest| { &mut m.body }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "etag", - |m: &MercuryRequest| { &m.etag }, - |m: &mut MercuryRequest| { &mut m.etag }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "uri", + |m: &MercuryRequest| &m.uri, + |m: &mut MercuryRequest| &mut m.uri, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "content_type", + |m: &MercuryRequest| &m.content_type, + |m: &mut MercuryRequest| &mut m.content_type, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "body", + |m: &MercuryRequest| &m.body, + |m: &mut MercuryRequest| &mut m.body, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "etag", + |m: &MercuryRequest| &m.etag, + |m: &mut MercuryRequest| &mut m.etag, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "MercuryRequest", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -667,9 +733,7 @@ impl ::protobuf::Message for MercuryRequest { fn default_instance() -> &'static MercuryRequest { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(MercuryRequest::new) - } + unsafe { instance.get(MercuryRequest::new) } } } @@ -695,7 +759,7 @@ impl ::protobuf::reflect::ProtobufValue for MercuryRequest { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct MercuryReply { // message fields status_code: ::std::option::Option, @@ -723,7 +787,6 @@ impl MercuryReply { // optional sint32 status_code = 1; - pub fn get_status_code(&self) -> i32 { self.status_code.unwrap_or(0) } @@ -742,7 +805,6 @@ impl MercuryReply { // optional string status_message = 2; - pub fn get_status_message(&self) -> &str { match self.status_message.as_ref() { Some(v) => &v, @@ -773,14 +835,16 @@ impl MercuryReply { // Take field pub fn take_status_message(&mut self) -> ::std::string::String { - self.status_message.take().unwrap_or_else(|| ::std::string::String::new()) + self.status_message + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .MercuryReply.CachePolicy cache_policy = 3; - pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy { - self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO) + self.cache_policy + .unwrap_or(MercuryReply_CachePolicy::CACHE_NO) } pub fn clear_cache_policy(&mut self) { self.cache_policy = ::std::option::Option::None; @@ -797,7 +861,6 @@ impl MercuryReply { // optional sint32 ttl = 4; - pub fn get_ttl(&self) -> i32 { self.ttl.unwrap_or(0) } @@ -816,7 +879,6 @@ impl MercuryReply { // optional bytes etag = 5; - pub fn get_etag(&self) -> &[u8] { match self.etag.as_ref() { Some(v) => &v, @@ -852,7 +914,6 @@ impl MercuryReply { // optional string content_type = 6; - pub fn get_content_type(&self) -> &str { match self.content_type.as_ref() { Some(v) => &v, @@ -883,12 +944,13 @@ impl MercuryReply { // Take field pub fn take_content_type(&mut self) -> ::std::string::String { - self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) + self.content_type + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bytes body = 7; - pub fn get_body(&self) -> &[u8] { match self.body.as_ref() { Some(v) => &v, @@ -928,42 +990,66 @@ impl ::protobuf::Message for MercuryReply { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.status_code = ::std::option::Option::Some(tmp); - }, + } 2 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.status_message)?; - }, - 3 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.cache_policy, 3, &mut self.unknown_fields)? - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.status_message, + )?; + } + 3 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.cache_policy, + 3, + &mut self.unknown_fields, + )?, 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.ttl = ::std::option::Option::Some(tmp); - }, + } 5 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.etag)?; - }, + } 6 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content_type)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.content_type, + )?; + } 7 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.body)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -999,7 +1085,10 @@ impl ::protobuf::Message for MercuryReply { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.status_code { os.write_sint32(1, v)?; } @@ -1056,49 +1145,79 @@ impl ::protobuf::Message for MercuryReply { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "status_code", - |m: &MercuryReply| { &m.status_code }, - |m: &mut MercuryReply| { &mut m.status_code }, + |m: &MercuryReply| &m.status_code, + |m: &mut MercuryReply| &mut m.status_code, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "status_message", - |m: &MercuryReply| { &m.status_message }, - |m: &mut MercuryReply| { &mut m.status_message }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "status_message", + |m: &MercuryReply| &m.status_message, + |m: &mut MercuryReply| &mut m.status_message, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "cache_policy", - |m: &MercuryReply| { &m.cache_policy }, - |m: &mut MercuryReply| { &mut m.cache_policy }, + |m: &MercuryReply| &m.cache_policy, + |m: &mut MercuryReply| &mut m.cache_policy, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "ttl", - |m: &MercuryReply| { &m.ttl }, - |m: &mut MercuryReply| { &mut m.ttl }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "etag", - |m: &MercuryReply| { &m.etag }, - |m: &mut MercuryReply| { &mut m.etag }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "content_type", - |m: &MercuryReply| { &m.content_type }, - |m: &mut MercuryReply| { &mut m.content_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "body", - |m: &MercuryReply| { &m.body }, - |m: &mut MercuryReply| { &mut m.body }, + |m: &MercuryReply| &m.ttl, + |m: &mut MercuryReply| &mut m.ttl, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "etag", + |m: &MercuryReply| &m.etag, + |m: &mut MercuryReply| &mut m.etag, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "content_type", + |m: &MercuryReply| &m.content_type, + |m: &mut MercuryReply| &mut m.content_type, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "body", + |m: &MercuryReply| &m.body, + |m: &mut MercuryReply| &mut m.body, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "MercuryReply", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1106,9 +1225,7 @@ impl ::protobuf::Message for MercuryReply { fn default_instance() -> &'static MercuryReply { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(MercuryReply::new) - } + unsafe { instance.get(MercuryReply::new) } } } @@ -1137,7 +1254,7 @@ impl ::protobuf::reflect::ProtobufValue for MercuryReply { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum MercuryReply_CachePolicy { CACHE_NO = 1, CACHE_PRIVATE = 2, @@ -1154,7 +1271,7 @@ impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy { 1 => ::std::option::Option::Some(MercuryReply_CachePolicy::CACHE_NO), 2 => ::std::option::Option::Some(MercuryReply_CachePolicy::CACHE_PRIVATE), 3 => ::std::option::Option::Some(MercuryReply_CachePolicy::CACHE_PUBLIC), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -1168,17 +1285,20 @@ impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("MercuryReply.CachePolicy", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "MercuryReply.CachePolicy", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for MercuryReply_CachePolicy { -} +impl ::std::marker::Copy for MercuryReply_CachePolicy {} // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for MercuryReply_CachePolicy { @@ -1193,7 +1313,7 @@ impl ::protobuf::reflect::ProtobufValue for MercuryReply_CachePolicy { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Header { // message fields uri: ::protobuf::SingularField<::std::string::String>, @@ -1219,7 +1339,6 @@ impl Header { // optional string uri = 1; - pub fn get_uri(&self) -> &str { match self.uri.as_ref() { Some(v) => &v, @@ -1250,12 +1369,13 @@ impl Header { // Take field pub fn take_uri(&mut self) -> ::std::string::String { - self.uri.take().unwrap_or_else(|| ::std::string::String::new()) + self.uri + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string content_type = 2; - pub fn get_content_type(&self) -> &str { match self.content_type.as_ref() { Some(v) => &v, @@ -1286,12 +1406,13 @@ impl Header { // Take field pub fn take_content_type(&mut self) -> ::std::string::String { - self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) + self.content_type + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string method = 3; - pub fn get_method(&self) -> &str { match self.method.as_ref() { Some(v) => &v, @@ -1322,12 +1443,13 @@ impl Header { // Take field pub fn take_method(&mut self) -> ::std::string::String { - self.method.take().unwrap_or_else(|| ::std::string::String::new()) + self.method + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional sint32 status_code = 4; - pub fn get_status_code(&self) -> i32 { self.status_code.unwrap_or(0) } @@ -1346,7 +1468,6 @@ impl Header { // repeated .UserField user_fields = 6; - pub fn get_user_fields(&self) -> &[UserField] { &self.user_fields } @@ -1376,36 +1497,54 @@ impl ::protobuf::Message for Header { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?; - }, + } 2 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content_type)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.content_type, + )?; + } 3 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.method)?; - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.status_code = ::std::option::Option::Some(tmp); - }, + } 6 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.user_fields)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.user_fields, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1430,13 +1569,16 @@ impl ::protobuf::Message for Header { for value in &self.user_fields { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.uri.as_ref() { os.write_string(1, &v)?; } @@ -1453,7 +1595,7 @@ impl ::protobuf::Message for Header { os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1489,39 +1631,59 @@ impl ::protobuf::Message for Header { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "uri", - |m: &Header| { &m.uri }, - |m: &mut Header| { &mut m.uri }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "content_type", - |m: &Header| { &m.content_type }, - |m: &mut Header| { &mut m.content_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "method", - |m: &Header| { &m.method }, - |m: &mut Header| { &mut m.method }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >("uri", |m: &Header| &m.uri, |m: &mut Header| &mut m.uri), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "content_type", + |m: &Header| &m.content_type, + |m: &mut Header| &mut m.content_type, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "method", + |m: &Header| &m.method, + |m: &mut Header| &mut m.method, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "status_code", - |m: &Header| { &m.status_code }, - |m: &mut Header| { &mut m.status_code }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "user_fields", - |m: &Header| { &m.user_fields }, - |m: &mut Header| { &mut m.user_fields }, + |m: &Header| &m.status_code, + |m: &mut Header| &mut m.status_code, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "user_fields", + |m: &Header| &m.user_fields, + |m: &mut Header| &mut m.user_fields, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::
( "Header", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1529,9 +1691,7 @@ impl ::protobuf::Message for Header { fn default_instance() -> &'static Header { static mut instance: ::protobuf::lazy::Lazy
= ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Header::new) - } + unsafe { instance.get(Header::new) } } } @@ -1558,7 +1718,7 @@ impl ::protobuf::reflect::ProtobufValue for Header { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct UserField { // message fields key: ::protobuf::SingularField<::std::string::String>, @@ -1581,7 +1741,6 @@ impl UserField { // optional string key = 1; - pub fn get_key(&self) -> &str { match self.key.as_ref() { Some(v) => &v, @@ -1612,12 +1771,13 @@ impl UserField { // Take field pub fn take_key(&mut self) -> ::std::string::String { - self.key.take().unwrap_or_else(|| ::std::string::String::new()) + self.key + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bytes value = 2; - pub fn get_value(&self) -> &[u8] { match self.value.as_ref() { Some(v) => &v, @@ -1657,19 +1817,27 @@ impl ::protobuf::Message for UserField { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?; - }, + } 2 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.value)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1690,7 +1858,10 @@ impl ::protobuf::Message for UserField { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.key.as_ref() { os.write_string(1, &v)?; } @@ -1732,24 +1903,35 @@ impl ::protobuf::Message for UserField { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "key", - |m: &UserField| { &m.key }, - |m: &mut UserField| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "value", - |m: &UserField| { &m.value }, - |m: &mut UserField| { &mut m.value }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "key", + |m: &UserField| &m.key, + |m: &mut UserField| &mut m.key, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "value", + |m: &UserField| &m.value, + |m: &mut UserField| &mut m.value, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "UserField", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1757,9 +1939,7 @@ impl ::protobuf::Message for UserField { fn default_instance() -> &'static UserField { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(UserField::new) - } + unsafe { instance.get(UserField::new) } } } @@ -1804,16 +1984,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12\x0f\n\x05value\x18\x02\x20\x01(\x0cB\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/metadata.rs b/protocol/src/metadata.rs index 99635e70..d96f3336 100644 --- a/protocol/src/metadata.rs +++ b/protocol/src/metadata.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct TopTracks { // message fields country: ::protobuf::SingularField<::std::string::String>, @@ -49,7 +49,6 @@ impl TopTracks { // optional string country = 1; - pub fn get_country(&self) -> &str { match self.country.as_ref() { Some(v) => &v, @@ -80,12 +79,13 @@ impl TopTracks { // Take field pub fn take_country(&mut self) -> ::std::string::String { - self.country.take().unwrap_or_else(|| ::std::string::String::new()) + self.country + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Track track = 2; - pub fn get_track(&self) -> &[Track] { &self.track } @@ -115,23 +115,31 @@ impl ::protobuf::Message for TopTracks { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.country)?; - }, + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -147,13 +155,16 @@ impl ::protobuf::Message for TopTracks { for value in &self.track { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.country.as_ref() { os.write_string(1, &v)?; } @@ -161,7 +172,7 @@ impl ::protobuf::Message for TopTracks { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -197,24 +208,35 @@ impl ::protobuf::Message for TopTracks { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "country", - |m: &TopTracks| { &m.country }, - |m: &mut TopTracks| { &mut m.country }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "track", - |m: &TopTracks| { &m.track }, - |m: &mut TopTracks| { &mut m.track }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "country", + |m: &TopTracks| &m.country, + |m: &mut TopTracks| &mut m.country, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "track", + |m: &TopTracks| &m.track, + |m: &mut TopTracks| &mut m.track, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "TopTracks", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -222,9 +244,7 @@ impl ::protobuf::Message for TopTracks { fn default_instance() -> &'static TopTracks { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(TopTracks::new) - } + unsafe { instance.get(TopTracks::new) } } } @@ -248,7 +268,7 @@ impl ::protobuf::reflect::ProtobufValue for TopTracks { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ActivityPeriod { // message fields start_year: ::std::option::Option, @@ -272,7 +292,6 @@ impl ActivityPeriod { // optional sint32 start_year = 1; - pub fn get_start_year(&self) -> i32 { self.start_year.unwrap_or(0) } @@ -291,7 +310,6 @@ impl ActivityPeriod { // optional sint32 end_year = 2; - pub fn get_end_year(&self) -> i32 { self.end_year.unwrap_or(0) } @@ -310,7 +328,6 @@ impl ActivityPeriod { // optional sint32 decade = 3; - pub fn get_decade(&self) -> i32 { self.decade.unwrap_or(0) } @@ -333,34 +350,48 @@ impl ::protobuf::Message for ActivityPeriod { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.start_year = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.end_year = ::std::option::Option::Some(tmp); - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.decade = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -384,7 +415,10 @@ impl ::protobuf::Message for ActivityPeriod { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.start_year { os.write_sint32(1, v)?; } @@ -429,29 +463,39 @@ impl ::protobuf::Message for ActivityPeriod { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "start_year", - |m: &ActivityPeriod| { &m.start_year }, - |m: &mut ActivityPeriod| { &mut m.start_year }, + |m: &ActivityPeriod| &m.start_year, + |m: &mut ActivityPeriod| &mut m.start_year, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "end_year", - |m: &ActivityPeriod| { &m.end_year }, - |m: &mut ActivityPeriod| { &mut m.end_year }, + |m: &ActivityPeriod| &m.end_year, + |m: &mut ActivityPeriod| &mut m.end_year, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "decade", - |m: &ActivityPeriod| { &m.decade }, - |m: &mut ActivityPeriod| { &mut m.decade }, + |m: &ActivityPeriod| &m.decade, + |m: &mut ActivityPeriod| &mut m.decade, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ActivityPeriod", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -459,9 +503,7 @@ impl ::protobuf::Message for ActivityPeriod { fn default_instance() -> &'static ActivityPeriod { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ActivityPeriod::new) - } + unsafe { instance.get(ActivityPeriod::new) } } } @@ -486,7 +528,7 @@ impl ::protobuf::reflect::ProtobufValue for ActivityPeriod { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Artist { // message fields gid: ::protobuf::SingularField<::std::vec::Vec>, @@ -524,7 +566,6 @@ impl Artist { // optional bytes gid = 1; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -560,7 +601,6 @@ impl Artist { // optional string name = 2; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -591,12 +631,13 @@ impl Artist { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional sint32 popularity = 3; - pub fn get_popularity(&self) -> i32 { self.popularity.unwrap_or(0) } @@ -615,7 +656,6 @@ impl Artist { // repeated .TopTracks top_track = 4; - pub fn get_top_track(&self) -> &[TopTracks] { &self.top_track } @@ -640,7 +680,6 @@ impl Artist { // repeated .AlbumGroup album_group = 5; - pub fn get_album_group(&self) -> &[AlbumGroup] { &self.album_group } @@ -665,7 +704,6 @@ impl Artist { // repeated .AlbumGroup single_group = 6; - pub fn get_single_group(&self) -> &[AlbumGroup] { &self.single_group } @@ -690,7 +728,6 @@ impl Artist { // repeated .AlbumGroup compilation_group = 7; - pub fn get_compilation_group(&self) -> &[AlbumGroup] { &self.compilation_group } @@ -710,12 +747,14 @@ impl Artist { // Take field pub fn take_compilation_group(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.compilation_group, ::protobuf::RepeatedField::new()) + ::std::mem::replace( + &mut self.compilation_group, + ::protobuf::RepeatedField::new(), + ) } // repeated .AlbumGroup appears_on_group = 8; - pub fn get_appears_on_group(&self) -> &[AlbumGroup] { &self.appears_on_group } @@ -740,7 +779,6 @@ impl Artist { // repeated string genre = 9; - pub fn get_genre(&self) -> &[::std::string::String] { &self.genre } @@ -765,7 +803,6 @@ impl Artist { // repeated .ExternalId external_id = 10; - pub fn get_external_id(&self) -> &[ExternalId] { &self.external_id } @@ -790,7 +827,6 @@ impl Artist { // repeated .Image portrait = 11; - pub fn get_portrait(&self) -> &[Image] { &self.portrait } @@ -815,7 +851,6 @@ impl Artist { // repeated .Biography biography = 12; - pub fn get_biography(&self) -> &[Biography] { &self.biography } @@ -840,7 +875,6 @@ impl Artist { // repeated .ActivityPeriod activity_period = 13; - pub fn get_activity_period(&self) -> &[ActivityPeriod] { &self.activity_period } @@ -865,7 +899,6 @@ impl Artist { // repeated .Restriction restriction = 14; - pub fn get_restriction(&self) -> &[Restriction] { &self.restriction } @@ -890,7 +923,6 @@ impl Artist { // repeated .Artist related = 15; - pub fn get_related(&self) -> &[Artist] { &self.related } @@ -915,7 +947,6 @@ impl Artist { // optional bool is_portrait_album_cover = 16; - pub fn get_is_portrait_album_cover(&self) -> bool { self.is_portrait_album_cover.unwrap_or(false) } @@ -934,9 +965,10 @@ impl Artist { // optional .ImageGroup portrait_group = 17; - pub fn get_portrait_group(&self) -> &ImageGroup { - self.portrait_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + self.portrait_group + .as_ref() + .unwrap_or_else(|| ImageGroup::default_instance()) } pub fn clear_portrait_group(&mut self) { self.portrait_group.clear(); @@ -962,7 +994,9 @@ impl Artist { // Take field pub fn take_portrait_group(&mut self) -> ImageGroup { - self.portrait_group.take().unwrap_or_else(|| ImageGroup::new()) + self.portrait_group + .take() + .unwrap_or_else(|| ImageGroup::new()) } } @@ -972,131 +1006,175 @@ impl ::protobuf::Message for Artist { if !v.is_initialized() { return false; } - }; + } for v in &self.album_group { if !v.is_initialized() { return false; } - }; + } for v in &self.single_group { if !v.is_initialized() { return false; } - }; + } for v in &self.compilation_group { if !v.is_initialized() { return false; } - }; + } for v in &self.appears_on_group { if !v.is_initialized() { return false; } - }; + } for v in &self.external_id { if !v.is_initialized() { return false; } - }; + } for v in &self.portrait { if !v.is_initialized() { return false; } - }; + } for v in &self.biography { if !v.is_initialized() { return false; } - }; + } for v in &self.activity_period { if !v.is_initialized() { return false; } - }; + } for v in &self.restriction { if !v.is_initialized() { return false; } - }; + } for v in &self.related { if !v.is_initialized() { return false; } - }; + } for v in &self.portrait_group { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.popularity = ::std::option::Option::Some(tmp); - }, + } 4 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.top_track)?; - }, + } 5 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.album_group)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.album_group, + )?; + } 6 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.single_group)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.single_group, + )?; + } 7 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.compilation_group)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.compilation_group, + )?; + } 8 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.appears_on_group)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.appears_on_group, + )?; + } 9 => { ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.genre)?; - }, + } 10 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.external_id)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.external_id, + )?; + } 11 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.portrait)?; - }, + } 12 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.biography)?; - }, + } 13 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.activity_period)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.activity_period, + )?; + } 14 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.restriction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.restriction, + )?; + } 15 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.related)?; - }, + } 16 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.is_portrait_album_cover = ::std::option::Option::Some(tmp); - }, + } 17 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.portrait_group)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.portrait_group, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1118,50 +1196,50 @@ impl ::protobuf::Message for Artist { for value in &self.top_track { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.album_group { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.single_group { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.compilation_group { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.appears_on_group { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.genre { my_size += ::protobuf::rt::string_size(9, &value); - }; + } for value in &self.external_id { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.portrait { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.biography { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.activity_period { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.restriction { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.related { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(v) = self.is_portrait_album_cover { my_size += 3; } @@ -1174,7 +1252,10 @@ impl ::protobuf::Message for Artist { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gid.as_ref() { os.write_bytes(1, &v)?; } @@ -1188,60 +1269,60 @@ impl ::protobuf::Message for Artist { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.album_group { os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.single_group { os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.compilation_group { os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.appears_on_group { os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.genre { os.write_string(9, &v)?; - }; + } for v in &self.external_id { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.portrait { os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.biography { os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.activity_period { os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.restriction { os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.related { os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(v) = self.is_portrait_album_cover { os.write_bool(16, v)?; } @@ -1285,99 +1366,175 @@ impl ::protobuf::Message for Artist { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &Artist| { &m.gid }, - |m: &mut Artist| { &mut m.gid }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Artist| { &m.name }, - |m: &mut Artist| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >("gid", |m: &Artist| &m.gid, |m: &mut Artist| &mut m.gid), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "name", |m: &Artist| &m.name, |m: &mut Artist| &mut m.name + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "popularity", - |m: &Artist| { &m.popularity }, - |m: &mut Artist| { &mut m.popularity }, + |m: &Artist| &m.popularity, + |m: &mut Artist| &mut m.popularity, )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "top_track", - |m: &Artist| { &m.top_track }, - |m: &mut Artist| { &mut m.top_track }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "album_group", - |m: &Artist| { &m.album_group }, - |m: &mut Artist| { &mut m.album_group }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "single_group", - |m: &Artist| { &m.single_group }, - |m: &mut Artist| { &mut m.single_group }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "compilation_group", - |m: &Artist| { &m.compilation_group }, - |m: &mut Artist| { &mut m.compilation_group }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "appears_on_group", - |m: &Artist| { &m.appears_on_group }, - |m: &mut Artist| { &mut m.appears_on_group }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "genre", - |m: &Artist| { &m.genre }, - |m: &mut Artist| { &mut m.genre }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "external_id", - |m: &Artist| { &m.external_id }, - |m: &mut Artist| { &mut m.external_id }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "portrait", - |m: &Artist| { &m.portrait }, - |m: &mut Artist| { &mut m.portrait }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "biography", - |m: &Artist| { &m.biography }, - |m: &mut Artist| { &mut m.biography }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "activity_period", - |m: &Artist| { &m.activity_period }, - |m: &mut Artist| { &mut m.activity_period }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "restriction", - |m: &Artist| { &m.restriction }, - |m: &mut Artist| { &mut m.restriction }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "related", - |m: &Artist| { &m.related }, - |m: &mut Artist| { &mut m.related }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "top_track", + |m: &Artist| &m.top_track, + |m: &mut Artist| &mut m.top_track, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "album_group", + |m: &Artist| &m.album_group, + |m: &mut Artist| &mut m.album_group, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "single_group", + |m: &Artist| &m.single_group, + |m: &mut Artist| &mut m.single_group, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "compilation_group", + |m: &Artist| &m.compilation_group, + |m: &mut Artist| &mut m.compilation_group, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "appears_on_group", + |m: &Artist| &m.appears_on_group, + |m: &mut Artist| &mut m.appears_on_group, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "genre", + |m: &Artist| &m.genre, + |m: &mut Artist| &mut m.genre, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "external_id", + |m: &Artist| &m.external_id, + |m: &mut Artist| &mut m.external_id, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "portrait", + |m: &Artist| &m.portrait, + |m: &mut Artist| &mut m.portrait, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "biography", + |m: &Artist| &m.biography, + |m: &mut Artist| &mut m.biography, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "activity_period", + |m: &Artist| &m.activity_period, + |m: &mut Artist| &mut m.activity_period, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "restriction", + |m: &Artist| &m.restriction, + |m: &mut Artist| &mut m.restriction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "related", + |m: &Artist| &m.related, + |m: &mut Artist| &mut m.related, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "is_portrait_album_cover", - |m: &Artist| { &m.is_portrait_album_cover }, - |m: &mut Artist| { &mut m.is_portrait_album_cover }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "portrait_group", - |m: &Artist| { &m.portrait_group }, - |m: &mut Artist| { &mut m.portrait_group }, + |m: &Artist| &m.is_portrait_album_cover, + |m: &mut Artist| &mut m.is_portrait_album_cover, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "portrait_group", + |m: &Artist| &m.portrait_group, + |m: &mut Artist| &mut m.portrait_group, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Artist", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1385,9 +1542,7 @@ impl ::protobuf::Message for Artist { fn default_instance() -> &'static Artist { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Artist::new) - } + unsafe { instance.get(Artist::new) } } } @@ -1426,7 +1581,7 @@ impl ::protobuf::reflect::ProtobufValue for Artist { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct AlbumGroup { // message fields album: ::protobuf::RepeatedField, @@ -1448,7 +1603,6 @@ impl AlbumGroup { // repeated .Album album = 1; - pub fn get_album(&self) -> &[Album] { &self.album } @@ -1478,20 +1632,28 @@ impl ::protobuf::Message for AlbumGroup { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.album)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1504,18 +1666,21 @@ impl ::protobuf::Message for AlbumGroup { for value in &self.album { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.album { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1551,19 +1716,25 @@ impl ::protobuf::Message for AlbumGroup { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "album", - |m: &AlbumGroup| { &m.album }, - |m: &mut AlbumGroup| { &mut m.album }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "album", + |m: &AlbumGroup| &m.album, + |m: &mut AlbumGroup| &mut m.album, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "AlbumGroup", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1571,9 +1742,7 @@ impl ::protobuf::Message for AlbumGroup { fn default_instance() -> &'static AlbumGroup { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(AlbumGroup::new) - } + unsafe { instance.get(AlbumGroup::new) } } } @@ -1596,7 +1765,7 @@ impl ::protobuf::reflect::ProtobufValue for AlbumGroup { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Date { // message fields year: ::std::option::Option, @@ -1622,7 +1791,6 @@ impl Date { // optional sint32 year = 1; - pub fn get_year(&self) -> i32 { self.year.unwrap_or(0) } @@ -1641,7 +1809,6 @@ impl Date { // optional sint32 month = 2; - pub fn get_month(&self) -> i32 { self.month.unwrap_or(0) } @@ -1660,7 +1827,6 @@ impl Date { // optional sint32 day = 3; - pub fn get_day(&self) -> i32 { self.day.unwrap_or(0) } @@ -1679,7 +1845,6 @@ impl Date { // optional sint32 hour = 4; - pub fn get_hour(&self) -> i32 { self.hour.unwrap_or(0) } @@ -1698,7 +1863,6 @@ impl Date { // optional sint32 minute = 5; - pub fn get_minute(&self) -> i32 { self.minute.unwrap_or(0) } @@ -1721,48 +1885,66 @@ impl ::protobuf::Message for Date { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.year = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.month = ::std::option::Option::Some(tmp); - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.day = ::std::option::Option::Some(tmp); - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.hour = ::std::option::Option::Some(tmp); - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.minute = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1792,7 +1974,10 @@ impl ::protobuf::Message for Date { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.year { os.write_sint32(1, v)?; } @@ -1843,39 +2028,47 @@ impl ::protobuf::Message for Date { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( - "year", - |m: &Date| { &m.year }, - |m: &mut Date| { &mut m.year }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( + "year", |m: &Date| &m.year, |m: &mut Date| &mut m.year )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( - "month", - |m: &Date| { &m.month }, - |m: &mut Date| { &mut m.month }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( + "month", |m: &Date| &m.month, |m: &mut Date| &mut m.month )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( - "day", - |m: &Date| { &m.day }, - |m: &mut Date| { &mut m.day }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( + "day", |m: &Date| &m.day, |m: &mut Date| &mut m.day )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( - "hour", - |m: &Date| { &m.hour }, - |m: &mut Date| { &mut m.hour }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( + "hour", |m: &Date| &m.hour, |m: &mut Date| &mut m.hour )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "minute", - |m: &Date| { &m.minute }, - |m: &mut Date| { &mut m.minute }, + |m: &Date| &m.minute, + |m: &mut Date| &mut m.minute, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Date", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1883,9 +2076,7 @@ impl ::protobuf::Message for Date { fn default_instance() -> &'static Date { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Date::new) - } + unsafe { instance.get(Date::new) } } } @@ -1912,7 +2103,7 @@ impl ::protobuf::reflect::ProtobufValue for Date { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Album { // message fields gid: ::protobuf::SingularField<::std::vec::Vec>, @@ -1950,7 +2141,6 @@ impl Album { // optional bytes gid = 1; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -1986,7 +2176,6 @@ impl Album { // optional string name = 2; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -2017,12 +2206,13 @@ impl Album { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Artist artist = 3; - pub fn get_artist(&self) -> &[Artist] { &self.artist } @@ -2047,7 +2237,6 @@ impl Album { // optional .Album.Type typ = 4; - pub fn get_typ(&self) -> Album_Type { self.typ.unwrap_or(Album_Type::ALBUM) } @@ -2066,7 +2255,6 @@ impl Album { // optional string label = 5; - pub fn get_label(&self) -> &str { match self.label.as_ref() { Some(v) => &v, @@ -2097,14 +2285,17 @@ impl Album { // Take field pub fn take_label(&mut self) -> ::std::string::String { - self.label.take().unwrap_or_else(|| ::std::string::String::new()) + self.label + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .Date date = 6; - pub fn get_date(&self) -> &Date { - self.date.as_ref().unwrap_or_else(|| Date::default_instance()) + self.date + .as_ref() + .unwrap_or_else(|| Date::default_instance()) } pub fn clear_date(&mut self) { self.date.clear(); @@ -2135,7 +2326,6 @@ impl Album { // optional sint32 popularity = 7; - pub fn get_popularity(&self) -> i32 { self.popularity.unwrap_or(0) } @@ -2154,7 +2344,6 @@ impl Album { // repeated string genre = 8; - pub fn get_genre(&self) -> &[::std::string::String] { &self.genre } @@ -2179,7 +2368,6 @@ impl Album { // repeated .Image cover = 9; - pub fn get_cover(&self) -> &[Image] { &self.cover } @@ -2204,7 +2392,6 @@ impl Album { // repeated .ExternalId external_id = 10; - pub fn get_external_id(&self) -> &[ExternalId] { &self.external_id } @@ -2229,7 +2416,6 @@ impl Album { // repeated .Disc disc = 11; - pub fn get_disc(&self) -> &[Disc] { &self.disc } @@ -2254,7 +2440,6 @@ impl Album { // repeated string review = 12; - pub fn get_review(&self) -> &[::std::string::String] { &self.review } @@ -2279,7 +2464,6 @@ impl Album { // repeated .Copyright copyright = 13; - pub fn get_copyright(&self) -> &[Copyright] { &self.copyright } @@ -2304,7 +2488,6 @@ impl Album { // repeated .Restriction restriction = 14; - pub fn get_restriction(&self) -> &[Restriction] { &self.restriction } @@ -2329,7 +2512,6 @@ impl Album { // repeated .Album related = 15; - pub fn get_related(&self) -> &[Album] { &self.related } @@ -2354,7 +2536,6 @@ impl Album { // repeated .SalePeriod sale_period = 16; - pub fn get_sale_period(&self) -> &[SalePeriod] { &self.sale_period } @@ -2379,9 +2560,10 @@ impl Album { // optional .ImageGroup cover_group = 17; - pub fn get_cover_group(&self) -> &ImageGroup { - self.cover_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + self.cover_group + .as_ref() + .unwrap_or_else(|| ImageGroup::default_instance()) } pub fn clear_cover_group(&mut self) { self.cover_group.clear(); @@ -2417,117 +2599,147 @@ impl ::protobuf::Message for Album { if !v.is_initialized() { return false; } - }; + } for v in &self.date { if !v.is_initialized() { return false; } - }; + } for v in &self.cover { if !v.is_initialized() { return false; } - }; + } for v in &self.external_id { if !v.is_initialized() { return false; } - }; + } for v in &self.disc { if !v.is_initialized() { return false; } - }; + } for v in &self.copyright { if !v.is_initialized() { return false; } - }; + } for v in &self.restriction { if !v.is_initialized() { return false; } - }; + } for v in &self.related { if !v.is_initialized() { return false; } - }; + } for v in &self.sale_period { if !v.is_initialized() { return false; } - }; + } for v in &self.cover_group { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 3 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.artist)?; - }, - 4 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 4, &mut self.unknown_fields)? - }, + } + 4 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.typ, + 4, + &mut self.unknown_fields, + )?, 5 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.label)?; - }, + } 6 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.date)?; - }, + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.popularity = ::std::option::Option::Some(tmp); - }, + } 8 => { ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.genre)?; - }, + } 9 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.cover)?; - }, + } 10 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.external_id)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.external_id, + )?; + } 11 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.disc)?; - }, + } 12 => { ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.review)?; - }, + } 13 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.copyright)?; - }, + } 14 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.restriction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.restriction, + )?; + } 15 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.related)?; - }, + } 16 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.sale_period)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.sale_period, + )?; + } 17 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cover_group)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.cover_group, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2546,7 +2758,7 @@ impl ::protobuf::Message for Album { for value in &self.artist { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(v) = self.typ { my_size += ::protobuf::rt::enum_size(4, v); } @@ -2562,38 +2774,38 @@ impl ::protobuf::Message for Album { } for value in &self.genre { my_size += ::protobuf::rt::string_size(8, &value); - }; + } for value in &self.cover { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.external_id { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.disc { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.review { my_size += ::protobuf::rt::string_size(12, &value); - }; + } for value in &self.copyright { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.restriction { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.related { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.sale_period { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.cover_group.as_ref() { let len = v.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -2603,7 +2815,10 @@ impl ::protobuf::Message for Album { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gid.as_ref() { os.write_bytes(1, &v)?; } @@ -2614,7 +2829,7 @@ impl ::protobuf::Message for Album { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(v) = self.typ { os.write_enum(4, v.value())?; } @@ -2631,45 +2846,45 @@ impl ::protobuf::Message for Album { } for v in &self.genre { os.write_string(8, &v)?; - }; + } for v in &self.cover { os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.external_id { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.disc { os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.review { os.write_string(12, &v)?; - }; + } for v in &self.copyright { os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.restriction { os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.related { os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.sale_period { os.write_tag(16, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.cover_group.as_ref() { os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2710,99 +2925,157 @@ impl ::protobuf::Message for Album { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &Album| { &m.gid }, - |m: &mut Album| { &mut m.gid }, + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >("gid", |m: &Album| &m.gid, |m: &mut Album| &mut m.gid), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >("name", |m: &Album| &m.name, |m: &mut Album| &mut m.name), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "artist", + |m: &Album| &m.artist, + |m: &mut Album| &mut m.artist, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( + "typ", |m: &Album| &m.typ, |m: &mut Album| &mut m.typ )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Album| { &m.name }, - |m: &mut Album| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "artist", - |m: &Album| { &m.artist }, - |m: &mut Album| { &mut m.artist }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "typ", - |m: &Album| { &m.typ }, - |m: &mut Album| { &mut m.typ }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "label", - |m: &Album| { &m.label }, - |m: &mut Album| { &mut m.label }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "date", - |m: &Album| { &m.date }, - |m: &mut Album| { &mut m.date }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "label", |m: &Album| &m.label, |m: &mut Album| &mut m.label + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("date", |m: &Album| &m.date, |m: &mut Album| &mut m.date), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "popularity", - |m: &Album| { &m.popularity }, - |m: &mut Album| { &mut m.popularity }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "genre", - |m: &Album| { &m.genre }, - |m: &mut Album| { &mut m.genre }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "cover", - |m: &Album| { &m.cover }, - |m: &mut Album| { &mut m.cover }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "external_id", - |m: &Album| { &m.external_id }, - |m: &mut Album| { &mut m.external_id }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "disc", - |m: &Album| { &m.disc }, - |m: &mut Album| { &mut m.disc }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "review", - |m: &Album| { &m.review }, - |m: &mut Album| { &mut m.review }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "copyright", - |m: &Album| { &m.copyright }, - |m: &mut Album| { &mut m.copyright }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "restriction", - |m: &Album| { &m.restriction }, - |m: &mut Album| { &mut m.restriction }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "related", - |m: &Album| { &m.related }, - |m: &mut Album| { &mut m.related }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "sale_period", - |m: &Album| { &m.sale_period }, - |m: &mut Album| { &mut m.sale_period }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "cover_group", - |m: &Album| { &m.cover_group }, - |m: &mut Album| { &mut m.cover_group }, + |m: &Album| &m.popularity, + |m: &mut Album| &mut m.popularity, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "genre", |m: &Album| &m.genre, |m: &mut Album| &mut m.genre + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "cover", |m: &Album| &m.cover, |m: &mut Album| &mut m.cover + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "external_id", + |m: &Album| &m.external_id, + |m: &mut Album| &mut m.external_id, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("disc", |m: &Album| &m.disc, |m: &mut Album| &mut m.disc), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "review", + |m: &Album| &m.review, + |m: &mut Album| &mut m.review, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "copyright", + |m: &Album| &m.copyright, + |m: &mut Album| &mut m.copyright, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "restriction", + |m: &Album| &m.restriction, + |m: &mut Album| &mut m.restriction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "related", + |m: &Album| &m.related, + |m: &mut Album| &mut m.related, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "sale_period", + |m: &Album| &m.sale_period, + |m: &mut Album| &mut m.sale_period, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "cover_group", + |m: &Album| &m.cover_group, + |m: &mut Album| &mut m.cover_group, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Album", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2810,9 +3083,7 @@ impl ::protobuf::Message for Album { fn default_instance() -> &'static Album { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Album::new) - } + unsafe { instance.get(Album::new) } } } @@ -2851,7 +3122,7 @@ impl ::protobuf::reflect::ProtobufValue for Album { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Album_Type { ALBUM = 1, SINGLE = 2, @@ -2870,7 +3141,7 @@ impl ::protobuf::ProtobufEnum for Album_Type { 2 => ::std::option::Option::Some(Album_Type::SINGLE), 3 => ::std::option::Option::Some(Album_Type::COMPILATION), 4 => ::std::option::Option::Some(Album_Type::EP), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -2885,17 +3156,20 @@ impl ::protobuf::ProtobufEnum for Album_Type { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Album.Type", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Album.Type", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Album_Type { -} +impl ::std::marker::Copy for Album_Type {} // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for Album_Type { @@ -2910,7 +3184,7 @@ impl ::protobuf::reflect::ProtobufValue for Album_Type { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Track { // message fields gid: ::protobuf::SingularField<::std::vec::Vec>, @@ -2946,7 +3220,6 @@ impl Track { // optional bytes gid = 1; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -2982,7 +3255,6 @@ impl Track { // optional string name = 2; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -3013,14 +3285,17 @@ impl Track { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .Album album = 3; - pub fn get_album(&self) -> &Album { - self.album.as_ref().unwrap_or_else(|| Album::default_instance()) + self.album + .as_ref() + .unwrap_or_else(|| Album::default_instance()) } pub fn clear_album(&mut self) { self.album.clear(); @@ -3051,7 +3326,6 @@ impl Track { // repeated .Artist artist = 4; - pub fn get_artist(&self) -> &[Artist] { &self.artist } @@ -3076,7 +3350,6 @@ impl Track { // optional sint32 number = 5; - pub fn get_number(&self) -> i32 { self.number.unwrap_or(0) } @@ -3095,7 +3368,6 @@ impl Track { // optional sint32 disc_number = 6; - pub fn get_disc_number(&self) -> i32 { self.disc_number.unwrap_or(0) } @@ -3114,7 +3386,6 @@ impl Track { // optional sint32 duration = 7; - pub fn get_duration(&self) -> i32 { self.duration.unwrap_or(0) } @@ -3133,7 +3404,6 @@ impl Track { // optional sint32 popularity = 8; - pub fn get_popularity(&self) -> i32 { self.popularity.unwrap_or(0) } @@ -3152,7 +3422,6 @@ impl Track { // optional bool explicit = 9; - pub fn get_explicit(&self) -> bool { self.explicit.unwrap_or(false) } @@ -3171,7 +3440,6 @@ impl Track { // repeated .ExternalId external_id = 10; - pub fn get_external_id(&self) -> &[ExternalId] { &self.external_id } @@ -3196,7 +3464,6 @@ impl Track { // repeated .Restriction restriction = 11; - pub fn get_restriction(&self) -> &[Restriction] { &self.restriction } @@ -3221,7 +3488,6 @@ impl Track { // repeated .AudioFile file = 12; - pub fn get_file(&self) -> &[AudioFile] { &self.file } @@ -3246,7 +3512,6 @@ impl Track { // repeated .Track alternative = 13; - pub fn get_alternative(&self) -> &[Track] { &self.alternative } @@ -3271,7 +3536,6 @@ impl Track { // repeated .SalePeriod sale_period = 14; - pub fn get_sale_period(&self) -> &[SalePeriod] { &self.sale_period } @@ -3296,7 +3560,6 @@ impl Track { // repeated .AudioFile preview = 15; - pub fn get_preview(&self) -> &[AudioFile] { &self.preview } @@ -3326,117 +3589,151 @@ impl ::protobuf::Message for Track { if !v.is_initialized() { return false; } - }; + } for v in &self.artist { if !v.is_initialized() { return false; } - }; + } for v in &self.external_id { if !v.is_initialized() { return false; } - }; + } for v in &self.restriction { if !v.is_initialized() { return false; } - }; + } for v in &self.file { if !v.is_initialized() { return false; } - }; + } for v in &self.alternative { if !v.is_initialized() { return false; } - }; + } for v in &self.sale_period { if !v.is_initialized() { return false; } - }; + } for v in &self.preview { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 3 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.album)?; - }, + } 4 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.artist)?; - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.number = ::std::option::Option::Some(tmp); - }, + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.disc_number = ::std::option::Option::Some(tmp); - }, + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.duration = ::std::option::Option::Some(tmp); - }, + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.popularity = ::std::option::Option::Some(tmp); - }, + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.explicit = ::std::option::Option::Some(tmp); - }, + } 10 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.external_id)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.external_id, + )?; + } 11 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.restriction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.restriction, + )?; + } 12 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.file)?; - }, + } 13 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.alternative)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.alternative, + )?; + } 14 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.sale_period)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.sale_period, + )?; + } 15 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.preview)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3459,7 +3756,7 @@ impl ::protobuf::Message for Track { for value in &self.artist { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(v) = self.number { my_size += ::protobuf::rt::value_varint_zigzag_size(5, v); } @@ -3478,33 +3775,36 @@ impl ::protobuf::Message for Track { for value in &self.external_id { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.restriction { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.file { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.alternative { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.sale_period { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.preview { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gid.as_ref() { os.write_bytes(1, &v)?; } @@ -3520,7 +3820,7 @@ impl ::protobuf::Message for Track { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(v) = self.number { os.write_sint32(5, v)?; } @@ -3540,32 +3840,32 @@ impl ::protobuf::Message for Track { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.restriction { os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.file { os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.alternative { os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.sale_period { os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.preview { os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -3601,89 +3901,141 @@ impl ::protobuf::Message for Track { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &Track| { &m.gid }, - |m: &mut Track| { &mut m.gid }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Track| { &m.name }, - |m: &mut Track| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "album", - |m: &Track| { &m.album }, - |m: &mut Track| { &mut m.album }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "artist", - |m: &Track| { &m.artist }, - |m: &mut Track| { &mut m.artist }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >("gid", |m: &Track| &m.gid, |m: &mut Track| &mut m.gid), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >("name", |m: &Track| &m.name, |m: &mut Track| &mut m.name), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "album", |m: &Track| &m.album, |m: &mut Track| &mut m.album + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "artist", + |m: &Track| &m.artist, + |m: &mut Track| &mut m.artist, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "number", - |m: &Track| { &m.number }, - |m: &mut Track| { &mut m.number }, + |m: &Track| &m.number, + |m: &mut Track| &mut m.number, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "disc_number", - |m: &Track| { &m.disc_number }, - |m: &mut Track| { &mut m.disc_number }, + |m: &Track| &m.disc_number, + |m: &mut Track| &mut m.disc_number, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "duration", - |m: &Track| { &m.duration }, - |m: &mut Track| { &mut m.duration }, + |m: &Track| &m.duration, + |m: &mut Track| &mut m.duration, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "popularity", - |m: &Track| { &m.popularity }, - |m: &mut Track| { &mut m.popularity }, + |m: &Track| &m.popularity, + |m: &mut Track| &mut m.popularity, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "explicit", - |m: &Track| { &m.explicit }, - |m: &mut Track| { &mut m.explicit }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "external_id", - |m: &Track| { &m.external_id }, - |m: &mut Track| { &mut m.external_id }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "restriction", - |m: &Track| { &m.restriction }, - |m: &mut Track| { &mut m.restriction }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "file", - |m: &Track| { &m.file }, - |m: &mut Track| { &mut m.file }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "alternative", - |m: &Track| { &m.alternative }, - |m: &mut Track| { &mut m.alternative }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "sale_period", - |m: &Track| { &m.sale_period }, - |m: &mut Track| { &mut m.sale_period }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "preview", - |m: &Track| { &m.preview }, - |m: &mut Track| { &mut m.preview }, + |m: &Track| &m.explicit, + |m: &mut Track| &mut m.explicit, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "external_id", + |m: &Track| &m.external_id, + |m: &mut Track| &mut m.external_id, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "restriction", + |m: &Track| &m.restriction, + |m: &mut Track| &mut m.restriction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("file", |m: &Track| &m.file, |m: &mut Track| &mut m.file), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "alternative", + |m: &Track| &m.alternative, + |m: &mut Track| &mut m.alternative, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "sale_period", + |m: &Track| &m.sale_period, + |m: &mut Track| &mut m.sale_period, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "preview", + |m: &Track| &m.preview, + |m: &mut Track| &mut m.preview, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Track", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3691,9 +4043,7 @@ impl ::protobuf::Message for Track { fn default_instance() -> &'static Track { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Track::new) - } + unsafe { instance.get(Track::new) } } } @@ -3730,7 +4080,7 @@ impl ::protobuf::reflect::ProtobufValue for Track { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Image { // message fields file_id: ::protobuf::SingularField<::std::vec::Vec>, @@ -3755,7 +4105,6 @@ impl Image { // optional bytes file_id = 1; - pub fn get_file_id(&self) -> &[u8] { match self.file_id.as_ref() { Some(v) => &v, @@ -3786,12 +4135,13 @@ impl Image { // Take field pub fn take_file_id(&mut self) -> ::std::vec::Vec { - self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.file_id + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional .Image.Size size = 2; - pub fn get_size(&self) -> Image_Size { self.size.unwrap_or(Image_Size::DEFAULT) } @@ -3810,7 +4160,6 @@ impl Image { // optional sint32 width = 3; - pub fn get_width(&self) -> i32 { self.width.unwrap_or(0) } @@ -3829,7 +4178,6 @@ impl Image { // optional sint32 height = 4; - pub fn get_height(&self) -> i32 { self.height.unwrap_or(0) } @@ -3852,33 +4200,49 @@ impl ::protobuf::Message for Image { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.file_id)?; - }, - 2 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.size, 2, &mut self.unknown_fields)? - }, + } + 2 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.size, + 2, + &mut self.unknown_fields, + )?, 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.width = ::std::option::Option::Some(tmp); - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.height = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3905,7 +4269,10 @@ impl ::protobuf::Message for Image { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.file_id.as_ref() { os.write_bytes(1, &v)?; } @@ -3953,34 +4320,47 @@ impl ::protobuf::Message for Image { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "file_id", - |m: &Image| { &m.file_id }, - |m: &mut Image| { &mut m.file_id }, + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "file_id", + |m: &Image| &m.file_id, + |m: &mut Image| &mut m.file_id, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( + "size", |m: &Image| &m.size, |m: &mut Image| &mut m.size )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "size", - |m: &Image| { &m.size }, - |m: &mut Image| { &mut m.size }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "width", - |m: &Image| { &m.width }, - |m: &mut Image| { &mut m.width }, + |m: &Image| &m.width, + |m: &mut Image| &mut m.width, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "height", - |m: &Image| { &m.height }, - |m: &mut Image| { &mut m.height }, + |m: &Image| &m.height, + |m: &mut Image| &mut m.height, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Image", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3988,9 +4368,7 @@ impl ::protobuf::Message for Image { fn default_instance() -> &'static Image { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Image::new) - } + unsafe { instance.get(Image::new) } } } @@ -4016,7 +4394,7 @@ impl ::protobuf::reflect::ProtobufValue for Image { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Image_Size { DEFAULT = 0, SMALL = 1, @@ -4035,7 +4413,7 @@ impl ::protobuf::ProtobufEnum for Image_Size { 1 => ::std::option::Option::Some(Image_Size::SMALL), 2 => ::std::option::Option::Some(Image_Size::LARGE), 3 => ::std::option::Option::Some(Image_Size::XLARGE), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -4050,17 +4428,20 @@ impl ::protobuf::ProtobufEnum for Image_Size { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Image.Size", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Image.Size", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Image_Size { -} +impl ::std::marker::Copy for Image_Size {} impl ::std::default::Default for Image_Size { fn default() -> Self { @@ -4074,7 +4455,7 @@ impl ::protobuf::reflect::ProtobufValue for Image_Size { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ImageGroup { // message fields image: ::protobuf::RepeatedField, @@ -4096,7 +4477,6 @@ impl ImageGroup { // repeated .Image image = 1; - pub fn get_image(&self) -> &[Image] { &self.image } @@ -4126,20 +4506,28 @@ impl ::protobuf::Message for ImageGroup { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.image)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4152,18 +4540,21 @@ impl ::protobuf::Message for ImageGroup { for value in &self.image { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.image { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4199,19 +4590,25 @@ impl ::protobuf::Message for ImageGroup { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "image", - |m: &ImageGroup| { &m.image }, - |m: &mut ImageGroup| { &mut m.image }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "image", + |m: &ImageGroup| &m.image, + |m: &mut ImageGroup| &mut m.image, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ImageGroup", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -4219,9 +4616,7 @@ impl ::protobuf::Message for ImageGroup { fn default_instance() -> &'static ImageGroup { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ImageGroup::new) - } + unsafe { instance.get(ImageGroup::new) } } } @@ -4244,7 +4639,7 @@ impl ::protobuf::reflect::ProtobufValue for ImageGroup { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Biography { // message fields text: ::protobuf::SingularField<::std::string::String>, @@ -4268,7 +4663,6 @@ impl Biography { // optional string text = 1; - pub fn get_text(&self) -> &str { match self.text.as_ref() { Some(v) => &v, @@ -4299,12 +4693,13 @@ impl Biography { // Take field pub fn take_text(&mut self) -> ::std::string::String { - self.text.take().unwrap_or_else(|| ::std::string::String::new()) + self.text + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Image portrait = 2; - pub fn get_portrait(&self) -> &[Image] { &self.portrait } @@ -4329,7 +4724,6 @@ impl Biography { // repeated .ImageGroup portrait_group = 3; - pub fn get_portrait_group(&self) -> &[ImageGroup] { &self.portrait_group } @@ -4359,31 +4753,43 @@ impl ::protobuf::Message for Biography { if !v.is_initialized() { return false; } - }; + } for v in &self.portrait_group { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.text)?; - }, + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.portrait)?; - }, + } 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.portrait_group)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.portrait_group, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4399,17 +4805,20 @@ impl ::protobuf::Message for Biography { for value in &self.portrait { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.portrait_group { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.text.as_ref() { os.write_string(1, &v)?; } @@ -4417,12 +4826,12 @@ impl ::protobuf::Message for Biography { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.portrait_group { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4458,29 +4867,45 @@ impl ::protobuf::Message for Biography { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "text", - |m: &Biography| { &m.text }, - |m: &mut Biography| { &mut m.text }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "portrait", - |m: &Biography| { &m.portrait }, - |m: &mut Biography| { &mut m.portrait }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "portrait_group", - |m: &Biography| { &m.portrait_group }, - |m: &mut Biography| { &mut m.portrait_group }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "text", + |m: &Biography| &m.text, + |m: &mut Biography| &mut m.text, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "portrait", + |m: &Biography| &m.portrait, + |m: &mut Biography| &mut m.portrait, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "portrait_group", + |m: &Biography| &m.portrait_group, + |m: &mut Biography| &mut m.portrait_group, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Biography", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -4488,9 +4913,7 @@ impl ::protobuf::Message for Biography { fn default_instance() -> &'static Biography { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Biography::new) - } + unsafe { instance.get(Biography::new) } } } @@ -4515,7 +4938,7 @@ impl ::protobuf::reflect::ProtobufValue for Biography { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Disc { // message fields number: ::std::option::Option, @@ -4539,7 +4962,6 @@ impl Disc { // optional sint32 number = 1; - pub fn get_number(&self) -> i32 { self.number.unwrap_or(0) } @@ -4558,7 +4980,6 @@ impl Disc { // optional string name = 2; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -4589,12 +5010,13 @@ impl Disc { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Track track = 3; - pub fn get_track(&self) -> &[Track] { &self.track } @@ -4624,30 +5046,40 @@ impl ::protobuf::Message for Disc { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.number = ::std::option::Option::Some(tmp); - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 3 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4666,13 +5098,16 @@ impl ::protobuf::Message for Disc { for value in &self.track { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.number { os.write_sint32(1, v)?; } @@ -4683,7 +5118,7 @@ impl ::protobuf::Message for Disc { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4719,29 +5154,35 @@ impl ::protobuf::Message for Disc { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "number", - |m: &Disc| { &m.number }, - |m: &mut Disc| { &mut m.number }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Disc| { &m.name }, - |m: &mut Disc| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "track", - |m: &Disc| { &m.track }, - |m: &mut Disc| { &mut m.track }, + |m: &Disc| &m.number, + |m: &mut Disc| &mut m.number, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >("name", |m: &Disc| &m.name, |m: &mut Disc| &mut m.name), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("track", |m: &Disc| &m.track, |m: &mut Disc| &mut m.track), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Disc", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -4749,9 +5190,7 @@ impl ::protobuf::Message for Disc { fn default_instance() -> &'static Disc { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Disc::new) - } + unsafe { instance.get(Disc::new) } } } @@ -4776,7 +5215,7 @@ impl ::protobuf::reflect::ProtobufValue for Disc { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Copyright { // message fields typ: ::std::option::Option, @@ -4799,7 +5238,6 @@ impl Copyright { // optional .Copyright.Type typ = 1; - pub fn get_typ(&self) -> Copyright_Type { self.typ.unwrap_or(Copyright_Type::P) } @@ -4818,7 +5256,6 @@ impl Copyright { // optional string text = 2; - pub fn get_text(&self) -> &str { match self.text.as_ref() { Some(v) => &v, @@ -4849,7 +5286,9 @@ impl Copyright { // Take field pub fn take_text(&mut self) -> ::std::string::String { - self.text.take().unwrap_or_else(|| ::std::string::String::new()) + self.text + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -4858,19 +5297,31 @@ impl ::protobuf::Message for Copyright { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 1, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.typ, + 1, + &mut self.unknown_fields, + )?, 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.text)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4891,7 +5342,10 @@ impl ::protobuf::Message for Copyright { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.typ { os.write_enum(1, v.value())?; } @@ -4933,24 +5387,33 @@ impl ::protobuf::Message for Copyright { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "typ", - |m: &Copyright| { &m.typ }, - |m: &mut Copyright| { &mut m.typ }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "text", - |m: &Copyright| { &m.text }, - |m: &mut Copyright| { &mut m.text }, + |m: &Copyright| &m.typ, + |m: &mut Copyright| &mut m.typ, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "text", + |m: &Copyright| &m.text, + |m: &mut Copyright| &mut m.text, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Copyright", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -4958,9 +5421,7 @@ impl ::protobuf::Message for Copyright { fn default_instance() -> &'static Copyright { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Copyright::new) - } + unsafe { instance.get(Copyright::new) } } } @@ -4984,7 +5445,7 @@ impl ::protobuf::reflect::ProtobufValue for Copyright { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Copyright_Type { P = 0, C = 1, @@ -4999,30 +5460,30 @@ impl ::protobuf::ProtobufEnum for Copyright_Type { match value { 0 => ::std::option::Option::Some(Copyright_Type::P), 1 => ::std::option::Option::Some(Copyright_Type::C), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } fn values() -> &'static [Self] { - static values: &'static [Copyright_Type] = &[ - Copyright_Type::P, - Copyright_Type::C, - ]; + static values: &'static [Copyright_Type] = &[Copyright_Type::P, Copyright_Type::C]; values } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Copyright.Type", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Copyright.Type", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Copyright_Type { -} +impl ::std::marker::Copy for Copyright_Type {} impl ::std::default::Default for Copyright_Type { fn default() -> Self { @@ -5036,7 +5497,7 @@ impl ::protobuf::reflect::ProtobufValue for Copyright_Type { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Restriction { // message fields catalogue: ::std::vec::Vec, @@ -5062,7 +5523,6 @@ impl Restriction { // repeated .Restriction.Catalogue catalogue = 1; - pub fn get_catalogue(&self) -> &[Restriction_Catalogue] { &self.catalogue } @@ -5087,7 +5547,6 @@ impl Restriction { // optional string countries_allowed = 2; - pub fn get_countries_allowed(&self) -> &str { match self.countries_allowed.as_ref() { Some(v) => &v, @@ -5118,12 +5577,13 @@ impl Restriction { // Take field pub fn take_countries_allowed(&mut self) -> ::std::string::String { - self.countries_allowed.take().unwrap_or_else(|| ::std::string::String::new()) + self.countries_allowed + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string countries_forbidden = 3; - pub fn get_countries_forbidden(&self) -> &str { match self.countries_forbidden.as_ref() { Some(v) => &v, @@ -5154,12 +5614,13 @@ impl Restriction { // Take field pub fn take_countries_forbidden(&mut self) -> ::std::string::String { - self.countries_forbidden.take().unwrap_or_else(|| ::std::string::String::new()) + self.countries_forbidden + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .Restriction.Type typ = 4; - pub fn get_typ(&self) -> Restriction_Type { self.typ.unwrap_or(Restriction_Type::STREAMING) } @@ -5178,7 +5639,6 @@ impl Restriction { // repeated string catalogue_str = 5; - pub fn get_catalogue_str(&self) -> &[::std::string::String] { &self.catalogue_str } @@ -5207,28 +5667,56 @@ impl ::protobuf::Message for Restriction { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.catalogue, 1, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.catalogue, + 1, + &mut self.unknown_fields, + )?, 2 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.countries_allowed)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.countries_allowed, + )?; + } 3 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.countries_forbidden)?; - }, - 4 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 4, &mut self.unknown_fields)? - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.countries_forbidden, + )?; + } + 4 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.typ, + 4, + &mut self.unknown_fields, + )?, 5 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.catalogue_str)?; - }, + ::protobuf::rt::read_repeated_string_into( + wire_type, + is, + &mut self.catalogue_str, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5240,7 +5728,7 @@ impl ::protobuf::Message for Restriction { let mut my_size = 0; for value in &self.catalogue { my_size += ::protobuf::rt::enum_size(1, *value); - }; + } if let Some(ref v) = self.countries_allowed.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } @@ -5252,16 +5740,19 @@ impl ::protobuf::Message for Restriction { } for value in &self.catalogue_str { my_size += ::protobuf::rt::string_size(5, &value); - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.catalogue { os.write_enum(1, v.value())?; - }; + } if let Some(ref v) = self.countries_allowed.as_ref() { os.write_string(2, &v)?; } @@ -5273,7 +5764,7 @@ impl ::protobuf::Message for Restriction { } for v in &self.catalogue_str { os.write_string(5, &v)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -5309,39 +5800,61 @@ impl ::protobuf::Message for Restriction { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "catalogue", - |m: &Restriction| { &m.catalogue }, - |m: &mut Restriction| { &mut m.catalogue }, + |m: &Restriction| &m.catalogue, + |m: &mut Restriction| &mut m.catalogue, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "countries_allowed", - |m: &Restriction| { &m.countries_allowed }, - |m: &mut Restriction| { &mut m.countries_allowed }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "countries_forbidden", - |m: &Restriction| { &m.countries_forbidden }, - |m: &mut Restriction| { &mut m.countries_forbidden }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "countries_allowed", + |m: &Restriction| &m.countries_allowed, + |m: &mut Restriction| &mut m.countries_allowed, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "countries_forbidden", + |m: &Restriction| &m.countries_forbidden, + |m: &mut Restriction| &mut m.countries_forbidden, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "typ", - |m: &Restriction| { &m.typ }, - |m: &mut Restriction| { &mut m.typ }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "catalogue_str", - |m: &Restriction| { &m.catalogue_str }, - |m: &mut Restriction| { &mut m.catalogue_str }, + |m: &Restriction| &m.typ, + |m: &mut Restriction| &mut m.typ, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "catalogue_str", + |m: &Restriction| &m.catalogue_str, + |m: &mut Restriction| &mut m.catalogue_str, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Restriction", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -5349,9 +5862,7 @@ impl ::protobuf::Message for Restriction { fn default_instance() -> &'static Restriction { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Restriction::new) - } + unsafe { instance.get(Restriction::new) } } } @@ -5378,7 +5889,7 @@ impl ::protobuf::reflect::ProtobufValue for Restriction { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Restriction_Catalogue { AD = 0, SUBSCRIPTION = 1, @@ -5399,7 +5910,7 @@ impl ::protobuf::ProtobufEnum for Restriction_Catalogue { 2 => ::std::option::Option::Some(Restriction_Catalogue::CATALOGUE_ALL), 3 => ::std::option::Option::Some(Restriction_Catalogue::SHUFFLE), 4 => ::std::option::Option::Some(Restriction_Catalogue::COMMERCIAL), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -5415,17 +5926,20 @@ impl ::protobuf::ProtobufEnum for Restriction_Catalogue { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Restriction.Catalogue", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Restriction.Catalogue", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Restriction_Catalogue { -} +impl ::std::marker::Copy for Restriction_Catalogue {} impl ::std::default::Default for Restriction_Catalogue { fn default() -> Self { @@ -5439,7 +5953,7 @@ impl ::protobuf::reflect::ProtobufValue for Restriction_Catalogue { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Restriction_Type { STREAMING = 0, } @@ -5452,29 +5966,30 @@ impl ::protobuf::ProtobufEnum for Restriction_Type { fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(Restriction_Type::STREAMING), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } fn values() -> &'static [Self] { - static values: &'static [Restriction_Type] = &[ - Restriction_Type::STREAMING, - ]; + static values: &'static [Restriction_Type] = &[Restriction_Type::STREAMING]; values } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Restriction.Type", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Restriction.Type", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Restriction_Type { -} +impl ::std::marker::Copy for Restriction_Type {} impl ::std::default::Default for Restriction_Type { fn default() -> Self { @@ -5488,7 +6003,7 @@ impl ::protobuf::reflect::ProtobufValue for Restriction_Type { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Availability { // message fields catalogue_str: ::protobuf::RepeatedField<::std::string::String>, @@ -5511,7 +6026,6 @@ impl Availability { // repeated string catalogue_str = 1; - pub fn get_catalogue_str(&self) -> &[::std::string::String] { &self.catalogue_str } @@ -5536,9 +6050,10 @@ impl Availability { // optional .Date start = 2; - pub fn get_start(&self) -> &Date { - self.start.as_ref().unwrap_or_else(|| Date::default_instance()) + self.start + .as_ref() + .unwrap_or_else(|| Date::default_instance()) } pub fn clear_start(&mut self) { self.start.clear(); @@ -5574,23 +6089,35 @@ impl ::protobuf::Message for Availability { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.catalogue_str)?; - }, + ::protobuf::rt::read_repeated_string_into( + wire_type, + is, + &mut self.catalogue_str, + )?; + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.start)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5602,7 +6129,7 @@ impl ::protobuf::Message for Availability { let mut my_size = 0; for value in &self.catalogue_str { my_size += ::protobuf::rt::string_size(1, &value); - }; + } if let Some(ref v) = self.start.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -5612,10 +6139,13 @@ impl ::protobuf::Message for Availability { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.catalogue_str { os.write_string(1, &v)?; - }; + } if let Some(ref v) = self.start.as_ref() { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -5656,24 +6186,35 @@ impl ::protobuf::Message for Availability { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "catalogue_str", - |m: &Availability| { &m.catalogue_str }, - |m: &mut Availability| { &mut m.catalogue_str }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "start", - |m: &Availability| { &m.start }, - |m: &mut Availability| { &mut m.start }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "catalogue_str", + |m: &Availability| &m.catalogue_str, + |m: &mut Availability| &mut m.catalogue_str, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "start", + |m: &Availability| &m.start, + |m: &mut Availability| &mut m.start, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Availability", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -5681,9 +6222,7 @@ impl ::protobuf::Message for Availability { fn default_instance() -> &'static Availability { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Availability::new) - } + unsafe { instance.get(Availability::new) } } } @@ -5707,7 +6246,7 @@ impl ::protobuf::reflect::ProtobufValue for Availability { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct SalePeriod { // message fields restriction: ::protobuf::RepeatedField, @@ -5731,7 +6270,6 @@ impl SalePeriod { // repeated .Restriction restriction = 1; - pub fn get_restriction(&self) -> &[Restriction] { &self.restriction } @@ -5756,9 +6294,10 @@ impl SalePeriod { // optional .Date start = 2; - pub fn get_start(&self) -> &Date { - self.start.as_ref().unwrap_or_else(|| Date::default_instance()) + self.start + .as_ref() + .unwrap_or_else(|| Date::default_instance()) } pub fn clear_start(&mut self) { self.start.clear(); @@ -5789,9 +6328,10 @@ impl SalePeriod { // optional .Date end = 3; - pub fn get_end(&self) -> &Date { - self.end.as_ref().unwrap_or_else(|| Date::default_instance()) + self.end + .as_ref() + .unwrap_or_else(|| Date::default_instance()) } pub fn clear_end(&mut self) { self.end.clear(); @@ -5827,36 +6367,48 @@ impl ::protobuf::Message for SalePeriod { if !v.is_initialized() { return false; } - }; + } for v in &self.start { if !v.is_initialized() { return false; } - }; + } for v in &self.end { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.restriction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.restriction, + )?; + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.start)?; - }, + } 3 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.end)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5869,7 +6421,7 @@ impl ::protobuf::Message for SalePeriod { for value in &self.restriction { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.start.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -5883,12 +6435,15 @@ impl ::protobuf::Message for SalePeriod { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.restriction { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.start.as_ref() { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -5934,29 +6489,45 @@ impl ::protobuf::Message for SalePeriod { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "restriction", - |m: &SalePeriod| { &m.restriction }, - |m: &mut SalePeriod| { &mut m.restriction }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "start", - |m: &SalePeriod| { &m.start }, - |m: &mut SalePeriod| { &mut m.start }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "end", - |m: &SalePeriod| { &m.end }, - |m: &mut SalePeriod| { &mut m.end }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "restriction", + |m: &SalePeriod| &m.restriction, + |m: &mut SalePeriod| &mut m.restriction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "start", + |m: &SalePeriod| &m.start, + |m: &mut SalePeriod| &mut m.start, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "end", + |m: &SalePeriod| &m.end, + |m: &mut SalePeriod| &mut m.end, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "SalePeriod", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -5964,9 +6535,7 @@ impl ::protobuf::Message for SalePeriod { fn default_instance() -> &'static SalePeriod { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(SalePeriod::new) - } + unsafe { instance.get(SalePeriod::new) } } } @@ -5991,7 +6560,7 @@ impl ::protobuf::reflect::ProtobufValue for SalePeriod { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ExternalId { // message fields typ: ::protobuf::SingularField<::std::string::String>, @@ -6014,7 +6583,6 @@ impl ExternalId { // optional string typ = 1; - pub fn get_typ(&self) -> &str { match self.typ.as_ref() { Some(v) => &v, @@ -6045,12 +6613,13 @@ impl ExternalId { // Take field pub fn take_typ(&mut self) -> ::std::string::String { - self.typ.take().unwrap_or_else(|| ::std::string::String::new()) + self.typ + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string id = 2; - pub fn get_id(&self) -> &str { match self.id.as_ref() { Some(v) => &v, @@ -6081,7 +6650,9 @@ impl ExternalId { // Take field pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) + self.id + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -6090,19 +6661,27 @@ impl ::protobuf::Message for ExternalId { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.typ)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.id)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6123,7 +6702,10 @@ impl ::protobuf::Message for ExternalId { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.typ.as_ref() { os.write_string(1, &v)?; } @@ -6165,24 +6747,33 @@ impl ::protobuf::Message for ExternalId { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "typ", - |m: &ExternalId| { &m.typ }, - |m: &mut ExternalId| { &mut m.typ }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "id", - |m: &ExternalId| { &m.id }, - |m: &mut ExternalId| { &mut m.id }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "typ", + |m: &ExternalId| &m.typ, + |m: &mut ExternalId| &mut m.typ, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "id", |m: &ExternalId| &m.id, |m: &mut ExternalId| &mut m.id + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ExternalId", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -6190,9 +6781,7 @@ impl ::protobuf::Message for ExternalId { fn default_instance() -> &'static ExternalId { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ExternalId::new) - } + unsafe { instance.get(ExternalId::new) } } } @@ -6216,7 +6805,7 @@ impl ::protobuf::reflect::ProtobufValue for ExternalId { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct AudioFile { // message fields file_id: ::protobuf::SingularField<::std::vec::Vec>, @@ -6239,7 +6828,6 @@ impl AudioFile { // optional bytes file_id = 1; - pub fn get_file_id(&self) -> &[u8] { match self.file_id.as_ref() { Some(v) => &v, @@ -6270,12 +6858,13 @@ impl AudioFile { // Take field pub fn take_file_id(&mut self) -> ::std::vec::Vec { - self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.file_id + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional .AudioFile.Format format = 2; - pub fn get_format(&self) -> AudioFile_Format { self.format.unwrap_or(AudioFile_Format::OGG_VORBIS_96) } @@ -6298,19 +6887,31 @@ impl ::protobuf::Message for AudioFile { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.file_id)?; - }, - 2 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.format, 2, &mut self.unknown_fields)? - }, + } + 2 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.format, + 2, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6331,7 +6932,10 @@ impl ::protobuf::Message for AudioFile { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.file_id.as_ref() { os.write_bytes(1, &v)?; } @@ -6373,24 +6977,33 @@ impl ::protobuf::Message for AudioFile { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "file_id", - |m: &AudioFile| { &m.file_id }, - |m: &mut AudioFile| { &mut m.file_id }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "file_id", + |m: &AudioFile| &m.file_id, + |m: &mut AudioFile| &mut m.file_id, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "format", - |m: &AudioFile| { &m.format }, - |m: &mut AudioFile| { &mut m.format }, + |m: &AudioFile| &m.format, + |m: &mut AudioFile| &mut m.format, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "AudioFile", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -6398,9 +7011,7 @@ impl ::protobuf::Message for AudioFile { fn default_instance() -> &'static AudioFile { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(AudioFile::new) - } + unsafe { instance.get(AudioFile::new) } } } @@ -6424,7 +7035,7 @@ impl ::protobuf::reflect::ProtobufValue for AudioFile { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum AudioFile_Format { OGG_VORBIS_96 = 0, OGG_VORBIS_160 = 1, @@ -6463,7 +7074,7 @@ impl ::protobuf::ProtobufEnum for AudioFile_Format { 11 => ::std::option::Option::Some(AudioFile_Format::AAC_320), 12 => ::std::option::Option::Some(AudioFile_Format::MP4_128), 13 => ::std::option::Option::Some(AudioFile_Format::OTHER5), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -6488,17 +7099,20 @@ impl ::protobuf::ProtobufEnum for AudioFile_Format { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("AudioFile.Format", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "AudioFile.Format", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for AudioFile_Format { -} +impl ::std::marker::Copy for AudioFile_Format {} impl ::std::default::Default for AudioFile_Format { fn default() -> Self { @@ -6512,7 +7126,7 @@ impl ::protobuf::reflect::ProtobufValue for AudioFile_Format { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct VideoFile { // message fields file_id: ::protobuf::SingularField<::std::vec::Vec>, @@ -6534,7 +7148,6 @@ impl VideoFile { // optional bytes file_id = 1; - pub fn get_file_id(&self) -> &[u8] { match self.file_id.as_ref() { Some(v) => &v, @@ -6565,7 +7178,9 @@ impl VideoFile { // Take field pub fn take_file_id(&mut self) -> ::std::vec::Vec { - self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.file_id + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -6574,16 +7189,24 @@ impl ::protobuf::Message for VideoFile { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.file_id)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6601,7 +7224,10 @@ impl ::protobuf::Message for VideoFile { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.file_id.as_ref() { os.write_bytes(1, &v)?; } @@ -6640,19 +7266,25 @@ impl ::protobuf::Message for VideoFile { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "file_id", - |m: &VideoFile| { &m.file_id }, - |m: &mut VideoFile| { &mut m.file_id }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "file_id", + |m: &VideoFile| &m.file_id, + |m: &mut VideoFile| &mut m.file_id, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "VideoFile", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -6660,9 +7292,7 @@ impl ::protobuf::Message for VideoFile { fn default_instance() -> &'static VideoFile { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(VideoFile::new) - } + unsafe { instance.get(VideoFile::new) } } } @@ -6685,7 +7315,7 @@ impl ::protobuf::reflect::ProtobufValue for VideoFile { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Show { // message fields gid: ::protobuf::SingularField<::std::vec::Vec>, @@ -6725,7 +7355,6 @@ impl Show { // optional bytes gid = 1; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -6761,7 +7390,6 @@ impl Show { // optional string name = 2; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -6792,12 +7420,13 @@ impl Show { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string description = 64; - pub fn get_description(&self) -> &str { match self.description.as_ref() { Some(v) => &v, @@ -6828,12 +7457,13 @@ impl Show { // Take field pub fn take_description(&mut self) -> ::std::string::String { - self.description.take().unwrap_or_else(|| ::std::string::String::new()) + self.description + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional sint32 deprecated_popularity = 65; - pub fn get_deprecated_popularity(&self) -> i32 { self.deprecated_popularity.unwrap_or(0) } @@ -6852,7 +7482,6 @@ impl Show { // optional string publisher = 66; - pub fn get_publisher(&self) -> &str { match self.publisher.as_ref() { Some(v) => &v, @@ -6883,12 +7512,13 @@ impl Show { // Take field pub fn take_publisher(&mut self) -> ::std::string::String { - self.publisher.take().unwrap_or_else(|| ::std::string::String::new()) + self.publisher + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string language = 67; - pub fn get_language(&self) -> &str { match self.language.as_ref() { Some(v) => &v, @@ -6919,12 +7549,13 @@ impl Show { // Take field pub fn take_language(&mut self) -> ::std::string::String { - self.language.take().unwrap_or_else(|| ::std::string::String::new()) + self.language + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool explicit = 68; - pub fn get_explicit(&self) -> bool { self.explicit.unwrap_or(false) } @@ -6943,9 +7574,10 @@ impl Show { // optional .ImageGroup covers = 69; - pub fn get_covers(&self) -> &ImageGroup { - self.covers.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + self.covers + .as_ref() + .unwrap_or_else(|| ImageGroup::default_instance()) } pub fn clear_covers(&mut self) { self.covers.clear(); @@ -6976,7 +7608,6 @@ impl Show { // repeated .Episode episode = 70; - pub fn get_episode(&self) -> &[Episode] { &self.episode } @@ -7001,7 +7632,6 @@ impl Show { // repeated .Copyright copyright = 71; - pub fn get_copyright(&self) -> &[Copyright] { &self.copyright } @@ -7026,7 +7656,6 @@ impl Show { // repeated .Restriction restriction = 72; - pub fn get_restriction(&self) -> &[Restriction] { &self.restriction } @@ -7051,7 +7680,6 @@ impl Show { // repeated string keyword = 73; - pub fn get_keyword(&self) -> &[::std::string::String] { &self.keyword } @@ -7076,7 +7704,6 @@ impl Show { // optional .Show.MediaType media_type = 74; - pub fn get_media_type(&self) -> Show_MediaType { self.media_type.unwrap_or(Show_MediaType::MIXED) } @@ -7095,9 +7722,9 @@ impl Show { // optional .Show.ConsumptionOrder consumption_order = 75; - pub fn get_consumption_order(&self) -> Show_ConsumptionOrder { - self.consumption_order.unwrap_or(Show_ConsumptionOrder::SEQUENTIAL) + self.consumption_order + .unwrap_or(Show_ConsumptionOrder::SEQUENTIAL) } pub fn clear_consumption_order(&mut self) { self.consumption_order = ::std::option::Option::None; @@ -7114,7 +7741,6 @@ impl Show { // optional bool interpret_restriction_using_geoip = 76; - pub fn get_interpret_restriction_using_geoip(&self) -> bool { self.interpret_restriction_using_geoip.unwrap_or(false) } @@ -7133,7 +7759,6 @@ impl Show { // repeated .Availability availability = 78; - pub fn get_availability(&self) -> &[Availability] { &self.availability } @@ -7158,7 +7783,6 @@ impl Show { // optional string country_of_origin = 79; - pub fn get_country_of_origin(&self) -> &str { match self.country_of_origin.as_ref() { Some(v) => &v, @@ -7189,12 +7813,13 @@ impl Show { // Take field pub fn take_country_of_origin(&mut self) -> ::std::string::String { - self.country_of_origin.take().unwrap_or_else(|| ::std::string::String::new()) + self.country_of_origin + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Category categories = 80; - pub fn get_categories(&self) -> &[Category] { &self.categories } @@ -7219,7 +7844,6 @@ impl Show { // optional .Show.PassthroughEnum passthrough = 81; - pub fn get_passthrough(&self) -> Show_PassthroughEnum { self.passthrough.unwrap_or(Show_PassthroughEnum::UNKNOWN) } @@ -7243,111 +7867,157 @@ impl ::protobuf::Message for Show { if !v.is_initialized() { return false; } - }; + } for v in &self.episode { if !v.is_initialized() { return false; } - }; + } for v in &self.copyright { if !v.is_initialized() { return false; } - }; + } for v in &self.restriction { if !v.is_initialized() { return false; } - }; + } for v in &self.availability { if !v.is_initialized() { return false; } - }; + } for v in &self.categories { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 64 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.description)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.description, + )?; + } 65 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.deprecated_popularity = ::std::option::Option::Some(tmp); - }, + } 66 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.publisher)?; - }, + } 67 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.language)?; - }, + } 68 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.explicit = ::std::option::Option::Some(tmp); - }, + } 69 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.covers)?; - }, + } 70 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.episode)?; - }, + } 71 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.copyright)?; - }, + } 72 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.restriction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.restriction, + )?; + } 73 => { ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.keyword)?; - }, - 74 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.media_type, 74, &mut self.unknown_fields)? - }, - 75 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.consumption_order, 75, &mut self.unknown_fields)? - }, + } + 74 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.media_type, + 74, + &mut self.unknown_fields, + )?, + 75 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.consumption_order, + 75, + &mut self.unknown_fields, + )?, 76 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.interpret_restriction_using_geoip = ::std::option::Option::Some(tmp); - }, + } 78 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.availability)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.availability, + )?; + } 79 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.country_of_origin)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.country_of_origin, + )?; + } 80 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.categories)?; - }, - 81 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.passthrough, 81, &mut self.unknown_fields)? - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.categories, + )?; + } + 81 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.passthrough, + 81, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -7385,18 +8055,18 @@ impl ::protobuf::Message for Show { for value in &self.episode { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.copyright { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.restriction { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.keyword { my_size += ::protobuf::rt::string_size(73, &value); - }; + } if let Some(v) = self.media_type { my_size += ::protobuf::rt::enum_size(74, v); } @@ -7409,14 +8079,14 @@ impl ::protobuf::Message for Show { for value in &self.availability { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.country_of_origin.as_ref() { my_size += ::protobuf::rt::string_size(79, &v); } for value in &self.categories { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(v) = self.passthrough { my_size += ::protobuf::rt::enum_size(81, v); } @@ -7425,7 +8095,10 @@ impl ::protobuf::Message for Show { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gid.as_ref() { os.write_bytes(1, &v)?; } @@ -7456,20 +8129,20 @@ impl ::protobuf::Message for Show { os.write_tag(70, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.copyright { os.write_tag(71, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.restriction { os.write_tag(72, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.keyword { os.write_string(73, &v)?; - }; + } if let Some(v) = self.media_type { os.write_enum(74, v.value())?; } @@ -7483,7 +8156,7 @@ impl ::protobuf::Message for Show { os.write_tag(78, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.country_of_origin.as_ref() { os.write_string(79, &v)?; } @@ -7491,7 +8164,7 @@ impl ::protobuf::Message for Show { os.write_tag(80, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(v) = self.passthrough { os.write_enum(81, v.value())?; } @@ -7530,109 +8203,183 @@ impl ::protobuf::Message for Show { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &Show| { &m.gid }, - |m: &mut Show| { &mut m.gid }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Show| { &m.name }, - |m: &mut Show| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &Show| { &m.description }, - |m: &mut Show| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >("gid", |m: &Show| &m.gid, |m: &mut Show| &mut m.gid), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >("name", |m: &Show| &m.name, |m: &mut Show| &mut m.name), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "description", + |m: &Show| &m.description, + |m: &mut Show| &mut m.description, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "deprecated_popularity", - |m: &Show| { &m.deprecated_popularity }, - |m: &mut Show| { &mut m.deprecated_popularity }, + |m: &Show| &m.deprecated_popularity, + |m: &mut Show| &mut m.deprecated_popularity, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "publisher", - |m: &Show| { &m.publisher }, - |m: &mut Show| { &mut m.publisher }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "language", - |m: &Show| { &m.language }, - |m: &mut Show| { &mut m.language }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "publisher", + |m: &Show| &m.publisher, + |m: &mut Show| &mut m.publisher, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "language", + |m: &Show| &m.language, + |m: &mut Show| &mut m.language, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "explicit", - |m: &Show| { &m.explicit }, - |m: &mut Show| { &mut m.explicit }, + |m: &Show| &m.explicit, + |m: &mut Show| &mut m.explicit, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "covers", - |m: &Show| { &m.covers }, - |m: &mut Show| { &mut m.covers }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "episode", - |m: &Show| { &m.episode }, - |m: &mut Show| { &mut m.episode }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "copyright", - |m: &Show| { &m.copyright }, - |m: &mut Show| { &mut m.copyright }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "restriction", - |m: &Show| { &m.restriction }, - |m: &mut Show| { &mut m.restriction }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "keyword", - |m: &Show| { &m.keyword }, - |m: &mut Show| { &mut m.keyword }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "covers", |m: &Show| &m.covers, |m: &mut Show| &mut m.covers + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "episode", + |m: &Show| &m.episode, + |m: &mut Show| &mut m.episode, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "copyright", + |m: &Show| &m.copyright, + |m: &mut Show| &mut m.copyright, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "restriction", + |m: &Show| &m.restriction, + |m: &mut Show| &mut m.restriction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "keyword", + |m: &Show| &m.keyword, + |m: &mut Show| &mut m.keyword, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "media_type", - |m: &Show| { &m.media_type }, - |m: &mut Show| { &mut m.media_type }, + |m: &Show| &m.media_type, + |m: &mut Show| &mut m.media_type, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "consumption_order", - |m: &Show| { &m.consumption_order }, - |m: &mut Show| { &mut m.consumption_order }, + |m: &Show| &m.consumption_order, + |m: &mut Show| &mut m.consumption_order, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "interpret_restriction_using_geoip", - |m: &Show| { &m.interpret_restriction_using_geoip }, - |m: &mut Show| { &mut m.interpret_restriction_using_geoip }, + |m: &Show| &m.interpret_restriction_using_geoip, + |m: &mut Show| &mut m.interpret_restriction_using_geoip, )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "availability", - |m: &Show| { &m.availability }, - |m: &mut Show| { &mut m.availability }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "country_of_origin", - |m: &Show| { &m.country_of_origin }, - |m: &mut Show| { &mut m.country_of_origin }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "categories", - |m: &Show| { &m.categories }, - |m: &mut Show| { &mut m.categories }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "availability", + |m: &Show| &m.availability, + |m: &mut Show| &mut m.availability, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "country_of_origin", + |m: &Show| &m.country_of_origin, + |m: &mut Show| &mut m.country_of_origin, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "categories", + |m: &Show| &m.categories, + |m: &mut Show| &mut m.categories, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "passthrough", - |m: &Show| { &m.passthrough }, - |m: &mut Show| { &mut m.passthrough }, + |m: &Show| &m.passthrough, + |m: &mut Show| &mut m.passthrough, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Show", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -7640,9 +8387,7 @@ impl ::protobuf::Message for Show { fn default_instance() -> &'static Show { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Show::new) - } + unsafe { instance.get(Show::new) } } } @@ -7683,7 +8428,7 @@ impl ::protobuf::reflect::ProtobufValue for Show { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Show_MediaType { MIXED = 0, AUDIO = 1, @@ -7700,7 +8445,7 @@ impl ::protobuf::ProtobufEnum for Show_MediaType { 0 => ::std::option::Option::Some(Show_MediaType::MIXED), 1 => ::std::option::Option::Some(Show_MediaType::AUDIO), 2 => ::std::option::Option::Some(Show_MediaType::VIDEO), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -7714,17 +8459,20 @@ impl ::protobuf::ProtobufEnum for Show_MediaType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Show.MediaType", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Show.MediaType", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Show_MediaType { -} +impl ::std::marker::Copy for Show_MediaType {} impl ::std::default::Default for Show_MediaType { fn default() -> Self { @@ -7738,7 +8486,7 @@ impl ::protobuf::reflect::ProtobufValue for Show_MediaType { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Show_ConsumptionOrder { SEQUENTIAL = 1, EPISODIC = 2, @@ -7755,7 +8503,7 @@ impl ::protobuf::ProtobufEnum for Show_ConsumptionOrder { 1 => ::std::option::Option::Some(Show_ConsumptionOrder::SEQUENTIAL), 2 => ::std::option::Option::Some(Show_ConsumptionOrder::EPISODIC), 3 => ::std::option::Option::Some(Show_ConsumptionOrder::RECENT), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -7769,17 +8517,20 @@ impl ::protobuf::ProtobufEnum for Show_ConsumptionOrder { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Show.ConsumptionOrder", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Show.ConsumptionOrder", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Show_ConsumptionOrder { -} +impl ::std::marker::Copy for Show_ConsumptionOrder {} // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for Show_ConsumptionOrder { @@ -7794,7 +8545,7 @@ impl ::protobuf::reflect::ProtobufValue for Show_ConsumptionOrder { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Show_PassthroughEnum { UNKNOWN = 0, NONE = 1, @@ -7811,7 +8562,7 @@ impl ::protobuf::ProtobufEnum for Show_PassthroughEnum { 0 => ::std::option::Option::Some(Show_PassthroughEnum::UNKNOWN), 1 => ::std::option::Option::Some(Show_PassthroughEnum::NONE), 2 => ::std::option::Option::Some(Show_PassthroughEnum::ALLOWED), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -7825,17 +8576,20 @@ impl ::protobuf::ProtobufEnum for Show_PassthroughEnum { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Show.PassthroughEnum", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Show.PassthroughEnum", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Show_PassthroughEnum { -} +impl ::std::marker::Copy for Show_PassthroughEnum {} impl ::std::default::Default for Show_PassthroughEnum { fn default() -> Self { @@ -7849,7 +8603,7 @@ impl ::protobuf::reflect::ProtobufValue for Show_PassthroughEnum { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Episode { // message fields gid: ::protobuf::SingularField<::std::vec::Vec>, @@ -7895,7 +8649,6 @@ impl Episode { // optional bytes gid = 1; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -7931,7 +8684,6 @@ impl Episode { // optional string name = 2; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -7962,12 +8714,13 @@ impl Episode { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional sint32 duration = 7; - pub fn get_duration(&self) -> i32 { self.duration.unwrap_or(0) } @@ -7986,7 +8739,6 @@ impl Episode { // optional sint32 popularity = 8; - pub fn get_popularity(&self) -> i32 { self.popularity.unwrap_or(0) } @@ -8005,7 +8757,6 @@ impl Episode { // repeated .AudioFile file = 12; - pub fn get_file(&self) -> &[AudioFile] { &self.file } @@ -8030,7 +8781,6 @@ impl Episode { // optional string description = 64; - pub fn get_description(&self) -> &str { match self.description.as_ref() { Some(v) => &v, @@ -8061,12 +8811,13 @@ impl Episode { // Take field pub fn take_description(&mut self) -> ::std::string::String { - self.description.take().unwrap_or_else(|| ::std::string::String::new()) + self.description + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional sint32 number = 65; - pub fn get_number(&self) -> i32 { self.number.unwrap_or(0) } @@ -8085,9 +8836,10 @@ impl Episode { // optional .Date publish_time = 66; - pub fn get_publish_time(&self) -> &Date { - self.publish_time.as_ref().unwrap_or_else(|| Date::default_instance()) + self.publish_time + .as_ref() + .unwrap_or_else(|| Date::default_instance()) } pub fn clear_publish_time(&mut self) { self.publish_time.clear(); @@ -8118,7 +8870,6 @@ impl Episode { // optional sint32 deprecated_popularity = 67; - pub fn get_deprecated_popularity(&self) -> i32 { self.deprecated_popularity.unwrap_or(0) } @@ -8137,9 +8888,10 @@ impl Episode { // optional .ImageGroup covers = 68; - pub fn get_covers(&self) -> &ImageGroup { - self.covers.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + self.covers + .as_ref() + .unwrap_or_else(|| ImageGroup::default_instance()) } pub fn clear_covers(&mut self) { self.covers.clear(); @@ -8170,7 +8922,6 @@ impl Episode { // optional string language = 69; - pub fn get_language(&self) -> &str { match self.language.as_ref() { Some(v) => &v, @@ -8201,12 +8952,13 @@ impl Episode { // Take field pub fn take_language(&mut self) -> ::std::string::String { - self.language.take().unwrap_or_else(|| ::std::string::String::new()) + self.language + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool explicit = 70; - pub fn get_explicit(&self) -> bool { self.explicit.unwrap_or(false) } @@ -8225,9 +8977,10 @@ impl Episode { // optional .Show show = 71; - pub fn get_show(&self) -> &Show { - self.show.as_ref().unwrap_or_else(|| Show::default_instance()) + self.show + .as_ref() + .unwrap_or_else(|| Show::default_instance()) } pub fn clear_show(&mut self) { self.show.clear(); @@ -8258,7 +9011,6 @@ impl Episode { // repeated .VideoFile video = 72; - pub fn get_video(&self) -> &[VideoFile] { &self.video } @@ -8283,7 +9035,6 @@ impl Episode { // repeated .VideoFile video_preview = 73; - pub fn get_video_preview(&self) -> &[VideoFile] { &self.video_preview } @@ -8308,7 +9059,6 @@ impl Episode { // repeated .AudioFile audio_preview = 74; - pub fn get_audio_preview(&self) -> &[AudioFile] { &self.audio_preview } @@ -8333,7 +9083,6 @@ impl Episode { // repeated .Restriction restriction = 75; - pub fn get_restriction(&self) -> &[Restriction] { &self.restriction } @@ -8358,9 +9107,10 @@ impl Episode { // optional .ImageGroup freeze_frame = 76; - pub fn get_freeze_frame(&self) -> &ImageGroup { - self.freeze_frame.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + self.freeze_frame + .as_ref() + .unwrap_or_else(|| ImageGroup::default_instance()) } pub fn clear_freeze_frame(&mut self) { self.freeze_frame.clear(); @@ -8386,12 +9136,13 @@ impl Episode { // Take field pub fn take_freeze_frame(&mut self) -> ImageGroup { - self.freeze_frame.take().unwrap_or_else(|| ImageGroup::new()) + self.freeze_frame + .take() + .unwrap_or_else(|| ImageGroup::new()) } // repeated string keyword = 77; - pub fn get_keyword(&self) -> &[::std::string::String] { &self.keyword } @@ -8416,7 +9167,6 @@ impl Episode { // optional bool suppress_monetization = 78; - pub fn get_suppress_monetization(&self) -> bool { self.suppress_monetization.unwrap_or(false) } @@ -8435,7 +9185,6 @@ impl Episode { // optional bool interpret_restriction_using_geoip = 79; - pub fn get_interpret_restriction_using_geoip(&self) -> bool { self.interpret_restriction_using_geoip.unwrap_or(false) } @@ -8454,7 +9203,6 @@ impl Episode { // optional bool allow_background_playback = 81; - pub fn get_allow_background_playback(&self) -> bool { self.allow_background_playback.unwrap_or(false) } @@ -8473,7 +9221,6 @@ impl Episode { // repeated .Availability availability = 82; - pub fn get_availability(&self) -> &[Availability] { &self.availability } @@ -8498,7 +9245,6 @@ impl Episode { // optional string external_url = 83; - pub fn get_external_url(&self) -> &str { match self.external_url.as_ref() { Some(v) => &v, @@ -8529,14 +9275,17 @@ impl Episode { // Take field pub fn take_external_url(&mut self) -> ::std::string::String { - self.external_url.take().unwrap_or_else(|| ::std::string::String::new()) + self.external_url + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .OriginalAudio original_audio = 84; - pub fn get_original_audio(&self) -> &OriginalAudio { - self.original_audio.as_ref().unwrap_or_else(|| OriginalAudio::default_instance()) + self.original_audio + .as_ref() + .unwrap_or_else(|| OriginalAudio::default_instance()) } pub fn clear_original_audio(&mut self) { self.original_audio.clear(); @@ -8562,7 +9311,9 @@ impl Episode { // Take field pub fn take_original_audio(&mut self) -> OriginalAudio { - self.original_audio.take().unwrap_or_else(|| OriginalAudio::new()) + self.original_audio + .take() + .unwrap_or_else(|| OriginalAudio::new()) } } @@ -8572,174 +9323,234 @@ impl ::protobuf::Message for Episode { if !v.is_initialized() { return false; } - }; + } for v in &self.publish_time { if !v.is_initialized() { return false; } - }; + } for v in &self.covers { if !v.is_initialized() { return false; } - }; + } for v in &self.show { if !v.is_initialized() { return false; } - }; + } for v in &self.video { if !v.is_initialized() { return false; } - }; + } for v in &self.video_preview { if !v.is_initialized() { return false; } - }; + } for v in &self.audio_preview { if !v.is_initialized() { return false; } - }; + } for v in &self.restriction { if !v.is_initialized() { return false; } - }; + } for v in &self.freeze_frame { if !v.is_initialized() { return false; } - }; + } for v in &self.availability { if !v.is_initialized() { return false; } - }; + } for v in &self.original_audio { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.duration = ::std::option::Option::Some(tmp); - }, + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.popularity = ::std::option::Option::Some(tmp); - }, + } 12 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.file)?; - }, + } 64 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.description)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.description, + )?; + } 65 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.number = ::std::option::Option::Some(tmp); - }, + } 66 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.publish_time)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.publish_time, + )?; + } 67 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_sint32()?; self.deprecated_popularity = ::std::option::Option::Some(tmp); - }, + } 68 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.covers)?; - }, + } 69 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.language)?; - }, + } 70 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.explicit = ::std::option::Option::Some(tmp); - }, + } 71 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.show)?; - }, + } 72 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.video)?; - }, + } 73 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.video_preview)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.video_preview, + )?; + } 74 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.audio_preview)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.audio_preview, + )?; + } 75 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.restriction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.restriction, + )?; + } 76 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.freeze_frame)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.freeze_frame, + )?; + } 77 => { ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.keyword)?; - }, + } 78 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.suppress_monetization = ::std::option::Option::Some(tmp); - }, + } 79 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.interpret_restriction_using_geoip = ::std::option::Option::Some(tmp); - }, + } 81 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.allow_background_playback = ::std::option::Option::Some(tmp); - }, + } 82 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.availability)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.availability, + )?; + } 83 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.external_url)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.external_url, + )?; + } 84 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.original_audio)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.original_audio, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -8764,7 +9575,7 @@ impl ::protobuf::Message for Episode { for value in &self.file { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.description.as_ref() { my_size += ::protobuf::rt::string_size(64, &v); } @@ -8795,26 +9606,26 @@ impl ::protobuf::Message for Episode { for value in &self.video { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.video_preview { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.audio_preview { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.restriction { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.freeze_frame.as_ref() { let len = v.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } for value in &self.keyword { my_size += ::protobuf::rt::string_size(77, &value); - }; + } if let Some(v) = self.suppress_monetization { my_size += 3; } @@ -8827,7 +9638,7 @@ impl ::protobuf::Message for Episode { for value in &self.availability { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.external_url.as_ref() { my_size += ::protobuf::rt::string_size(83, &v); } @@ -8840,7 +9651,10 @@ impl ::protobuf::Message for Episode { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gid.as_ref() { os.write_bytes(1, &v)?; } @@ -8857,7 +9671,7 @@ impl ::protobuf::Message for Episode { os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.description.as_ref() { os.write_string(64, &v)?; } @@ -8892,22 +9706,22 @@ impl ::protobuf::Message for Episode { os.write_tag(72, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.video_preview { os.write_tag(73, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.audio_preview { os.write_tag(74, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.restriction { os.write_tag(75, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.freeze_frame.as_ref() { os.write_tag(76, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -8915,7 +9729,7 @@ impl ::protobuf::Message for Episode { } for v in &self.keyword { os.write_string(77, &v)?; - }; + } if let Some(v) = self.suppress_monetization { os.write_bool(78, v)?; } @@ -8929,7 +9743,7 @@ impl ::protobuf::Message for Episode { os.write_tag(82, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.external_url.as_ref() { os.write_string(83, &v)?; } @@ -8973,139 +9787,239 @@ impl ::protobuf::Message for Episode { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &Episode| { &m.gid }, - |m: &mut Episode| { &mut m.gid }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Episode| { &m.name }, - |m: &mut Episode| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >("gid", |m: &Episode| &m.gid, |m: &mut Episode| &mut m.gid), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "name", |m: &Episode| &m.name, |m: &mut Episode| &mut m.name + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "duration", - |m: &Episode| { &m.duration }, - |m: &mut Episode| { &mut m.duration }, + |m: &Episode| &m.duration, + |m: &mut Episode| &mut m.duration, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "popularity", - |m: &Episode| { &m.popularity }, - |m: &mut Episode| { &mut m.popularity }, + |m: &Episode| &m.popularity, + |m: &mut Episode| &mut m.popularity, )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "file", - |m: &Episode| { &m.file }, - |m: &mut Episode| { &mut m.file }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &Episode| { &m.description }, - |m: &mut Episode| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "file", |m: &Episode| &m.file, |m: &mut Episode| &mut m.file + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "description", + |m: &Episode| &m.description, + |m: &mut Episode| &mut m.description, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "number", - |m: &Episode| { &m.number }, - |m: &mut Episode| { &mut m.number }, + |m: &Episode| &m.number, + |m: &mut Episode| &mut m.number, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "publish_time", - |m: &Episode| { &m.publish_time }, - |m: &mut Episode| { &mut m.publish_time }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "publish_time", + |m: &Episode| &m.publish_time, + |m: &mut Episode| &mut m.publish_time, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeSint32, + >( "deprecated_popularity", - |m: &Episode| { &m.deprecated_popularity }, - |m: &mut Episode| { &mut m.deprecated_popularity }, + |m: &Episode| &m.deprecated_popularity, + |m: &mut Episode| &mut m.deprecated_popularity, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "covers", - |m: &Episode| { &m.covers }, - |m: &mut Episode| { &mut m.covers }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "language", - |m: &Episode| { &m.language }, - |m: &mut Episode| { &mut m.language }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "covers", + |m: &Episode| &m.covers, + |m: &mut Episode| &mut m.covers, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "language", + |m: &Episode| &m.language, + |m: &mut Episode| &mut m.language, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "explicit", - |m: &Episode| { &m.explicit }, - |m: &mut Episode| { &mut m.explicit }, + |m: &Episode| &m.explicit, + |m: &mut Episode| &mut m.explicit, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "show", - |m: &Episode| { &m.show }, - |m: &mut Episode| { &mut m.show }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "video", - |m: &Episode| { &m.video }, - |m: &mut Episode| { &mut m.video }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "video_preview", - |m: &Episode| { &m.video_preview }, - |m: &mut Episode| { &mut m.video_preview }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "audio_preview", - |m: &Episode| { &m.audio_preview }, - |m: &mut Episode| { &mut m.audio_preview }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "restriction", - |m: &Episode| { &m.restriction }, - |m: &mut Episode| { &mut m.restriction }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "freeze_frame", - |m: &Episode| { &m.freeze_frame }, - |m: &mut Episode| { &mut m.freeze_frame }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "keyword", - |m: &Episode| { &m.keyword }, - |m: &mut Episode| { &mut m.keyword }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "show", |m: &Episode| &m.show, |m: &mut Episode| &mut m.show + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "video", + |m: &Episode| &m.video, + |m: &mut Episode| &mut m.video, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "video_preview", + |m: &Episode| &m.video_preview, + |m: &mut Episode| &mut m.video_preview, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "audio_preview", + |m: &Episode| &m.audio_preview, + |m: &mut Episode| &mut m.audio_preview, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "restriction", + |m: &Episode| &m.restriction, + |m: &mut Episode| &mut m.restriction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "freeze_frame", + |m: &Episode| &m.freeze_frame, + |m: &mut Episode| &mut m.freeze_frame, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "keyword", + |m: &Episode| &m.keyword, + |m: &mut Episode| &mut m.keyword, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "suppress_monetization", - |m: &Episode| { &m.suppress_monetization }, - |m: &mut Episode| { &mut m.suppress_monetization }, + |m: &Episode| &m.suppress_monetization, + |m: &mut Episode| &mut m.suppress_monetization, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "interpret_restriction_using_geoip", - |m: &Episode| { &m.interpret_restriction_using_geoip }, - |m: &mut Episode| { &mut m.interpret_restriction_using_geoip }, + |m: &Episode| &m.interpret_restriction_using_geoip, + |m: &mut Episode| &mut m.interpret_restriction_using_geoip, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "allow_background_playback", - |m: &Episode| { &m.allow_background_playback }, - |m: &mut Episode| { &mut m.allow_background_playback }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "availability", - |m: &Episode| { &m.availability }, - |m: &mut Episode| { &mut m.availability }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "external_url", - |m: &Episode| { &m.external_url }, - |m: &mut Episode| { &mut m.external_url }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "original_audio", - |m: &Episode| { &m.original_audio }, - |m: &mut Episode| { &mut m.original_audio }, + |m: &Episode| &m.allow_background_playback, + |m: &mut Episode| &mut m.allow_background_playback, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "availability", + |m: &Episode| &m.availability, + |m: &mut Episode| &mut m.availability, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "external_url", + |m: &Episode| &m.external_url, + |m: &mut Episode| &mut m.external_url, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "original_audio", + |m: &Episode| &m.original_audio, + |m: &mut Episode| &mut m.original_audio, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Episode", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -9113,9 +10027,7 @@ impl ::protobuf::Message for Episode { fn default_instance() -> &'static Episode { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Episode::new) - } + unsafe { instance.get(Episode::new) } } } @@ -9162,7 +10074,7 @@ impl ::protobuf::reflect::ProtobufValue for Episode { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Category { // message fields name: ::protobuf::SingularField<::std::string::String>, @@ -9185,7 +10097,6 @@ impl Category { // optional string name = 1; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -9216,12 +10127,13 @@ impl Category { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Category subcategories = 2; - pub fn get_subcategories(&self) -> &[Category] { &self.subcategories } @@ -9251,23 +10163,35 @@ impl ::protobuf::Message for Category { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.subcategories)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.subcategories, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -9283,13 +10207,16 @@ impl ::protobuf::Message for Category { for value in &self.subcategories { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.name.as_ref() { os.write_string(1, &v)?; } @@ -9297,7 +10224,7 @@ impl ::protobuf::Message for Category { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -9333,24 +10260,35 @@ impl ::protobuf::Message for Category { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Category| { &m.name }, - |m: &mut Category| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "subcategories", - |m: &Category| { &m.subcategories }, - |m: &mut Category| { &mut m.subcategories }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "name", + |m: &Category| &m.name, + |m: &mut Category| &mut m.name, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "subcategories", + |m: &Category| &m.subcategories, + |m: &mut Category| &mut m.subcategories, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Category", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -9358,9 +10296,7 @@ impl ::protobuf::Message for Category { fn default_instance() -> &'static Category { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Category::new) - } + unsafe { instance.get(Category::new) } } } @@ -9384,7 +10320,7 @@ impl ::protobuf::reflect::ProtobufValue for Category { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct OriginalAudio { // message fields uuid: ::protobuf::SingularField<::std::vec::Vec>, @@ -9406,7 +10342,6 @@ impl OriginalAudio { // optional bytes uuid = 1; - pub fn get_uuid(&self) -> &[u8] { match self.uuid.as_ref() { Some(v) => &v, @@ -9446,16 +10381,24 @@ impl ::protobuf::Message for OriginalAudio { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.uuid)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -9473,7 +10416,10 @@ impl ::protobuf::Message for OriginalAudio { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.uuid.as_ref() { os.write_bytes(1, &v)?; } @@ -9512,19 +10458,25 @@ impl ::protobuf::Message for OriginalAudio { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "uuid", - |m: &OriginalAudio| { &m.uuid }, - |m: &mut OriginalAudio| { &mut m.uuid }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "uuid", + |m: &OriginalAudio| &m.uuid, + |m: &mut OriginalAudio| &mut m.uuid, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "OriginalAudio", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -9532,9 +10484,7 @@ impl ::protobuf::Message for OriginalAudio { fn default_instance() -> &'static OriginalAudio { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(OriginalAudio::new) - } + unsafe { instance.get(OriginalAudio::new) } } } @@ -9684,16 +10634,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x18\x01\x20\x01(\x0cB\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/playlist4changes.rs b/protocol/src/playlist4changes.rs index 7022f152..834eb3ed 100644 --- a/protocol/src/playlist4changes.rs +++ b/protocol/src/playlist4changes.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ChangeInfo { // message fields user: ::protobuf::SingularField<::std::string::String>, @@ -55,7 +55,6 @@ impl ChangeInfo { // optional string user = 1; - pub fn get_user(&self) -> &str { match self.user.as_ref() { Some(v) => &v, @@ -86,12 +85,13 @@ impl ChangeInfo { // Take field pub fn take_user(&mut self) -> ::std::string::String { - self.user.take().unwrap_or_else(|| ::std::string::String::new()) + self.user + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional int32 timestamp = 2; - pub fn get_timestamp(&self) -> i32 { self.timestamp.unwrap_or(0) } @@ -110,7 +110,6 @@ impl ChangeInfo { // optional bool admin = 3; - pub fn get_admin(&self) -> bool { self.admin.unwrap_or(false) } @@ -129,7 +128,6 @@ impl ChangeInfo { // optional bool undo = 4; - pub fn get_undo(&self) -> bool { self.undo.unwrap_or(false) } @@ -148,7 +146,6 @@ impl ChangeInfo { // optional bool redo = 5; - pub fn get_redo(&self) -> bool { self.redo.unwrap_or(false) } @@ -167,7 +164,6 @@ impl ChangeInfo { // optional bool merge = 6; - pub fn get_merge(&self) -> bool { self.merge.unwrap_or(false) } @@ -186,7 +182,6 @@ impl ChangeInfo { // optional bool compressed = 7; - pub fn get_compressed(&self) -> bool { self.compressed.unwrap_or(false) } @@ -205,7 +200,6 @@ impl ChangeInfo { // optional bool migration = 8; - pub fn get_migration(&self) -> bool { self.migration.unwrap_or(false) } @@ -228,65 +222,87 @@ impl ::protobuf::Message for ChangeInfo { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.user)?; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.timestamp = ::std::option::Option::Some(tmp); - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.admin = ::std::option::Option::Some(tmp); - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.undo = ::std::option::Option::Some(tmp); - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.redo = ::std::option::Option::Some(tmp); - }, + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.merge = ::std::option::Option::Some(tmp); - }, + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.compressed = ::std::option::Option::Some(tmp); - }, + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.migration = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -325,7 +341,10 @@ impl ::protobuf::Message for ChangeInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.user.as_ref() { os.write_string(1, &v)?; } @@ -385,54 +404,81 @@ impl ::protobuf::Message for ChangeInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "user", - |m: &ChangeInfo| { &m.user }, - |m: &mut ChangeInfo| { &mut m.user }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "user", + |m: &ChangeInfo| &m.user, + |m: &mut ChangeInfo| &mut m.user, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "timestamp", - |m: &ChangeInfo| { &m.timestamp }, - |m: &mut ChangeInfo| { &mut m.timestamp }, + |m: &ChangeInfo| &m.timestamp, + |m: &mut ChangeInfo| &mut m.timestamp, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "admin", - |m: &ChangeInfo| { &m.admin }, - |m: &mut ChangeInfo| { &mut m.admin }, + |m: &ChangeInfo| &m.admin, + |m: &mut ChangeInfo| &mut m.admin, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "undo", - |m: &ChangeInfo| { &m.undo }, - |m: &mut ChangeInfo| { &mut m.undo }, + |m: &ChangeInfo| &m.undo, + |m: &mut ChangeInfo| &mut m.undo, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "redo", - |m: &ChangeInfo| { &m.redo }, - |m: &mut ChangeInfo| { &mut m.redo }, + |m: &ChangeInfo| &m.redo, + |m: &mut ChangeInfo| &mut m.redo, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "merge", - |m: &ChangeInfo| { &m.merge }, - |m: &mut ChangeInfo| { &mut m.merge }, + |m: &ChangeInfo| &m.merge, + |m: &mut ChangeInfo| &mut m.merge, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "compressed", - |m: &ChangeInfo| { &m.compressed }, - |m: &mut ChangeInfo| { &mut m.compressed }, + |m: &ChangeInfo| &m.compressed, + |m: &mut ChangeInfo| &mut m.compressed, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "migration", - |m: &ChangeInfo| { &m.migration }, - |m: &mut ChangeInfo| { &mut m.migration }, + |m: &ChangeInfo| &m.migration, + |m: &mut ChangeInfo| &mut m.migration, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ChangeInfo", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -440,9 +486,7 @@ impl ::protobuf::Message for ChangeInfo { fn default_instance() -> &'static ChangeInfo { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ChangeInfo::new) - } + unsafe { instance.get(ChangeInfo::new) } } } @@ -472,7 +516,7 @@ impl ::protobuf::reflect::ProtobufValue for ChangeInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Delta { // message fields base_version: ::protobuf::SingularField<::std::vec::Vec>, @@ -496,7 +540,6 @@ impl Delta { // optional bytes base_version = 1; - pub fn get_base_version(&self) -> &[u8] { match self.base_version.as_ref() { Some(v) => &v, @@ -527,12 +570,13 @@ impl Delta { // Take field pub fn take_base_version(&mut self) -> ::std::vec::Vec { - self.base_version.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.base_version + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // repeated .Op ops = 2; - pub fn get_ops(&self) -> &[super::playlist4ops::Op] { &self.ops } @@ -557,9 +601,10 @@ impl Delta { // optional .ChangeInfo info = 4; - pub fn get_info(&self) -> &ChangeInfo { - self.info.as_ref().unwrap_or_else(|| ChangeInfo::default_instance()) + self.info + .as_ref() + .unwrap_or_else(|| ChangeInfo::default_instance()) } pub fn clear_info(&mut self) { self.info.clear(); @@ -595,31 +640,43 @@ impl ::protobuf::Message for Delta { if !v.is_initialized() { return false; } - }; + } for v in &self.info { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.base_version)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.base_version, + )?; + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ops)?; - }, + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.info)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -635,7 +692,7 @@ impl ::protobuf::Message for Delta { for value in &self.ops { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.info.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -645,7 +702,10 @@ impl ::protobuf::Message for Delta { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.base_version.as_ref() { os.write_bytes(1, &v)?; } @@ -653,7 +713,7 @@ impl ::protobuf::Message for Delta { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.info.as_ref() { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -694,29 +754,37 @@ impl ::protobuf::Message for Delta { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "base_version", - |m: &Delta| { &m.base_version }, - |m: &mut Delta| { &mut m.base_version }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ops", - |m: &Delta| { &m.ops }, - |m: &mut Delta| { &mut m.ops }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "info", - |m: &Delta| { &m.info }, - |m: &mut Delta| { &mut m.info }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "base_version", + |m: &Delta| &m.base_version, + |m: &mut Delta| &mut m.base_version, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("ops", |m: &Delta| &m.ops, |m: &mut Delta| &mut m.ops), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("info", |m: &Delta| &m.info, |m: &mut Delta| &mut m.info), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Delta", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -724,9 +792,7 @@ impl ::protobuf::Message for Delta { fn default_instance() -> &'static Delta { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Delta::new) - } + unsafe { instance.get(Delta::new) } } } @@ -751,7 +817,7 @@ impl ::protobuf::reflect::ProtobufValue for Delta { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Merge { // message fields base_version: ::protobuf::SingularField<::std::vec::Vec>, @@ -775,7 +841,6 @@ impl Merge { // optional bytes base_version = 1; - pub fn get_base_version(&self) -> &[u8] { match self.base_version.as_ref() { Some(v) => &v, @@ -806,12 +871,13 @@ impl Merge { // Take field pub fn take_base_version(&mut self) -> ::std::vec::Vec { - self.base_version.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.base_version + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bytes merge_version = 2; - pub fn get_merge_version(&self) -> &[u8] { match self.merge_version.as_ref() { Some(v) => &v, @@ -842,14 +908,17 @@ impl Merge { // Take field pub fn take_merge_version(&mut self) -> ::std::vec::Vec { - self.merge_version.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.merge_version + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional .ChangeInfo info = 4; - pub fn get_info(&self) -> &ChangeInfo { - self.info.as_ref().unwrap_or_else(|| ChangeInfo::default_instance()) + self.info + .as_ref() + .unwrap_or_else(|| ChangeInfo::default_instance()) } pub fn clear_info(&mut self) { self.info.clear(); @@ -885,26 +954,42 @@ impl ::protobuf::Message for Merge { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.base_version)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.base_version, + )?; + } 2 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.merge_version)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.merge_version, + )?; + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.info)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -929,7 +1014,10 @@ impl ::protobuf::Message for Merge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.base_version.as_ref() { os.write_bytes(1, &v)?; } @@ -976,29 +1064,41 @@ impl ::protobuf::Message for Merge { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "base_version", - |m: &Merge| { &m.base_version }, - |m: &mut Merge| { &mut m.base_version }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "merge_version", - |m: &Merge| { &m.merge_version }, - |m: &mut Merge| { &mut m.merge_version }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "info", - |m: &Merge| { &m.info }, - |m: &mut Merge| { &mut m.info }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "base_version", + |m: &Merge| &m.base_version, + |m: &mut Merge| &mut m.base_version, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "merge_version", + |m: &Merge| &m.merge_version, + |m: &mut Merge| &mut m.merge_version, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("info", |m: &Merge| &m.info, |m: &mut Merge| &mut m.info), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Merge", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1006,9 +1106,7 @@ impl ::protobuf::Message for Merge { fn default_instance() -> &'static Merge { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Merge::new) - } + unsafe { instance.get(Merge::new) } } } @@ -1033,7 +1131,7 @@ impl ::protobuf::reflect::ProtobufValue for Merge { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ChangeSet { // message fields kind: ::std::option::Option, @@ -1057,7 +1155,6 @@ impl ChangeSet { // optional .ChangeSet.Kind kind = 1; - pub fn get_kind(&self) -> ChangeSet_Kind { self.kind.unwrap_or(ChangeSet_Kind::KIND_UNKNOWN) } @@ -1076,9 +1173,10 @@ impl ChangeSet { // optional .Delta delta = 2; - pub fn get_delta(&self) -> &Delta { - self.delta.as_ref().unwrap_or_else(|| Delta::default_instance()) + self.delta + .as_ref() + .unwrap_or_else(|| Delta::default_instance()) } pub fn clear_delta(&mut self) { self.delta.clear(); @@ -1109,9 +1207,10 @@ impl ChangeSet { // optional .Merge merge = 3; - pub fn get_merge(&self) -> &Merge { - self.merge.as_ref().unwrap_or_else(|| Merge::default_instance()) + self.merge + .as_ref() + .unwrap_or_else(|| Merge::default_instance()) } pub fn clear_merge(&mut self) { self.merge.clear(); @@ -1147,31 +1246,43 @@ impl ::protobuf::Message for ChangeSet { if !v.is_initialized() { return false; } - }; + } for v in &self.merge { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.kind, 1, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.kind, + 1, + &mut self.unknown_fields, + )?, 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.delta)?; - }, + } 3 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.merge)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1197,7 +1308,10 @@ impl ::protobuf::Message for ChangeSet { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.kind { os.write_enum(1, v.value())?; } @@ -1246,29 +1360,43 @@ impl ::protobuf::Message for ChangeSet { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "kind", - |m: &ChangeSet| { &m.kind }, - |m: &mut ChangeSet| { &mut m.kind }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "delta", - |m: &ChangeSet| { &m.delta }, - |m: &mut ChangeSet| { &mut m.delta }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "merge", - |m: &ChangeSet| { &m.merge }, - |m: &mut ChangeSet| { &mut m.merge }, + |m: &ChangeSet| &m.kind, + |m: &mut ChangeSet| &mut m.kind, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "delta", + |m: &ChangeSet| &m.delta, + |m: &mut ChangeSet| &mut m.delta, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "merge", + |m: &ChangeSet| &m.merge, + |m: &mut ChangeSet| &mut m.merge, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ChangeSet", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1276,9 +1404,7 @@ impl ::protobuf::Message for ChangeSet { fn default_instance() -> &'static ChangeSet { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ChangeSet::new) - } + unsafe { instance.get(ChangeSet::new) } } } @@ -1303,7 +1429,7 @@ impl ::protobuf::reflect::ProtobufValue for ChangeSet { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ChangeSet_Kind { KIND_UNKNOWN = 0, DELTA = 2, @@ -1320,7 +1446,7 @@ impl ::protobuf::ProtobufEnum for ChangeSet_Kind { 0 => ::std::option::Option::Some(ChangeSet_Kind::KIND_UNKNOWN), 2 => ::std::option::Option::Some(ChangeSet_Kind::DELTA), 3 => ::std::option::Option::Some(ChangeSet_Kind::MERGE), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -1334,17 +1460,20 @@ impl ::protobuf::ProtobufEnum for ChangeSet_Kind { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ChangeSet.Kind", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ChangeSet.Kind", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ChangeSet_Kind { -} +impl ::std::marker::Copy for ChangeSet_Kind {} impl ::std::default::Default for ChangeSet_Kind { fn default() -> Self { @@ -1358,7 +1487,7 @@ impl ::protobuf::reflect::ProtobufValue for ChangeSet_Kind { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RevisionTaggedChangeSet { // message fields revision: ::protobuf::SingularField<::std::vec::Vec>, @@ -1381,7 +1510,6 @@ impl RevisionTaggedChangeSet { // optional bytes revision = 1; - pub fn get_revision(&self) -> &[u8] { match self.revision.as_ref() { Some(v) => &v, @@ -1412,14 +1540,17 @@ impl RevisionTaggedChangeSet { // Take field pub fn take_revision(&mut self) -> ::std::vec::Vec { - self.revision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.revision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional .ChangeSet change_set = 2; - pub fn get_change_set(&self) -> &ChangeSet { - self.change_set.as_ref().unwrap_or_else(|| ChangeSet::default_instance()) + self.change_set + .as_ref() + .unwrap_or_else(|| ChangeSet::default_instance()) } pub fn clear_change_set(&mut self) { self.change_set.clear(); @@ -1455,23 +1586,35 @@ impl ::protobuf::Message for RevisionTaggedChangeSet { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.revision)?; - }, + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.change_set)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.change_set, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1493,7 +1636,10 @@ impl ::protobuf::Message for RevisionTaggedChangeSet { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.revision.as_ref() { os.write_bytes(1, &v)?; } @@ -1537,34 +1683,44 @@ impl ::protobuf::Message for RevisionTaggedChangeSet { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "revision", - |m: &RevisionTaggedChangeSet| { &m.revision }, - |m: &mut RevisionTaggedChangeSet| { &mut m.revision }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "change_set", - |m: &RevisionTaggedChangeSet| { &m.change_set }, - |m: &mut RevisionTaggedChangeSet| { &mut m.change_set }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "revision", + |m: &RevisionTaggedChangeSet| &m.revision, + |m: &mut RevisionTaggedChangeSet| &mut m.revision, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "change_set", + |m: &RevisionTaggedChangeSet| &m.change_set, + |m: &mut RevisionTaggedChangeSet| &mut m.change_set, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "RevisionTaggedChangeSet", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static RevisionTaggedChangeSet { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RevisionTaggedChangeSet::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(RevisionTaggedChangeSet::new) } } } @@ -1588,7 +1744,7 @@ impl ::protobuf::reflect::ProtobufValue for RevisionTaggedChangeSet { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Diff { // message fields from_revision: ::protobuf::SingularField<::std::vec::Vec>, @@ -1612,7 +1768,6 @@ impl Diff { // optional bytes from_revision = 1; - pub fn get_from_revision(&self) -> &[u8] { match self.from_revision.as_ref() { Some(v) => &v, @@ -1643,12 +1798,13 @@ impl Diff { // Take field pub fn take_from_revision(&mut self) -> ::std::vec::Vec { - self.from_revision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.from_revision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // repeated .Op ops = 2; - pub fn get_ops(&self) -> &[super::playlist4ops::Op] { &self.ops } @@ -1673,7 +1829,6 @@ impl Diff { // optional bytes to_revision = 3; - pub fn get_to_revision(&self) -> &[u8] { match self.to_revision.as_ref() { Some(v) => &v, @@ -1704,7 +1859,9 @@ impl Diff { // Take field pub fn take_to_revision(&mut self) -> ::std::vec::Vec { - self.to_revision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.to_revision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } } @@ -1714,26 +1871,38 @@ impl ::protobuf::Message for Diff { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.from_revision)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.from_revision, + )?; + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ops)?; - }, + } 3 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.to_revision)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1749,7 +1918,7 @@ impl ::protobuf::Message for Diff { for value in &self.ops { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.to_revision.as_ref() { my_size += ::protobuf::rt::bytes_size(3, &v); } @@ -1758,7 +1927,10 @@ impl ::protobuf::Message for Diff { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.from_revision.as_ref() { os.write_bytes(1, &v)?; } @@ -1766,7 +1938,7 @@ impl ::protobuf::Message for Diff { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.to_revision.as_ref() { os.write_bytes(3, &v)?; } @@ -1805,29 +1977,41 @@ impl ::protobuf::Message for Diff { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "from_revision", - |m: &Diff| { &m.from_revision }, - |m: &mut Diff| { &mut m.from_revision }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ops", - |m: &Diff| { &m.ops }, - |m: &mut Diff| { &mut m.ops }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "to_revision", - |m: &Diff| { &m.to_revision }, - |m: &mut Diff| { &mut m.to_revision }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "from_revision", + |m: &Diff| &m.from_revision, + |m: &mut Diff| &mut m.from_revision, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("ops", |m: &Diff| &m.ops, |m: &mut Diff| &mut m.ops), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "to_revision", + |m: &Diff| &m.to_revision, + |m: &mut Diff| &mut m.to_revision, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Diff", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1835,9 +2019,7 @@ impl ::protobuf::Message for Diff { fn default_instance() -> &'static Diff { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Diff::new) - } + unsafe { instance.get(Diff::new) } } } @@ -1862,7 +2044,7 @@ impl ::protobuf::reflect::ProtobufValue for Diff { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListDump { // message fields latestRevision: ::protobuf::SingularField<::std::vec::Vec>, @@ -1889,7 +2071,6 @@ impl ListDump { // optional bytes latestRevision = 1; - pub fn get_latestRevision(&self) -> &[u8] { match self.latestRevision.as_ref() { Some(v) => &v, @@ -1920,12 +2101,13 @@ impl ListDump { // Take field pub fn take_latestRevision(&mut self) -> ::std::vec::Vec { - self.latestRevision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.latestRevision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional int32 length = 2; - pub fn get_length(&self) -> i32 { self.length.unwrap_or(0) } @@ -1944,9 +2126,10 @@ impl ListDump { // optional .ListAttributes attributes = 3; - pub fn get_attributes(&self) -> &super::playlist4meta::ListAttributes { - self.attributes.as_ref().unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance()) + self.attributes + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance()) } pub fn clear_attributes(&mut self) { self.attributes.clear(); @@ -1972,14 +2155,17 @@ impl ListDump { // Take field pub fn take_attributes(&mut self) -> super::playlist4meta::ListAttributes { - self.attributes.take().unwrap_or_else(|| super::playlist4meta::ListAttributes::new()) + self.attributes + .take() + .unwrap_or_else(|| super::playlist4meta::ListAttributes::new()) } // optional .ListChecksum checksum = 4; - pub fn get_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_checksum(&mut self) { self.checksum.clear(); @@ -2005,14 +2191,17 @@ impl ListDump { // Take field pub fn take_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListItems contents = 5; - pub fn get_contents(&self) -> &super::playlist4content::ListItems { - self.contents.as_ref().unwrap_or_else(|| super::playlist4content::ListItems::default_instance()) + self.contents + .as_ref() + .unwrap_or_else(|| super::playlist4content::ListItems::default_instance()) } pub fn clear_contents(&mut self) { self.contents.clear(); @@ -2038,12 +2227,13 @@ impl ListDump { // Take field pub fn take_contents(&mut self) -> super::playlist4content::ListItems { - self.contents.take().unwrap_or_else(|| super::playlist4content::ListItems::new()) + self.contents + .take() + .unwrap_or_else(|| super::playlist4content::ListItems::new()) } // repeated .Delta pendingDeltas = 7; - pub fn get_pendingDeltas(&self) -> &[Delta] { &self.pendingDeltas } @@ -2073,54 +2263,76 @@ impl ::protobuf::Message for ListDump { if !v.is_initialized() { return false; } - }; + } for v in &self.checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.contents { if !v.is_initialized() { return false; } - }; + } for v in &self.pendingDeltas { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.latestRevision)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.latestRevision, + )?; + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.length = ::std::option::Option::Some(tmp); - }, + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.attributes, + )?; + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.checksum)?; - }, + } 5 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.contents)?; - }, + } 7 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.pendingDeltas)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.pendingDeltas, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2151,13 +2363,16 @@ impl ::protobuf::Message for ListDump { for value in &self.pendingDeltas { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.latestRevision.as_ref() { os.write_bytes(1, &v)?; } @@ -2183,7 +2398,7 @@ impl ::protobuf::Message for ListDump { os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -2219,44 +2434,75 @@ impl ::protobuf::Message for ListDump { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "latestRevision", - |m: &ListDump| { &m.latestRevision }, - |m: &mut ListDump| { &mut m.latestRevision }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "latestRevision", + |m: &ListDump| &m.latestRevision, + |m: &mut ListDump| &mut m.latestRevision, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "length", - |m: &ListDump| { &m.length }, - |m: &mut ListDump| { &mut m.length }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "attributes", - |m: &ListDump| { &m.attributes }, - |m: &mut ListDump| { &mut m.attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "checksum", - |m: &ListDump| { &m.checksum }, - |m: &mut ListDump| { &mut m.checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "contents", - |m: &ListDump| { &m.contents }, - |m: &mut ListDump| { &mut m.contents }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pendingDeltas", - |m: &ListDump| { &m.pendingDeltas }, - |m: &mut ListDump| { &mut m.pendingDeltas }, + |m: &ListDump| &m.length, + |m: &mut ListDump| &mut m.length, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4meta::ListAttributes, + >, + >( + "attributes", + |m: &ListDump| &m.attributes, + |m: &mut ListDump| &mut m.attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "checksum", + |m: &ListDump| &m.checksum, + |m: &mut ListDump| &mut m.checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "contents", + |m: &ListDump| &m.contents, + |m: &mut ListDump| &mut m.contents, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "pendingDeltas", + |m: &ListDump| &m.pendingDeltas, + |m: &mut ListDump| &mut m.pendingDeltas, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListDump", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2264,9 +2510,7 @@ impl ::protobuf::Message for ListDump { fn default_instance() -> &'static ListDump { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListDump::new) - } + unsafe { instance.get(ListDump::new) } } } @@ -2294,7 +2538,7 @@ impl ::protobuf::reflect::ProtobufValue for ListDump { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListChanges { // message fields baseRevision: ::protobuf::SingularField<::std::vec::Vec>, @@ -2321,7 +2565,6 @@ impl ListChanges { // optional bytes baseRevision = 1; - pub fn get_baseRevision(&self) -> &[u8] { match self.baseRevision.as_ref() { Some(v) => &v, @@ -2352,12 +2595,13 @@ impl ListChanges { // Take field pub fn take_baseRevision(&mut self) -> ::std::vec::Vec { - self.baseRevision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.baseRevision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // repeated .Delta deltas = 2; - pub fn get_deltas(&self) -> &[Delta] { &self.deltas } @@ -2382,7 +2626,6 @@ impl ListChanges { // optional bool wantResultingRevisions = 3; - pub fn get_wantResultingRevisions(&self) -> bool { self.wantResultingRevisions.unwrap_or(false) } @@ -2401,7 +2644,6 @@ impl ListChanges { // optional bool wantSyncResult = 4; - pub fn get_wantSyncResult(&self) -> bool { self.wantSyncResult.unwrap_or(false) } @@ -2420,9 +2662,10 @@ impl ListChanges { // optional .ListDump dump = 5; - pub fn get_dump(&self) -> &ListDump { - self.dump.as_ref().unwrap_or_else(|| ListDump::default_instance()) + self.dump + .as_ref() + .unwrap_or_else(|| ListDump::default_instance()) } pub fn clear_dump(&mut self) { self.dump.clear(); @@ -2453,7 +2696,6 @@ impl ListChanges { // repeated int32 nonces = 6; - pub fn get_nonces(&self) -> &[i32] { &self.nonces } @@ -2483,48 +2725,64 @@ impl ::protobuf::Message for ListChanges { if !v.is_initialized() { return false; } - }; + } for v in &self.dump { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.baseRevision)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.baseRevision, + )?; + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.deltas)?; - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantResultingRevisions = ::std::option::Option::Some(tmp); - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantSyncResult = ::std::option::Option::Some(tmp); - }, + } 5 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.dump)?; - }, + } 6 => { ::protobuf::rt::read_repeated_int32_into(wire_type, is, &mut self.nonces)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2540,7 +2798,7 @@ impl ::protobuf::Message for ListChanges { for value in &self.deltas { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(v) = self.wantResultingRevisions { my_size += 2; } @@ -2552,14 +2810,18 @@ impl ::protobuf::Message for ListChanges { my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } for value in &self.nonces { - my_size += ::protobuf::rt::value_size(6, *value, ::protobuf::wire_format::WireTypeVarint); - }; + my_size += + ::protobuf::rt::value_size(6, *value, ::protobuf::wire_format::WireTypeVarint); + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.baseRevision.as_ref() { os.write_bytes(1, &v)?; } @@ -2567,7 +2829,7 @@ impl ::protobuf::Message for ListChanges { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(v) = self.wantResultingRevisions { os.write_bool(3, v)?; } @@ -2581,7 +2843,7 @@ impl ::protobuf::Message for ListChanges { } for v in &self.nonces { os.write_int32(6, *v)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -2617,44 +2879,69 @@ impl ::protobuf::Message for ListChanges { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "baseRevision", - |m: &ListChanges| { &m.baseRevision }, - |m: &mut ListChanges| { &mut m.baseRevision }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "deltas", - |m: &ListChanges| { &m.deltas }, - |m: &mut ListChanges| { &mut m.deltas }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "baseRevision", + |m: &ListChanges| &m.baseRevision, + |m: &mut ListChanges| &mut m.baseRevision, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "deltas", + |m: &ListChanges| &m.deltas, + |m: &mut ListChanges| &mut m.deltas, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantResultingRevisions", - |m: &ListChanges| { &m.wantResultingRevisions }, - |m: &mut ListChanges| { &mut m.wantResultingRevisions }, + |m: &ListChanges| &m.wantResultingRevisions, + |m: &mut ListChanges| &mut m.wantResultingRevisions, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantSyncResult", - |m: &ListChanges| { &m.wantSyncResult }, - |m: &mut ListChanges| { &mut m.wantSyncResult }, + |m: &ListChanges| &m.wantSyncResult, + |m: &mut ListChanges| &mut m.wantSyncResult, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "dump", - |m: &ListChanges| { &m.dump }, - |m: &mut ListChanges| { &mut m.dump }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "dump", + |m: &ListChanges| &m.dump, + |m: &mut ListChanges| &mut m.dump, + ), + ); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "nonces", - |m: &ListChanges| { &m.nonces }, - |m: &mut ListChanges| { &mut m.nonces }, + |m: &ListChanges| &m.nonces, + |m: &mut ListChanges| &mut m.nonces, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListChanges", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2662,9 +2949,7 @@ impl ::protobuf::Message for ListChanges { fn default_instance() -> &'static ListChanges { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListChanges::new) - } + unsafe { instance.get(ListChanges::new) } } } @@ -2692,7 +2977,7 @@ impl ::protobuf::reflect::ProtobufValue for ListChanges { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct SelectedListContent { // message fields revision: ::protobuf::SingularField<::std::vec::Vec>, @@ -2727,7 +3012,6 @@ impl SelectedListContent { // optional bytes revision = 1; - pub fn get_revision(&self) -> &[u8] { match self.revision.as_ref() { Some(v) => &v, @@ -2758,12 +3042,13 @@ impl SelectedListContent { // Take field pub fn take_revision(&mut self) -> ::std::vec::Vec { - self.revision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.revision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional int32 length = 2; - pub fn get_length(&self) -> i32 { self.length.unwrap_or(0) } @@ -2782,9 +3067,10 @@ impl SelectedListContent { // optional .ListAttributes attributes = 3; - pub fn get_attributes(&self) -> &super::playlist4meta::ListAttributes { - self.attributes.as_ref().unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance()) + self.attributes + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance()) } pub fn clear_attributes(&mut self) { self.attributes.clear(); @@ -2810,14 +3096,17 @@ impl SelectedListContent { // Take field pub fn take_attributes(&mut self) -> super::playlist4meta::ListAttributes { - self.attributes.take().unwrap_or_else(|| super::playlist4meta::ListAttributes::new()) + self.attributes + .take() + .unwrap_or_else(|| super::playlist4meta::ListAttributes::new()) } // optional .ListChecksum checksum = 4; - pub fn get_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_checksum(&mut self) { self.checksum.clear(); @@ -2843,14 +3132,17 @@ impl SelectedListContent { // Take field pub fn take_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListItems contents = 5; - pub fn get_contents(&self) -> &super::playlist4content::ListItems { - self.contents.as_ref().unwrap_or_else(|| super::playlist4content::ListItems::default_instance()) + self.contents + .as_ref() + .unwrap_or_else(|| super::playlist4content::ListItems::default_instance()) } pub fn clear_contents(&mut self) { self.contents.clear(); @@ -2876,14 +3168,17 @@ impl SelectedListContent { // Take field pub fn take_contents(&mut self) -> super::playlist4content::ListItems { - self.contents.take().unwrap_or_else(|| super::playlist4content::ListItems::new()) + self.contents + .take() + .unwrap_or_else(|| super::playlist4content::ListItems::new()) } // optional .Diff diff = 6; - pub fn get_diff(&self) -> &Diff { - self.diff.as_ref().unwrap_or_else(|| Diff::default_instance()) + self.diff + .as_ref() + .unwrap_or_else(|| Diff::default_instance()) } pub fn clear_diff(&mut self) { self.diff.clear(); @@ -2914,9 +3209,10 @@ impl SelectedListContent { // optional .Diff syncResult = 7; - pub fn get_syncResult(&self) -> &Diff { - self.syncResult.as_ref().unwrap_or_else(|| Diff::default_instance()) + self.syncResult + .as_ref() + .unwrap_or_else(|| Diff::default_instance()) } pub fn clear_syncResult(&mut self) { self.syncResult.clear(); @@ -2947,7 +3243,6 @@ impl SelectedListContent { // repeated bytes resultingRevisions = 8; - pub fn get_resultingRevisions(&self) -> &[::std::vec::Vec] { &self.resultingRevisions } @@ -2961,18 +3256,22 @@ impl SelectedListContent { } // Mutable pointer to the field. - pub fn mut_resultingRevisions(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { + pub fn mut_resultingRevisions( + &mut self, + ) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { &mut self.resultingRevisions } // Take field pub fn take_resultingRevisions(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec> { - ::std::mem::replace(&mut self.resultingRevisions, ::protobuf::RepeatedField::new()) + ::std::mem::replace( + &mut self.resultingRevisions, + ::protobuf::RepeatedField::new(), + ) } // optional bool multipleHeads = 9; - pub fn get_multipleHeads(&self) -> bool { self.multipleHeads.unwrap_or(false) } @@ -2991,7 +3290,6 @@ impl SelectedListContent { // optional bool upToDate = 10; - pub fn get_upToDate(&self) -> bool { self.upToDate.unwrap_or(false) } @@ -3010,7 +3308,6 @@ impl SelectedListContent { // repeated .ClientResolveAction resolveAction = 12; - pub fn get_resolveAction(&self) -> &[super::playlist4issues::ClientResolveAction] { &self.resolveAction } @@ -3019,23 +3316,29 @@ impl SelectedListContent { } // Param is passed by value, moved - pub fn set_resolveAction(&mut self, v: ::protobuf::RepeatedField) { + pub fn set_resolveAction( + &mut self, + v: ::protobuf::RepeatedField, + ) { self.resolveAction = v; } // Mutable pointer to the field. - pub fn mut_resolveAction(&mut self) -> &mut ::protobuf::RepeatedField { + pub fn mut_resolveAction( + &mut self, + ) -> &mut ::protobuf::RepeatedField { &mut self.resolveAction } // Take field - pub fn take_resolveAction(&mut self) -> ::protobuf::RepeatedField { + pub fn take_resolveAction( + &mut self, + ) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.resolveAction, ::protobuf::RepeatedField::new()) } // repeated .ClientIssue issues = 13; - pub fn get_issues(&self) -> &[super::playlist4issues::ClientIssue] { &self.issues } @@ -3044,23 +3347,29 @@ impl SelectedListContent { } // Param is passed by value, moved - pub fn set_issues(&mut self, v: ::protobuf::RepeatedField) { + pub fn set_issues( + &mut self, + v: ::protobuf::RepeatedField, + ) { self.issues = v; } // Mutable pointer to the field. - pub fn mut_issues(&mut self) -> &mut ::protobuf::RepeatedField { + pub fn mut_issues( + &mut self, + ) -> &mut ::protobuf::RepeatedField { &mut self.issues } // Take field - pub fn take_issues(&mut self) -> ::protobuf::RepeatedField { + pub fn take_issues( + &mut self, + ) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.issues, ::protobuf::RepeatedField::new()) } // repeated int32 nonces = 14; - pub fn get_nonces(&self) -> &[i32] { &self.nonces } @@ -3085,7 +3394,6 @@ impl SelectedListContent { // optional string owner_username = 16; - pub fn get_owner_username(&self) -> &str { match self.owner_username.as_ref() { Some(v) => &v, @@ -3116,7 +3424,9 @@ impl SelectedListContent { // Take field pub fn take_owner_username(&mut self) -> ::std::string::String { - self.owner_username.take().unwrap_or_else(|| ::std::string::String::new()) + self.owner_username + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -3126,101 +3436,135 @@ impl ::protobuf::Message for SelectedListContent { if !v.is_initialized() { return false; } - }; + } for v in &self.checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.contents { if !v.is_initialized() { return false; } - }; + } for v in &self.diff { if !v.is_initialized() { return false; } - }; + } for v in &self.syncResult { if !v.is_initialized() { return false; } - }; + } for v in &self.resolveAction { if !v.is_initialized() { return false; } - }; + } for v in &self.issues { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.revision)?; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.length = ::std::option::Option::Some(tmp); - }, + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.attributes, + )?; + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.checksum)?; - }, + } 5 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.contents)?; - }, + } 6 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diff)?; - }, + } 7 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.syncResult)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.syncResult, + )?; + } 8 => { - ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.resultingRevisions)?; - }, + ::protobuf::rt::read_repeated_bytes_into( + wire_type, + is, + &mut self.resultingRevisions, + )?; + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.multipleHeads = ::std::option::Option::Some(tmp); - }, + } 10 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.upToDate = ::std::option::Option::Some(tmp); - }, + } 12 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.resolveAction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.resolveAction, + )?; + } 13 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.issues)?; - }, + } 14 => { ::protobuf::rt::read_repeated_int32_into(wire_type, is, &mut self.nonces)?; - }, + } 16 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.owner_username)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.owner_username, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3258,7 +3602,7 @@ impl ::protobuf::Message for SelectedListContent { } for value in &self.resultingRevisions { my_size += ::protobuf::rt::bytes_size(8, &value); - }; + } if let Some(v) = self.multipleHeads { my_size += 2; } @@ -3268,14 +3612,15 @@ impl ::protobuf::Message for SelectedListContent { for value in &self.resolveAction { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.issues { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.nonces { - my_size += ::protobuf::rt::value_size(14, *value, ::protobuf::wire_format::WireTypeVarint); - }; + my_size += + ::protobuf::rt::value_size(14, *value, ::protobuf::wire_format::WireTypeVarint); + } if let Some(ref v) = self.owner_username.as_ref() { my_size += ::protobuf::rt::string_size(16, &v); } @@ -3284,7 +3629,10 @@ impl ::protobuf::Message for SelectedListContent { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.revision.as_ref() { os.write_bytes(1, &v)?; } @@ -3318,7 +3666,7 @@ impl ::protobuf::Message for SelectedListContent { } for v in &self.resultingRevisions { os.write_bytes(8, &v)?; - }; + } if let Some(v) = self.multipleHeads { os.write_bool(9, v)?; } @@ -3329,15 +3677,15 @@ impl ::protobuf::Message for SelectedListContent { os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.issues { os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.nonces { os.write_int32(14, *v)?; - }; + } if let Some(ref v) = self.owner_username.as_ref() { os.write_string(16, &v)?; } @@ -3376,94 +3724,160 @@ impl ::protobuf::Message for SelectedListContent { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "revision", - |m: &SelectedListContent| { &m.revision }, - |m: &mut SelectedListContent| { &mut m.revision }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "revision", + |m: &SelectedListContent| &m.revision, + |m: &mut SelectedListContent| &mut m.revision, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "length", - |m: &SelectedListContent| { &m.length }, - |m: &mut SelectedListContent| { &mut m.length }, + |m: &SelectedListContent| &m.length, + |m: &mut SelectedListContent| &mut m.length, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "attributes", - |m: &SelectedListContent| { &m.attributes }, - |m: &mut SelectedListContent| { &mut m.attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "checksum", - |m: &SelectedListContent| { &m.checksum }, - |m: &mut SelectedListContent| { &mut m.checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "contents", - |m: &SelectedListContent| { &m.contents }, - |m: &mut SelectedListContent| { &mut m.contents }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "diff", - |m: &SelectedListContent| { &m.diff }, - |m: &mut SelectedListContent| { &mut m.diff }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "syncResult", - |m: &SelectedListContent| { &m.syncResult }, - |m: &mut SelectedListContent| { &mut m.syncResult }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "resultingRevisions", - |m: &SelectedListContent| { &m.resultingRevisions }, - |m: &mut SelectedListContent| { &mut m.resultingRevisions }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4meta::ListAttributes, + >, + >( + "attributes", + |m: &SelectedListContent| &m.attributes, + |m: &mut SelectedListContent| &mut m.attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "checksum", + |m: &SelectedListContent| &m.checksum, + |m: &mut SelectedListContent| &mut m.checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "contents", + |m: &SelectedListContent| &m.contents, + |m: &mut SelectedListContent| &mut m.contents, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "diff", + |m: &SelectedListContent| &m.diff, + |m: &mut SelectedListContent| &mut m.diff, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "syncResult", + |m: &SelectedListContent| &m.syncResult, + |m: &mut SelectedListContent| &mut m.syncResult, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "resultingRevisions", + |m: &SelectedListContent| &m.resultingRevisions, + |m: &mut SelectedListContent| &mut m.resultingRevisions, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "multipleHeads", - |m: &SelectedListContent| { &m.multipleHeads }, - |m: &mut SelectedListContent| { &mut m.multipleHeads }, + |m: &SelectedListContent| &m.multipleHeads, + |m: &mut SelectedListContent| &mut m.multipleHeads, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "upToDate", - |m: &SelectedListContent| { &m.upToDate }, - |m: &mut SelectedListContent| { &mut m.upToDate }, + |m: &SelectedListContent| &m.upToDate, + |m: &mut SelectedListContent| &mut m.upToDate, )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "resolveAction", - |m: &SelectedListContent| { &m.resolveAction }, - |m: &mut SelectedListContent| { &mut m.resolveAction }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "issues", - |m: &SelectedListContent| { &m.issues }, - |m: &mut SelectedListContent| { &mut m.issues }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4issues::ClientResolveAction, + >, + >( + "resolveAction", + |m: &SelectedListContent| &m.resolveAction, + |m: &mut SelectedListContent| &mut m.resolveAction, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "issues", + |m: &SelectedListContent| &m.issues, + |m: &mut SelectedListContent| &mut m.issues, + ), + ); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "nonces", - |m: &SelectedListContent| { &m.nonces }, - |m: &mut SelectedListContent| { &mut m.nonces }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "owner_username", - |m: &SelectedListContent| { &m.owner_username }, - |m: &mut SelectedListContent| { &mut m.owner_username }, + |m: &SelectedListContent| &m.nonces, + |m: &mut SelectedListContent| &mut m.nonces, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "owner_username", + |m: &SelectedListContent| &m.owner_username, + |m: &mut SelectedListContent| &mut m.owner_username, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "SelectedListContent", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static SelectedListContent { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(SelectedListContent::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(SelectedListContent::new) } } } @@ -3543,16 +3957,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20\x01(\tB\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/playlist4content.rs b/protocol/src/playlist4content.rs index 58b5bea3..5d672442 100644 --- a/protocol/src/playlist4content.rs +++ b/protocol/src/playlist4content.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Item { // message fields uri: ::protobuf::SingularField<::std::string::String>, @@ -49,7 +49,6 @@ impl Item { // optional string uri = 1; - pub fn get_uri(&self) -> &str { match self.uri.as_ref() { Some(v) => &v, @@ -80,14 +79,17 @@ impl Item { // Take field pub fn take_uri(&mut self) -> ::std::string::String { - self.uri.take().unwrap_or_else(|| ::std::string::String::new()) + self.uri + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .ItemAttributes attributes = 2; - pub fn get_attributes(&self) -> &super::playlist4meta::ItemAttributes { - self.attributes.as_ref().unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance()) + self.attributes + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance()) } pub fn clear_attributes(&mut self) { self.attributes.clear(); @@ -113,7 +115,9 @@ impl Item { // Take field pub fn take_attributes(&mut self) -> super::playlist4meta::ItemAttributes { - self.attributes.take().unwrap_or_else(|| super::playlist4meta::ItemAttributes::new()) + self.attributes + .take() + .unwrap_or_else(|| super::playlist4meta::ItemAttributes::new()) } } @@ -123,23 +127,35 @@ impl ::protobuf::Message for Item { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?; - }, + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.attributes, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -161,7 +177,10 @@ impl ::protobuf::Message for Item { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.uri.as_ref() { os.write_string(1, &v)?; } @@ -205,24 +224,33 @@ impl ::protobuf::Message for Item { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "uri", - |m: &Item| { &m.uri }, - |m: &mut Item| { &mut m.uri }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "attributes", - |m: &Item| { &m.attributes }, - |m: &mut Item| { &mut m.attributes }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >("uri", |m: &Item| &m.uri, |m: &mut Item| &mut m.uri), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4meta::ItemAttributes, + >, + >( + "attributes", + |m: &Item| &m.attributes, + |m: &mut Item| &mut m.attributes, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Item", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -230,9 +258,7 @@ impl ::protobuf::Message for Item { fn default_instance() -> &'static Item { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Item::new) - } + unsafe { instance.get(Item::new) } } } @@ -256,7 +282,7 @@ impl ::protobuf::reflect::ProtobufValue for Item { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListItems { // message fields pos: ::std::option::Option, @@ -280,7 +306,6 @@ impl ListItems { // optional int32 pos = 1; - pub fn get_pos(&self) -> i32 { self.pos.unwrap_or(0) } @@ -299,7 +324,6 @@ impl ListItems { // optional bool truncated = 2; - pub fn get_truncated(&self) -> bool { self.truncated.unwrap_or(false) } @@ -318,7 +342,6 @@ impl ListItems { // repeated .Item items = 3; - pub fn get_items(&self) -> &[Item] { &self.items } @@ -348,34 +371,46 @@ impl ::protobuf::Message for ListItems { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.pos = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.truncated = ::std::option::Option::Some(tmp); - }, + } 3 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -394,13 +429,16 @@ impl ::protobuf::Message for ListItems { for value in &self.items { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.pos { os.write_int32(1, v)?; } @@ -411,7 +449,7 @@ impl ::protobuf::Message for ListItems { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -447,29 +485,41 @@ impl ::protobuf::Message for ListItems { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "pos", - |m: &ListItems| { &m.pos }, - |m: &mut ListItems| { &mut m.pos }, + |m: &ListItems| &m.pos, + |m: &mut ListItems| &mut m.pos, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "truncated", - |m: &ListItems| { &m.truncated }, - |m: &mut ListItems| { &mut m.truncated }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "items", - |m: &ListItems| { &m.items }, - |m: &mut ListItems| { &mut m.items }, + |m: &ListItems| &m.truncated, + |m: &mut ListItems| &mut m.truncated, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "items", + |m: &ListItems| &m.items, + |m: &mut ListItems| &mut m.items, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListItems", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -477,9 +527,7 @@ impl ::protobuf::Message for ListItems { fn default_instance() -> &'static ListItems { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListItems::new) - } + unsafe { instance.get(ListItems::new) } } } @@ -504,7 +552,7 @@ impl ::protobuf::reflect::ProtobufValue for ListItems { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ContentRange { // message fields pos: ::std::option::Option, @@ -527,7 +575,6 @@ impl ContentRange { // optional int32 pos = 1; - pub fn get_pos(&self) -> i32 { self.pos.unwrap_or(0) } @@ -546,7 +593,6 @@ impl ContentRange { // optional int32 length = 2; - pub fn get_length(&self) -> i32 { self.length.unwrap_or(0) } @@ -569,27 +615,39 @@ impl ::protobuf::Message for ContentRange { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.pos = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.length = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -610,7 +668,10 @@ impl ::protobuf::Message for ContentRange { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.pos { os.write_int32(1, v)?; } @@ -652,24 +713,31 @@ impl ::protobuf::Message for ContentRange { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "pos", - |m: &ContentRange| { &m.pos }, - |m: &mut ContentRange| { &mut m.pos }, + |m: &ContentRange| &m.pos, + |m: &mut ContentRange| &mut m.pos, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "length", - |m: &ContentRange| { &m.length }, - |m: &mut ContentRange| { &mut m.length }, + |m: &ContentRange| &m.length, + |m: &mut ContentRange| &mut m.length, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ContentRange", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -677,9 +745,7 @@ impl ::protobuf::Message for ContentRange { fn default_instance() -> &'static ContentRange { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ContentRange::new) - } + unsafe { instance.get(ContentRange::new) } } } @@ -703,7 +769,7 @@ impl ::protobuf::reflect::ProtobufValue for ContentRange { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListContentSelection { // message fields wantRevision: ::std::option::Option, @@ -737,7 +803,6 @@ impl ListContentSelection { // optional bool wantRevision = 1; - pub fn get_wantRevision(&self) -> bool { self.wantRevision.unwrap_or(false) } @@ -756,7 +821,6 @@ impl ListContentSelection { // optional bool wantLength = 2; - pub fn get_wantLength(&self) -> bool { self.wantLength.unwrap_or(false) } @@ -775,7 +839,6 @@ impl ListContentSelection { // optional bool wantAttributes = 3; - pub fn get_wantAttributes(&self) -> bool { self.wantAttributes.unwrap_or(false) } @@ -794,7 +857,6 @@ impl ListContentSelection { // optional bool wantChecksum = 4; - pub fn get_wantChecksum(&self) -> bool { self.wantChecksum.unwrap_or(false) } @@ -813,7 +875,6 @@ impl ListContentSelection { // optional bool wantContent = 5; - pub fn get_wantContent(&self) -> bool { self.wantContent.unwrap_or(false) } @@ -832,9 +893,10 @@ impl ListContentSelection { // optional .ContentRange contentRange = 6; - pub fn get_contentRange(&self) -> &ContentRange { - self.contentRange.as_ref().unwrap_or_else(|| ContentRange::default_instance()) + self.contentRange + .as_ref() + .unwrap_or_else(|| ContentRange::default_instance()) } pub fn clear_contentRange(&mut self) { self.contentRange.clear(); @@ -860,12 +922,13 @@ impl ListContentSelection { // Take field pub fn take_contentRange(&mut self) -> ContentRange { - self.contentRange.take().unwrap_or_else(|| ContentRange::new()) + self.contentRange + .take() + .unwrap_or_else(|| ContentRange::new()) } // optional bool wantDiff = 7; - pub fn get_wantDiff(&self) -> bool { self.wantDiff.unwrap_or(false) } @@ -884,7 +947,6 @@ impl ListContentSelection { // optional bytes baseRevision = 8; - pub fn get_baseRevision(&self) -> &[u8] { match self.baseRevision.as_ref() { Some(v) => &v, @@ -915,12 +977,13 @@ impl ListContentSelection { // Take field pub fn take_baseRevision(&mut self) -> ::std::vec::Vec { - self.baseRevision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.baseRevision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bytes hintRevision = 9; - pub fn get_hintRevision(&self) -> &[u8] { match self.hintRevision.as_ref() { Some(v) => &v, @@ -951,12 +1014,13 @@ impl ListContentSelection { // Take field pub fn take_hintRevision(&mut self) -> ::std::vec::Vec { - self.hintRevision.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.hintRevision + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bool wantNothingIfUpToDate = 10; - pub fn get_wantNothingIfUpToDate(&self) -> bool { self.wantNothingIfUpToDate.unwrap_or(false) } @@ -975,7 +1039,6 @@ impl ListContentSelection { // optional bool wantResolveAction = 12; - pub fn get_wantResolveAction(&self) -> bool { self.wantResolveAction.unwrap_or(false) } @@ -994,7 +1057,6 @@ impl ListContentSelection { // repeated .ClientIssue issues = 13; - pub fn get_issues(&self) -> &[super::playlist4issues::ClientIssue] { &self.issues } @@ -1003,23 +1065,29 @@ impl ListContentSelection { } // Param is passed by value, moved - pub fn set_issues(&mut self, v: ::protobuf::RepeatedField) { + pub fn set_issues( + &mut self, + v: ::protobuf::RepeatedField, + ) { self.issues = v; } // Mutable pointer to the field. - pub fn mut_issues(&mut self) -> &mut ::protobuf::RepeatedField { + pub fn mut_issues( + &mut self, + ) -> &mut ::protobuf::RepeatedField { &mut self.issues } // Take field - pub fn take_issues(&mut self) -> ::protobuf::RepeatedField { + pub fn take_issues( + &mut self, + ) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.issues, ::protobuf::RepeatedField::new()) } // repeated .ClientResolveAction resolveAction = 14; - pub fn get_resolveAction(&self) -> &[super::playlist4issues::ClientResolveAction] { &self.resolveAction } @@ -1028,17 +1096,24 @@ impl ListContentSelection { } // Param is passed by value, moved - pub fn set_resolveAction(&mut self, v: ::protobuf::RepeatedField) { + pub fn set_resolveAction( + &mut self, + v: ::protobuf::RepeatedField, + ) { self.resolveAction = v; } // Mutable pointer to the field. - pub fn mut_resolveAction(&mut self) -> &mut ::protobuf::RepeatedField { + pub fn mut_resolveAction( + &mut self, + ) -> &mut ::protobuf::RepeatedField { &mut self.resolveAction } // Take field - pub fn take_resolveAction(&mut self) -> ::protobuf::RepeatedField { + pub fn take_resolveAction( + &mut self, + ) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.resolveAction, ::protobuf::RepeatedField::new()) } } @@ -1049,98 +1124,138 @@ impl ::protobuf::Message for ListContentSelection { if !v.is_initialized() { return false; } - }; + } for v in &self.issues { if !v.is_initialized() { return false; } - }; + } for v in &self.resolveAction { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantRevision = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantLength = ::std::option::Option::Some(tmp); - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantAttributes = ::std::option::Option::Some(tmp); - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantChecksum = ::std::option::Option::Some(tmp); - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantContent = ::std::option::Option::Some(tmp); - }, + } 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.contentRange)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.contentRange, + )?; + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantDiff = ::std::option::Option::Some(tmp); - }, + } 8 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.baseRevision)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.baseRevision, + )?; + } 9 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hintRevision)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.hintRevision, + )?; + } 10 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantNothingIfUpToDate = ::std::option::Option::Some(tmp); - }, + } 12 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.wantResolveAction = ::std::option::Option::Some(tmp); - }, + } 13 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.issues)?; - }, + } 14 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.resolveAction)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.resolveAction, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1187,17 +1302,20 @@ impl ::protobuf::Message for ListContentSelection { for value in &self.issues { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } for value in &self.resolveAction { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.wantRevision { os.write_bool(1, v)?; } @@ -1237,12 +1355,12 @@ impl ::protobuf::Message for ListContentSelection { os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } for v in &self.resolveAction { os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1278,89 +1396,140 @@ impl ::protobuf::Message for ListContentSelection { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantRevision", - |m: &ListContentSelection| { &m.wantRevision }, - |m: &mut ListContentSelection| { &mut m.wantRevision }, + |m: &ListContentSelection| &m.wantRevision, + |m: &mut ListContentSelection| &mut m.wantRevision, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantLength", - |m: &ListContentSelection| { &m.wantLength }, - |m: &mut ListContentSelection| { &mut m.wantLength }, + |m: &ListContentSelection| &m.wantLength, + |m: &mut ListContentSelection| &mut m.wantLength, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantAttributes", - |m: &ListContentSelection| { &m.wantAttributes }, - |m: &mut ListContentSelection| { &mut m.wantAttributes }, + |m: &ListContentSelection| &m.wantAttributes, + |m: &mut ListContentSelection| &mut m.wantAttributes, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantChecksum", - |m: &ListContentSelection| { &m.wantChecksum }, - |m: &mut ListContentSelection| { &mut m.wantChecksum }, + |m: &ListContentSelection| &m.wantChecksum, + |m: &mut ListContentSelection| &mut m.wantChecksum, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantContent", - |m: &ListContentSelection| { &m.wantContent }, - |m: &mut ListContentSelection| { &mut m.wantContent }, + |m: &ListContentSelection| &m.wantContent, + |m: &mut ListContentSelection| &mut m.wantContent, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "contentRange", - |m: &ListContentSelection| { &m.contentRange }, - |m: &mut ListContentSelection| { &mut m.contentRange }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "contentRange", + |m: &ListContentSelection| &m.contentRange, + |m: &mut ListContentSelection| &mut m.contentRange, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantDiff", - |m: &ListContentSelection| { &m.wantDiff }, - |m: &mut ListContentSelection| { &mut m.wantDiff }, + |m: &ListContentSelection| &m.wantDiff, + |m: &mut ListContentSelection| &mut m.wantDiff, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "baseRevision", - |m: &ListContentSelection| { &m.baseRevision }, - |m: &mut ListContentSelection| { &mut m.baseRevision }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "hintRevision", - |m: &ListContentSelection| { &m.hintRevision }, - |m: &mut ListContentSelection| { &mut m.hintRevision }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "baseRevision", + |m: &ListContentSelection| &m.baseRevision, + |m: &mut ListContentSelection| &mut m.baseRevision, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "hintRevision", + |m: &ListContentSelection| &m.hintRevision, + |m: &mut ListContentSelection| &mut m.hintRevision, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantNothingIfUpToDate", - |m: &ListContentSelection| { &m.wantNothingIfUpToDate }, - |m: &mut ListContentSelection| { &mut m.wantNothingIfUpToDate }, + |m: &ListContentSelection| &m.wantNothingIfUpToDate, + |m: &mut ListContentSelection| &mut m.wantNothingIfUpToDate, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "wantResolveAction", - |m: &ListContentSelection| { &m.wantResolveAction }, - |m: &mut ListContentSelection| { &mut m.wantResolveAction }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "issues", - |m: &ListContentSelection| { &m.issues }, - |m: &mut ListContentSelection| { &mut m.issues }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "resolveAction", - |m: &ListContentSelection| { &m.resolveAction }, - |m: &mut ListContentSelection| { &mut m.resolveAction }, + |m: &ListContentSelection| &m.wantResolveAction, + |m: &mut ListContentSelection| &mut m.wantResolveAction, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "issues", + |m: &ListContentSelection| &m.issues, + |m: &mut ListContentSelection| &mut m.issues, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4issues::ClientResolveAction, + >, + >( + "resolveAction", + |m: &ListContentSelection| &m.resolveAction, + |m: &mut ListContentSelection| &mut m.resolveAction, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListContentSelection", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ListContentSelection { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListContentSelection::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ListContentSelection::new) } } } @@ -1415,16 +1584,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ ionB\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/playlist4issues.rs b/protocol/src/playlist4issues.rs index 3448f5c5..c9091f26 100644 --- a/protocol/src/playlist4issues.rs +++ b/protocol/src/playlist4issues.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientIssue { // message fields level: ::std::option::Option, @@ -50,7 +50,6 @@ impl ClientIssue { // optional .ClientIssue.Level level = 1; - pub fn get_level(&self) -> ClientIssue_Level { self.level.unwrap_or(ClientIssue_Level::LEVEL_UNKNOWN) } @@ -69,7 +68,6 @@ impl ClientIssue { // optional .ClientIssue.Code code = 2; - pub fn get_code(&self) -> ClientIssue_Code { self.code.unwrap_or(ClientIssue_Code::CODE_UNKNOWN) } @@ -88,7 +86,6 @@ impl ClientIssue { // optional int32 repeatCount = 3; - pub fn get_repeatCount(&self) -> i32 { self.repeatCount.unwrap_or(0) } @@ -111,26 +108,44 @@ impl ::protobuf::Message for ClientIssue { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.level, 1, &mut self.unknown_fields)? - }, - 2 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 2, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.level, + 1, + &mut self.unknown_fields, + )?, + 2 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.code, + 2, + &mut self.unknown_fields, + )?, 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.repeatCount = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -154,7 +169,10 @@ impl ::protobuf::Message for ClientIssue { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.level { os.write_enum(1, v.value())?; } @@ -199,29 +217,39 @@ impl ::protobuf::Message for ClientIssue { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "level", - |m: &ClientIssue| { &m.level }, - |m: &mut ClientIssue| { &mut m.level }, + |m: &ClientIssue| &m.level, + |m: &mut ClientIssue| &mut m.level, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "code", - |m: &ClientIssue| { &m.code }, - |m: &mut ClientIssue| { &mut m.code }, + |m: &ClientIssue| &m.code, + |m: &mut ClientIssue| &mut m.code, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "repeatCount", - |m: &ClientIssue| { &m.repeatCount }, - |m: &mut ClientIssue| { &mut m.repeatCount }, + |m: &ClientIssue| &m.repeatCount, + |m: &mut ClientIssue| &mut m.repeatCount, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientIssue", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -229,9 +257,7 @@ impl ::protobuf::Message for ClientIssue { fn default_instance() -> &'static ClientIssue { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientIssue::new) - } + unsafe { instance.get(ClientIssue::new) } } } @@ -256,7 +282,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientIssue { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ClientIssue_Level { LEVEL_UNKNOWN = 0, LEVEL_DEBUG = 1, @@ -279,7 +305,7 @@ impl ::protobuf::ProtobufEnum for ClientIssue_Level { 3 => ::std::option::Option::Some(ClientIssue_Level::LEVEL_NOTICE), 4 => ::std::option::Option::Some(ClientIssue_Level::LEVEL_WARNING), 5 => ::std::option::Option::Some(ClientIssue_Level::LEVEL_ERROR), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -296,17 +322,20 @@ impl ::protobuf::ProtobufEnum for ClientIssue_Level { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ClientIssue.Level", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ClientIssue.Level", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ClientIssue_Level { -} +impl ::std::marker::Copy for ClientIssue_Level {} impl ::std::default::Default for ClientIssue_Level { fn default() -> Self { @@ -320,7 +349,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientIssue_Level { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ClientIssue_Code { CODE_UNKNOWN = 0, CODE_INDEX_OUT_OF_BOUNDS = 1, @@ -343,7 +372,7 @@ impl ::protobuf::ProtobufEnum for ClientIssue_Code { 3 => ::std::option::Option::Some(ClientIssue_Code::CODE_CACHED_CHANGE), 4 => ::std::option::Option::Some(ClientIssue_Code::CODE_OFFLINE_CHANGE), 5 => ::std::option::Option::Some(ClientIssue_Code::CODE_CONCURRENT_CHANGE), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -360,17 +389,20 @@ impl ::protobuf::ProtobufEnum for ClientIssue_Code { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ClientIssue.Code", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ClientIssue.Code", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ClientIssue_Code { -} +impl ::std::marker::Copy for ClientIssue_Code {} impl ::std::default::Default for ClientIssue_Code { fn default() -> Self { @@ -384,7 +416,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientIssue_Code { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ClientResolveAction { // message fields code: ::std::option::Option, @@ -407,7 +439,6 @@ impl ClientResolveAction { // optional .ClientResolveAction.Code code = 1; - pub fn get_code(&self) -> ClientResolveAction_Code { self.code.unwrap_or(ClientResolveAction_Code::CODE_UNKNOWN) } @@ -426,9 +457,9 @@ impl ClientResolveAction { // optional .ClientResolveAction.Initiator initiator = 2; - pub fn get_initiator(&self) -> ClientResolveAction_Initiator { - self.initiator.unwrap_or(ClientResolveAction_Initiator::INITIATOR_UNKNOWN) + self.initiator + .unwrap_or(ClientResolveAction_Initiator::INITIATOR_UNKNOWN) } pub fn clear_initiator(&mut self) { self.initiator = ::std::option::Option::None; @@ -449,19 +480,35 @@ impl ::protobuf::Message for ClientResolveAction { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 1, &mut self.unknown_fields)? - }, - 2 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.initiator, 2, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.code, + 1, + &mut self.unknown_fields, + )?, + 2 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.initiator, + 2, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -482,7 +529,10 @@ impl ::protobuf::Message for ClientResolveAction { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.code { os.write_enum(1, v.value())?; } @@ -524,34 +574,40 @@ impl ::protobuf::Message for ClientResolveAction { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "code", - |m: &ClientResolveAction| { &m.code }, - |m: &mut ClientResolveAction| { &mut m.code }, + |m: &ClientResolveAction| &m.code, + |m: &mut ClientResolveAction| &mut m.code, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "initiator", - |m: &ClientResolveAction| { &m.initiator }, - |m: &mut ClientResolveAction| { &mut m.initiator }, + |m: &ClientResolveAction| &m.initiator, + |m: &mut ClientResolveAction| &mut m.initiator, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ClientResolveAction", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ClientResolveAction { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ClientResolveAction::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ClientResolveAction::new) } } } @@ -575,7 +631,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientResolveAction { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ClientResolveAction_Code { CODE_UNKNOWN = 0, CODE_NO_ACTION = 1, @@ -600,7 +656,7 @@ impl ::protobuf::ProtobufEnum for ClientResolveAction_Code { 4 => ::std::option::Option::Some(ClientResolveAction_Code::CODE_DISCARD_LOCAL_CHANGES), 5 => ::std::option::Option::Some(ClientResolveAction_Code::CODE_SEND_DUMP), 6 => ::std::option::Option::Some(ClientResolveAction_Code::CODE_DISPLAY_ERROR_MESSAGE), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -618,17 +674,20 @@ impl ::protobuf::ProtobufEnum for ClientResolveAction_Code { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ClientResolveAction.Code", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ClientResolveAction.Code", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ClientResolveAction_Code { -} +impl ::std::marker::Copy for ClientResolveAction_Code {} impl ::std::default::Default for ClientResolveAction_Code { fn default() -> Self { @@ -642,7 +701,7 @@ impl ::protobuf::reflect::ProtobufValue for ClientResolveAction_Code { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ClientResolveAction_Initiator { INITIATOR_UNKNOWN = 0, INITIATOR_SERVER = 1, @@ -659,7 +718,7 @@ impl ::protobuf::ProtobufEnum for ClientResolveAction_Initiator { 0 => ::std::option::Option::Some(ClientResolveAction_Initiator::INITIATOR_UNKNOWN), 1 => ::std::option::Option::Some(ClientResolveAction_Initiator::INITIATOR_SERVER), 2 => ::std::option::Option::Some(ClientResolveAction_Initiator::INITIATOR_CLIENT), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -673,17 +732,20 @@ impl ::protobuf::ProtobufEnum for ClientResolveAction_Initiator { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ClientResolveAction.Initiator", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "ClientResolveAction.Initiator", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ClientResolveAction_Initiator { -} +impl ::std::marker::Copy for ClientResolveAction_Initiator {} impl ::std::default::Default for ClientResolveAction_Initiator { fn default() -> Self { @@ -719,16 +781,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x10\x01\x12\x14\n\x10INITIATOR_CLIENT\x10\x02\x1a\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/playlist4meta.rs b/protocol/src/playlist4meta.rs index f3a0b661..4364e33d 100644 --- a/protocol/src/playlist4meta.rs +++ b/protocol/src/playlist4meta.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListChecksum { // message fields version: ::std::option::Option, @@ -49,7 +49,6 @@ impl ListChecksum { // optional int32 version = 1; - pub fn get_version(&self) -> i32 { self.version.unwrap_or(0) } @@ -68,7 +67,6 @@ impl ListChecksum { // optional bytes sha1 = 4; - pub fn get_sha1(&self) -> &[u8] { match self.sha1.as_ref() { Some(v) => &v, @@ -108,23 +106,33 @@ impl ::protobuf::Message for ListChecksum { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.version = ::std::option::Option::Some(tmp); - }, + } 4 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.sha1)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -145,7 +153,10 @@ impl ::protobuf::Message for ListChecksum { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.version { os.write_int32(1, v)?; } @@ -187,24 +198,33 @@ impl ::protobuf::Message for ListChecksum { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "version", - |m: &ListChecksum| { &m.version }, - |m: &mut ListChecksum| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "sha1", - |m: &ListChecksum| { &m.sha1 }, - |m: &mut ListChecksum| { &mut m.sha1 }, + |m: &ListChecksum| &m.version, + |m: &mut ListChecksum| &mut m.version, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "sha1", + |m: &ListChecksum| &m.sha1, + |m: &mut ListChecksum| &mut m.sha1, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListChecksum", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -212,9 +232,7 @@ impl ::protobuf::Message for ListChecksum { fn default_instance() -> &'static ListChecksum { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListChecksum::new) - } + unsafe { instance.get(ListChecksum::new) } } } @@ -238,7 +256,7 @@ impl ::protobuf::reflect::ProtobufValue for ListChecksum { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct DownloadFormat { // message fields codec: ::std::option::Option, @@ -260,7 +278,6 @@ impl DownloadFormat { // optional .DownloadFormat.Codec codec = 1; - pub fn get_codec(&self) -> DownloadFormat_Codec { self.codec.unwrap_or(DownloadFormat_Codec::CODEC_UNKNOWN) } @@ -283,16 +300,28 @@ impl ::protobuf::Message for DownloadFormat { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.codec, 1, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.codec, + 1, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -310,7 +339,10 @@ impl ::protobuf::Message for DownloadFormat { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.codec { os.write_enum(1, v.value())?; } @@ -349,19 +381,23 @@ impl ::protobuf::Message for DownloadFormat { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "codec", - |m: &DownloadFormat| { &m.codec }, - |m: &mut DownloadFormat| { &mut m.codec }, + |m: &DownloadFormat| &m.codec, + |m: &mut DownloadFormat| &mut m.codec, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "DownloadFormat", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -369,9 +405,7 @@ impl ::protobuf::Message for DownloadFormat { fn default_instance() -> &'static DownloadFormat { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(DownloadFormat::new) - } + unsafe { instance.get(DownloadFormat::new) } } } @@ -394,7 +428,7 @@ impl ::protobuf::reflect::ProtobufValue for DownloadFormat { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum DownloadFormat_Codec { CODEC_UNKNOWN = 0, OGG_VORBIS = 1, @@ -413,7 +447,7 @@ impl ::protobuf::ProtobufEnum for DownloadFormat_Codec { 1 => ::std::option::Option::Some(DownloadFormat_Codec::OGG_VORBIS), 2 => ::std::option::Option::Some(DownloadFormat_Codec::FLAC), 3 => ::std::option::Option::Some(DownloadFormat_Codec::MPEG_1_LAYER_3), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -428,17 +462,20 @@ impl ::protobuf::ProtobufEnum for DownloadFormat_Codec { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("DownloadFormat.Codec", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "DownloadFormat.Codec", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for DownloadFormat_Codec { -} +impl ::std::marker::Copy for DownloadFormat_Codec {} impl ::std::default::Default for DownloadFormat_Codec { fn default() -> Self { @@ -452,7 +489,7 @@ impl ::protobuf::reflect::ProtobufValue for DownloadFormat_Codec { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListAttributes { // message fields name: ::protobuf::SingularField<::std::string::String>, @@ -483,7 +520,6 @@ impl ListAttributes { // optional string name = 1; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -514,12 +550,13 @@ impl ListAttributes { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string description = 2; - pub fn get_description(&self) -> &str { match self.description.as_ref() { Some(v) => &v, @@ -550,12 +587,13 @@ impl ListAttributes { // Take field pub fn take_description(&mut self) -> ::std::string::String { - self.description.take().unwrap_or_else(|| ::std::string::String::new()) + self.description + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bytes picture = 3; - pub fn get_picture(&self) -> &[u8] { match self.picture.as_ref() { Some(v) => &v, @@ -586,12 +624,13 @@ impl ListAttributes { // Take field pub fn take_picture(&mut self) -> ::std::vec::Vec { - self.picture.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.picture + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bool collaborative = 4; - pub fn get_collaborative(&self) -> bool { self.collaborative.unwrap_or(false) } @@ -610,7 +649,6 @@ impl ListAttributes { // optional string pl3_version = 5; - pub fn get_pl3_version(&self) -> &str { match self.pl3_version.as_ref() { Some(v) => &v, @@ -641,12 +679,13 @@ impl ListAttributes { // Take field pub fn take_pl3_version(&mut self) -> ::std::string::String { - self.pl3_version.take().unwrap_or_else(|| ::std::string::String::new()) + self.pl3_version + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool deleted_by_owner = 6; - pub fn get_deleted_by_owner(&self) -> bool { self.deleted_by_owner.unwrap_or(false) } @@ -665,7 +704,6 @@ impl ListAttributes { // optional bool restricted_collaborative = 7; - pub fn get_restricted_collaborative(&self) -> bool { self.restricted_collaborative.unwrap_or(false) } @@ -684,7 +722,6 @@ impl ListAttributes { // optional int64 deprecated_client_id = 8; - pub fn get_deprecated_client_id(&self) -> i64 { self.deprecated_client_id.unwrap_or(0) } @@ -703,7 +740,6 @@ impl ListAttributes { // optional bool public_starred = 9; - pub fn get_public_starred(&self) -> bool { self.public_starred.unwrap_or(false) } @@ -722,7 +758,6 @@ impl ListAttributes { // optional string client_id = 10; - pub fn get_client_id(&self) -> &str { match self.client_id.as_ref() { Some(v) => &v, @@ -753,7 +788,9 @@ impl ListAttributes { // Take field pub fn take_client_id(&mut self) -> ::std::string::String { - self.client_id.take().unwrap_or_else(|| ::std::string::String::new()) + self.client_id + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -762,63 +799,89 @@ impl ::protobuf::Message for ListAttributes { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 2 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.description)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.description, + )?; + } 3 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.picture)?; - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.collaborative = ::std::option::Option::Some(tmp); - }, + } 5 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.pl3_version)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.pl3_version, + )?; + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.deleted_by_owner = ::std::option::Option::Some(tmp); - }, + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.restricted_collaborative = ::std::option::Option::Some(tmp); - }, + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.deprecated_client_id = ::std::option::Option::Some(tmp); - }, + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.public_starred = ::std::option::Option::Some(tmp); - }, + } 10 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.client_id)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -863,7 +926,10 @@ impl ::protobuf::Message for ListAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.name.as_ref() { os.write_string(1, &v)?; } @@ -929,64 +995,105 @@ impl ::protobuf::Message for ListAttributes { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &ListAttributes| { &m.name }, - |m: &mut ListAttributes| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &ListAttributes| { &m.description }, - |m: &mut ListAttributes| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "picture", - |m: &ListAttributes| { &m.picture }, - |m: &mut ListAttributes| { &mut m.picture }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "name", + |m: &ListAttributes| &m.name, + |m: &mut ListAttributes| &mut m.name, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "description", + |m: &ListAttributes| &m.description, + |m: &mut ListAttributes| &mut m.description, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "picture", + |m: &ListAttributes| &m.picture, + |m: &mut ListAttributes| &mut m.picture, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "collaborative", - |m: &ListAttributes| { &m.collaborative }, - |m: &mut ListAttributes| { &mut m.collaborative }, + |m: &ListAttributes| &m.collaborative, + |m: &mut ListAttributes| &mut m.collaborative, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "pl3_version", - |m: &ListAttributes| { &m.pl3_version }, - |m: &mut ListAttributes| { &mut m.pl3_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "pl3_version", + |m: &ListAttributes| &m.pl3_version, + |m: &mut ListAttributes| &mut m.pl3_version, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "deleted_by_owner", - |m: &ListAttributes| { &m.deleted_by_owner }, - |m: &mut ListAttributes| { &mut m.deleted_by_owner }, + |m: &ListAttributes| &m.deleted_by_owner, + |m: &mut ListAttributes| &mut m.deleted_by_owner, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "restricted_collaborative", - |m: &ListAttributes| { &m.restricted_collaborative }, - |m: &mut ListAttributes| { &mut m.restricted_collaborative }, + |m: &ListAttributes| &m.restricted_collaborative, + |m: &mut ListAttributes| &mut m.restricted_collaborative, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "deprecated_client_id", - |m: &ListAttributes| { &m.deprecated_client_id }, - |m: &mut ListAttributes| { &mut m.deprecated_client_id }, + |m: &ListAttributes| &m.deprecated_client_id, + |m: &mut ListAttributes| &mut m.deprecated_client_id, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "public_starred", - |m: &ListAttributes| { &m.public_starred }, - |m: &mut ListAttributes| { &mut m.public_starred }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "client_id", - |m: &ListAttributes| { &m.client_id }, - |m: &mut ListAttributes| { &mut m.client_id }, + |m: &ListAttributes| &m.public_starred, + |m: &mut ListAttributes| &mut m.public_starred, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "client_id", + |m: &ListAttributes| &m.client_id, + |m: &mut ListAttributes| &mut m.client_id, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListAttributes", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -994,9 +1101,7 @@ impl ::protobuf::Message for ListAttributes { fn default_instance() -> &'static ListAttributes { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListAttributes::new) - } + unsafe { instance.get(ListAttributes::new) } } } @@ -1028,7 +1133,7 @@ impl ::protobuf::reflect::ProtobufValue for ListAttributes { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ItemAttributes { // message fields added_by: ::protobuf::SingularField<::std::string::String>, @@ -1059,7 +1164,6 @@ impl ItemAttributes { // optional string added_by = 1; - pub fn get_added_by(&self) -> &str { match self.added_by.as_ref() { Some(v) => &v, @@ -1090,12 +1194,13 @@ impl ItemAttributes { // Take field pub fn take_added_by(&mut self) -> ::std::string::String { - self.added_by.take().unwrap_or_else(|| ::std::string::String::new()) + self.added_by + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional int64 timestamp = 2; - pub fn get_timestamp(&self) -> i64 { self.timestamp.unwrap_or(0) } @@ -1114,7 +1219,6 @@ impl ItemAttributes { // optional string message = 3; - pub fn get_message(&self) -> &str { match self.message.as_ref() { Some(v) => &v, @@ -1145,12 +1249,13 @@ impl ItemAttributes { // Take field pub fn take_message(&mut self) -> ::std::string::String { - self.message.take().unwrap_or_else(|| ::std::string::String::new()) + self.message + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool seen = 4; - pub fn get_seen(&self) -> bool { self.seen.unwrap_or(false) } @@ -1169,7 +1274,6 @@ impl ItemAttributes { // optional int64 download_count = 5; - pub fn get_download_count(&self) -> i64 { self.download_count.unwrap_or(0) } @@ -1188,9 +1292,10 @@ impl ItemAttributes { // optional .DownloadFormat download_format = 6; - pub fn get_download_format(&self) -> &DownloadFormat { - self.download_format.as_ref().unwrap_or_else(|| DownloadFormat::default_instance()) + self.download_format + .as_ref() + .unwrap_or_else(|| DownloadFormat::default_instance()) } pub fn clear_download_format(&mut self) { self.download_format.clear(); @@ -1216,12 +1321,13 @@ impl ItemAttributes { // Take field pub fn take_download_format(&mut self) -> DownloadFormat { - self.download_format.take().unwrap_or_else(|| DownloadFormat::new()) + self.download_format + .take() + .unwrap_or_else(|| DownloadFormat::new()) } // optional string sevendigital_id = 7; - pub fn get_sevendigital_id(&self) -> &str { match self.sevendigital_id.as_ref() { Some(v) => &v, @@ -1252,12 +1358,13 @@ impl ItemAttributes { // Take field pub fn take_sevendigital_id(&mut self) -> ::std::string::String { - self.sevendigital_id.take().unwrap_or_else(|| ::std::string::String::new()) + self.sevendigital_id + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional int64 sevendigital_left = 8; - pub fn get_sevendigital_left(&self) -> i64 { self.sevendigital_left.unwrap_or(0) } @@ -1276,7 +1383,6 @@ impl ItemAttributes { // optional int64 seen_at = 9; - pub fn get_seen_at(&self) -> i64 { self.seen_at.unwrap_or(0) } @@ -1295,7 +1401,6 @@ impl ItemAttributes { // optional bool public = 10; - pub fn get_public(&self) -> bool { self.public.unwrap_or(false) } @@ -1319,71 +1424,99 @@ impl ::protobuf::Message for ItemAttributes { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.added_by)?; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.timestamp = ::std::option::Option::Some(tmp); - }, + } 3 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.message)?; - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.seen = ::std::option::Option::Some(tmp); - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.download_count = ::std::option::Option::Some(tmp); - }, + } 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.download_format)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.download_format, + )?; + } 7 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.sevendigital_id)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.sevendigital_id, + )?; + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.sevendigital_left = ::std::option::Option::Some(tmp); - }, + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.seen_at = ::std::option::Option::Some(tmp); - }, + } 10 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.public = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1429,7 +1562,10 @@ impl ::protobuf::Message for ItemAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.added_by.as_ref() { os.write_string(1, &v)?; } @@ -1497,64 +1633,103 @@ impl ::protobuf::Message for ItemAttributes { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "added_by", - |m: &ItemAttributes| { &m.added_by }, - |m: &mut ItemAttributes| { &mut m.added_by }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "added_by", + |m: &ItemAttributes| &m.added_by, + |m: &mut ItemAttributes| &mut m.added_by, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "timestamp", - |m: &ItemAttributes| { &m.timestamp }, - |m: &mut ItemAttributes| { &mut m.timestamp }, + |m: &ItemAttributes| &m.timestamp, + |m: &mut ItemAttributes| &mut m.timestamp, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "message", - |m: &ItemAttributes| { &m.message }, - |m: &mut ItemAttributes| { &mut m.message }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "message", + |m: &ItemAttributes| &m.message, + |m: &mut ItemAttributes| &mut m.message, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "seen", - |m: &ItemAttributes| { &m.seen }, - |m: &mut ItemAttributes| { &mut m.seen }, + |m: &ItemAttributes| &m.seen, + |m: &mut ItemAttributes| &mut m.seen, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "download_count", - |m: &ItemAttributes| { &m.download_count }, - |m: &mut ItemAttributes| { &mut m.download_count }, + |m: &ItemAttributes| &m.download_count, + |m: &mut ItemAttributes| &mut m.download_count, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "download_format", - |m: &ItemAttributes| { &m.download_format }, - |m: &mut ItemAttributes| { &mut m.download_format }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "sevendigital_id", - |m: &ItemAttributes| { &m.sevendigital_id }, - |m: &mut ItemAttributes| { &mut m.sevendigital_id }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "download_format", + |m: &ItemAttributes| &m.download_format, + |m: &mut ItemAttributes| &mut m.download_format, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "sevendigital_id", + |m: &ItemAttributes| &m.sevendigital_id, + |m: &mut ItemAttributes| &mut m.sevendigital_id, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "sevendigital_left", - |m: &ItemAttributes| { &m.sevendigital_left }, - |m: &mut ItemAttributes| { &mut m.sevendigital_left }, + |m: &ItemAttributes| &m.sevendigital_left, + |m: &mut ItemAttributes| &mut m.sevendigital_left, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "seen_at", - |m: &ItemAttributes| { &m.seen_at }, - |m: &mut ItemAttributes| { &mut m.seen_at }, + |m: &ItemAttributes| &m.seen_at, + |m: &mut ItemAttributes| &mut m.seen_at, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "public", - |m: &ItemAttributes| { &m.public }, - |m: &mut ItemAttributes| { &mut m.public }, + |m: &ItemAttributes| &m.public, + |m: &mut ItemAttributes| &mut m.public, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ItemAttributes", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1562,9 +1737,7 @@ impl ::protobuf::Message for ItemAttributes { fn default_instance() -> &'static ItemAttributes { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ItemAttributes::new) - } + unsafe { instance.get(ItemAttributes::new) } } } @@ -1596,7 +1769,7 @@ impl ::protobuf::reflect::ProtobufValue for ItemAttributes { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct StringAttribute { // message fields key: ::protobuf::SingularField<::std::string::String>, @@ -1619,7 +1792,6 @@ impl StringAttribute { // optional string key = 1; - pub fn get_key(&self) -> &str { match self.key.as_ref() { Some(v) => &v, @@ -1650,12 +1822,13 @@ impl StringAttribute { // Take field pub fn take_key(&mut self) -> ::std::string::String { - self.key.take().unwrap_or_else(|| ::std::string::String::new()) + self.key + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string value = 2; - pub fn get_value(&self) -> &str { match self.value.as_ref() { Some(v) => &v, @@ -1686,7 +1859,9 @@ impl StringAttribute { // Take field pub fn take_value(&mut self) -> ::std::string::String { - self.value.take().unwrap_or_else(|| ::std::string::String::new()) + self.value + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -1695,19 +1870,27 @@ impl ::protobuf::Message for StringAttribute { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.value)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1728,7 +1911,10 @@ impl ::protobuf::Message for StringAttribute { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.key.as_ref() { os.write_string(1, &v)?; } @@ -1770,24 +1956,35 @@ impl ::protobuf::Message for StringAttribute { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "key", - |m: &StringAttribute| { &m.key }, - |m: &mut StringAttribute| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &StringAttribute| { &m.value }, - |m: &mut StringAttribute| { &mut m.value }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "key", + |m: &StringAttribute| &m.key, + |m: &mut StringAttribute| &mut m.key, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "value", + |m: &StringAttribute| &m.value, + |m: &mut StringAttribute| &mut m.value, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "StringAttribute", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1795,9 +1992,7 @@ impl ::protobuf::Message for StringAttribute { fn default_instance() -> &'static StringAttribute { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(StringAttribute::new) - } + unsafe { instance.get(StringAttribute::new) } } } @@ -1821,7 +2016,7 @@ impl ::protobuf::reflect::ProtobufValue for StringAttribute { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct StringAttributes { // message fields attribute: ::protobuf::RepeatedField, @@ -1843,7 +2038,6 @@ impl StringAttributes { // repeated .StringAttribute attribute = 1; - pub fn get_attribute(&self) -> &[StringAttribute] { &self.attribute } @@ -1873,20 +2067,28 @@ impl ::protobuf::Message for StringAttributes { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attribute)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1899,18 +2101,21 @@ impl ::protobuf::Message for StringAttributes { for value in &self.attribute { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.attribute { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1946,29 +2151,34 @@ impl ::protobuf::Message for StringAttributes { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "attribute", - |m: &StringAttributes| { &m.attribute }, - |m: &mut StringAttributes| { &mut m.attribute }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "attribute", + |m: &StringAttributes| &m.attribute, + |m: &mut StringAttributes| &mut m.attribute, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "StringAttributes", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static StringAttributes { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(StringAttributes::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(StringAttributes::new) } } } @@ -2017,16 +2227,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ tribute\x18\x01\x20\x03(\x0b2\x10.StringAttributeB\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/playlist4ops.rs b/protocol/src/playlist4ops.rs index b16fe5d3..b72f2bde 100644 --- a/protocol/src/playlist4ops.rs +++ b/protocol/src/playlist4ops.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Add { // message fields fromIndex: ::std::option::Option, @@ -52,7 +52,6 @@ impl Add { // optional int32 fromIndex = 1; - pub fn get_fromIndex(&self) -> i32 { self.fromIndex.unwrap_or(0) } @@ -71,7 +70,6 @@ impl Add { // repeated .Item items = 2; - pub fn get_items(&self) -> &[super::playlist4content::Item] { &self.items } @@ -96,9 +94,10 @@ impl Add { // optional .ListChecksum list_checksum = 3; - pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.list_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.list_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_list_checksum(&mut self) { self.list_checksum.clear(); @@ -124,12 +123,13 @@ impl Add { // Take field pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.list_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.list_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional bool addLast = 4; - pub fn get_addLast(&self) -> bool { self.addLast.unwrap_or(false) } @@ -148,7 +148,6 @@ impl Add { // optional bool addFirst = 5; - pub fn get_addFirst(&self) -> bool { self.addFirst.unwrap_or(false) } @@ -172,49 +171,67 @@ impl ::protobuf::Message for Add { if !v.is_initialized() { return false; } - }; + } for v in &self.list_checksum { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.fromIndex = ::std::option::Option::Some(tmp); - }, + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?; - }, + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.list_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.list_checksum, + )?; + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.addLast = ::std::option::Option::Some(tmp); - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.addFirst = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -230,7 +247,7 @@ impl ::protobuf::Message for Add { for value in &self.items { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.list_checksum.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -246,7 +263,10 @@ impl ::protobuf::Message for Add { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.fromIndex { os.write_int32(1, v)?; } @@ -254,7 +274,7 @@ impl ::protobuf::Message for Add { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.list_checksum.as_ref() { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -301,39 +321,55 @@ impl ::protobuf::Message for Add { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "fromIndex", - |m: &Add| { &m.fromIndex }, - |m: &mut Add| { &mut m.fromIndex }, + |m: &Add| &m.fromIndex, + |m: &mut Add| &mut m.fromIndex, )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "items", - |m: &Add| { &m.items }, - |m: &mut Add| { &mut m.items }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "list_checksum", - |m: &Add| { &m.list_checksum }, - |m: &mut Add| { &mut m.list_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("items", |m: &Add| &m.items, |m: &mut Add| &mut m.items), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "list_checksum", + |m: &Add| &m.list_checksum, + |m: &mut Add| &mut m.list_checksum, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "addLast", - |m: &Add| { &m.addLast }, - |m: &mut Add| { &mut m.addLast }, + |m: &Add| &m.addLast, + |m: &mut Add| &mut m.addLast, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "addFirst", - |m: &Add| { &m.addFirst }, - |m: &mut Add| { &mut m.addFirst }, + |m: &Add| &m.addFirst, + |m: &mut Add| &mut m.addFirst, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Add", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -341,9 +377,7 @@ impl ::protobuf::Message for Add { fn default_instance() -> &'static Add { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Add::new) - } + unsafe { instance.get(Add::new) } } } @@ -370,7 +404,7 @@ impl ::protobuf::reflect::ProtobufValue for Add { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Rem { // message fields fromIndex: ::std::option::Option, @@ -398,7 +432,6 @@ impl Rem { // optional int32 fromIndex = 1; - pub fn get_fromIndex(&self) -> i32 { self.fromIndex.unwrap_or(0) } @@ -417,7 +450,6 @@ impl Rem { // optional int32 length = 2; - pub fn get_length(&self) -> i32 { self.length.unwrap_or(0) } @@ -436,7 +468,6 @@ impl Rem { // repeated .Item items = 3; - pub fn get_items(&self) -> &[super::playlist4content::Item] { &self.items } @@ -461,9 +492,10 @@ impl Rem { // optional .ListChecksum list_checksum = 4; - pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.list_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.list_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_list_checksum(&mut self) { self.list_checksum.clear(); @@ -489,14 +521,17 @@ impl Rem { // Take field pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.list_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.list_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListChecksum items_checksum = 5; - pub fn get_items_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.items_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.items_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_items_checksum(&mut self) { self.items_checksum.clear(); @@ -522,14 +557,17 @@ impl Rem { // Take field pub fn take_items_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.items_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.items_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListChecksum uris_checksum = 6; - pub fn get_uris_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.uris_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.uris_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_uris_checksum(&mut self) { self.uris_checksum.clear(); @@ -555,12 +593,13 @@ impl Rem { // Take field pub fn take_uris_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.uris_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.uris_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional bool itemsAsKey = 7; - pub fn get_itemsAsKey(&self) -> bool { self.itemsAsKey.unwrap_or(false) } @@ -584,65 +623,91 @@ impl ::protobuf::Message for Rem { if !v.is_initialized() { return false; } - }; + } for v in &self.list_checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.items_checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.uris_checksum { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.fromIndex = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.length = ::std::option::Option::Some(tmp); - }, + } 3 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?; - }, + } 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.list_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.list_checksum, + )?; + } 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.items_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.items_checksum, + )?; + } 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.uris_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.uris_checksum, + )?; + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.itemsAsKey = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -661,7 +726,7 @@ impl ::protobuf::Message for Rem { for value in &self.items { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.list_checksum.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -682,7 +747,10 @@ impl ::protobuf::Message for Rem { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.fromIndex { os.write_int32(1, v)?; } @@ -693,7 +761,7 @@ impl ::protobuf::Message for Rem { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.list_checksum.as_ref() { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -747,49 +815,73 @@ impl ::protobuf::Message for Rem { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "fromIndex", - |m: &Rem| { &m.fromIndex }, - |m: &mut Rem| { &mut m.fromIndex }, + |m: &Rem| &m.fromIndex, + |m: &mut Rem| &mut m.fromIndex, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "length", - |m: &Rem| { &m.length }, - |m: &mut Rem| { &mut m.length }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( + "length", |m: &Rem| &m.length, |m: &mut Rem| &mut m.length )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "items", - |m: &Rem| { &m.items }, - |m: &mut Rem| { &mut m.items }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "list_checksum", - |m: &Rem| { &m.list_checksum }, - |m: &mut Rem| { &mut m.list_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "items_checksum", - |m: &Rem| { &m.items_checksum }, - |m: &mut Rem| { &mut m.items_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "uris_checksum", - |m: &Rem| { &m.uris_checksum }, - |m: &mut Rem| { &mut m.uris_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("items", |m: &Rem| &m.items, |m: &mut Rem| &mut m.items), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "list_checksum", + |m: &Rem| &m.list_checksum, + |m: &mut Rem| &mut m.list_checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "items_checksum", + |m: &Rem| &m.items_checksum, + |m: &mut Rem| &mut m.items_checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "uris_checksum", + |m: &Rem| &m.uris_checksum, + |m: &mut Rem| &mut m.uris_checksum, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "itemsAsKey", - |m: &Rem| { &m.itemsAsKey }, - |m: &mut Rem| { &mut m.itemsAsKey }, + |m: &Rem| &m.itemsAsKey, + |m: &mut Rem| &mut m.itemsAsKey, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Rem", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -797,9 +889,7 @@ impl ::protobuf::Message for Rem { fn default_instance() -> &'static Rem { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Rem::new) - } + unsafe { instance.get(Rem::new) } } } @@ -828,7 +918,7 @@ impl ::protobuf::reflect::ProtobufValue for Rem { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Mov { // message fields fromIndex: ::std::option::Option, @@ -855,7 +945,6 @@ impl Mov { // optional int32 fromIndex = 1; - pub fn get_fromIndex(&self) -> i32 { self.fromIndex.unwrap_or(0) } @@ -874,7 +963,6 @@ impl Mov { // optional int32 length = 2; - pub fn get_length(&self) -> i32 { self.length.unwrap_or(0) } @@ -893,7 +981,6 @@ impl Mov { // optional int32 toIndex = 3; - pub fn get_toIndex(&self) -> i32 { self.toIndex.unwrap_or(0) } @@ -912,9 +999,10 @@ impl Mov { // optional .ListChecksum list_checksum = 4; - pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.list_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.list_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_list_checksum(&mut self) { self.list_checksum.clear(); @@ -940,14 +1028,17 @@ impl Mov { // Take field pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.list_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.list_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListChecksum items_checksum = 5; - pub fn get_items_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.items_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.items_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_items_checksum(&mut self) { self.items_checksum.clear(); @@ -973,14 +1064,17 @@ impl Mov { // Take field pub fn take_items_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.items_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.items_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListChecksum uris_checksum = 6; - pub fn get_uris_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.uris_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.uris_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_uris_checksum(&mut self) { self.uris_checksum.clear(); @@ -1006,7 +1100,9 @@ impl Mov { // Take field pub fn take_uris_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.uris_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.uris_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } } @@ -1016,57 +1112,83 @@ impl ::protobuf::Message for Mov { if !v.is_initialized() { return false; } - }; + } for v in &self.items_checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.uris_checksum { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.fromIndex = ::std::option::Option::Some(tmp); - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.length = ::std::option::Option::Some(tmp); - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.toIndex = ::std::option::Option::Some(tmp); - }, + } 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.list_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.list_checksum, + )?; + } 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.items_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.items_checksum, + )?; + } 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.uris_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.uris_checksum, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1102,7 +1224,10 @@ impl ::protobuf::Message for Mov { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.fromIndex { os.write_int32(1, v)?; } @@ -1162,44 +1287,67 @@ impl ::protobuf::Message for Mov { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "fromIndex", - |m: &Mov| { &m.fromIndex }, - |m: &mut Mov| { &mut m.fromIndex }, + |m: &Mov| &m.fromIndex, + |m: &mut Mov| &mut m.fromIndex, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "length", - |m: &Mov| { &m.length }, - |m: &mut Mov| { &mut m.length }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( + "length", |m: &Mov| &m.length, |m: &mut Mov| &mut m.length )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "toIndex", - |m: &Mov| { &m.toIndex }, - |m: &mut Mov| { &mut m.toIndex }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "list_checksum", - |m: &Mov| { &m.list_checksum }, - |m: &mut Mov| { &mut m.list_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "items_checksum", - |m: &Mov| { &m.items_checksum }, - |m: &mut Mov| { &mut m.items_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "uris_checksum", - |m: &Mov| { &m.uris_checksum }, - |m: &mut Mov| { &mut m.uris_checksum }, + |m: &Mov| &m.toIndex, + |m: &mut Mov| &mut m.toIndex, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "list_checksum", + |m: &Mov| &m.list_checksum, + |m: &mut Mov| &mut m.list_checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "items_checksum", + |m: &Mov| &m.items_checksum, + |m: &mut Mov| &mut m.items_checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "uris_checksum", + |m: &Mov| &m.uris_checksum, + |m: &mut Mov| &mut m.uris_checksum, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Mov", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1207,9 +1355,7 @@ impl ::protobuf::Message for Mov { fn default_instance() -> &'static Mov { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Mov::new) - } + unsafe { instance.get(Mov::new) } } } @@ -1237,7 +1383,7 @@ impl ::protobuf::reflect::ProtobufValue for Mov { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ItemAttributesPartialState { // message fields values: ::protobuf::SingularPtrField, @@ -1260,9 +1406,10 @@ impl ItemAttributesPartialState { // optional .ItemAttributes values = 1; - pub fn get_values(&self) -> &super::playlist4meta::ItemAttributes { - self.values.as_ref().unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance()) + self.values + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance()) } pub fn clear_values(&mut self) { self.values.clear(); @@ -1288,12 +1435,13 @@ impl ItemAttributesPartialState { // Take field pub fn take_values(&mut self) -> super::playlist4meta::ItemAttributes { - self.values.take().unwrap_or_else(|| super::playlist4meta::ItemAttributes::new()) + self.values + .take() + .unwrap_or_else(|| super::playlist4meta::ItemAttributes::new()) } // repeated .ItemAttributesPartialState.ItemAttributeKind no_value = 2; - pub fn get_no_value(&self) -> &[ItemAttributesPartialState_ItemAttributeKind] { &self.no_value } @@ -1302,17 +1450,24 @@ impl ItemAttributesPartialState { } // Param is passed by value, moved - pub fn set_no_value(&mut self, v: ::std::vec::Vec) { + pub fn set_no_value( + &mut self, + v: ::std::vec::Vec, + ) { self.no_value = v; } // Mutable pointer to the field. - pub fn mut_no_value(&mut self) -> &mut ::std::vec::Vec { + pub fn mut_no_value( + &mut self, + ) -> &mut ::std::vec::Vec { &mut self.no_value } // Take field - pub fn take_no_value(&mut self) -> ::std::vec::Vec { + pub fn take_no_value( + &mut self, + ) -> ::std::vec::Vec { ::std::mem::replace(&mut self.no_value, ::std::vec::Vec::new()) } } @@ -1323,23 +1478,35 @@ impl ::protobuf::Message for ItemAttributesPartialState { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.values)?; - }, - 2 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.no_value, 2, &mut self.unknown_fields)? - }, + } + 2 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.no_value, + 2, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1355,13 +1522,16 @@ impl ::protobuf::Message for ItemAttributesPartialState { } for value in &self.no_value { my_size += ::protobuf::rt::enum_size(2, *value); - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.values.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1369,7 +1539,7 @@ impl ::protobuf::Message for ItemAttributesPartialState { } for v in &self.no_value { os.write_enum(2, v.value())?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1405,34 +1575,46 @@ impl ::protobuf::Message for ItemAttributesPartialState { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "values", - |m: &ItemAttributesPartialState| { &m.values }, - |m: &mut ItemAttributesPartialState| { &mut m.values }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4meta::ItemAttributes, + >, + >( + "values", + |m: &ItemAttributesPartialState| &m.values, + |m: &mut ItemAttributesPartialState| &mut m.values, + ), + ); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum< + ItemAttributesPartialState_ItemAttributeKind, + >, + >( "no_value", - |m: &ItemAttributesPartialState| { &m.no_value }, - |m: &mut ItemAttributesPartialState| { &mut m.no_value }, + |m: &ItemAttributesPartialState| &m.no_value, + |m: &mut ItemAttributesPartialState| &mut m.no_value, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ItemAttributesPartialState", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ItemAttributesPartialState { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ItemAttributesPartialState::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ItemAttributesPartialState::new) } } } @@ -1456,7 +1638,7 @@ impl ::protobuf::reflect::ProtobufValue for ItemAttributesPartialState { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ItemAttributesPartialState_ItemAttributeKind { ITEM_UNKNOWN = 0, ITEM_ADDED_BY = 1, @@ -1478,18 +1660,40 @@ impl ::protobuf::ProtobufEnum for ItemAttributesPartialState_ItemAttributeKind { fn from_i32(value: i32) -> ::std::option::Option { match value { - 0 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_UNKNOWN), - 1 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_ADDED_BY), - 2 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_TIMESTAMP), - 3 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_MESSAGE), - 4 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN), - 5 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_COUNT), - 6 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_FORMAT), - 7 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_ID), - 8 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_LEFT), - 9 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN_AT), - 10 => ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_PUBLIC), - _ => ::std::option::Option::None + 0 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_UNKNOWN, + ), + 1 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_ADDED_BY, + ), + 2 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_TIMESTAMP, + ), + 3 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_MESSAGE, + ), + 4 => { + ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN) + } + 5 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_COUNT, + ), + 6 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_FORMAT, + ), + 7 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_ID, + ), + 8 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_LEFT, + ), + 9 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN_AT, + ), + 10 => ::std::option::Option::Some( + ItemAttributesPartialState_ItemAttributeKind::ITEM_PUBLIC, + ), + _ => ::std::option::Option::None, } } @@ -1511,17 +1715,22 @@ impl ::protobuf::ProtobufEnum for ItemAttributesPartialState_ItemAttributeKind { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ItemAttributesPartialState.ItemAttributeKind", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::< + ItemAttributesPartialState_ItemAttributeKind, + >( + "ItemAttributesPartialState.ItemAttributeKind", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ItemAttributesPartialState_ItemAttributeKind { -} +impl ::std::marker::Copy for ItemAttributesPartialState_ItemAttributeKind {} impl ::std::default::Default for ItemAttributesPartialState_ItemAttributeKind { fn default() -> Self { @@ -1535,7 +1744,7 @@ impl ::protobuf::reflect::ProtobufValue for ItemAttributesPartialState_ItemAttri } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ListAttributesPartialState { // message fields values: ::protobuf::SingularPtrField, @@ -1558,9 +1767,10 @@ impl ListAttributesPartialState { // optional .ListAttributes values = 1; - pub fn get_values(&self) -> &super::playlist4meta::ListAttributes { - self.values.as_ref().unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance()) + self.values + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance()) } pub fn clear_values(&mut self) { self.values.clear(); @@ -1586,12 +1796,13 @@ impl ListAttributesPartialState { // Take field pub fn take_values(&mut self) -> super::playlist4meta::ListAttributes { - self.values.take().unwrap_or_else(|| super::playlist4meta::ListAttributes::new()) + self.values + .take() + .unwrap_or_else(|| super::playlist4meta::ListAttributes::new()) } // repeated .ListAttributesPartialState.ListAttributeKind no_value = 2; - pub fn get_no_value(&self) -> &[ListAttributesPartialState_ListAttributeKind] { &self.no_value } @@ -1600,17 +1811,24 @@ impl ListAttributesPartialState { } // Param is passed by value, moved - pub fn set_no_value(&mut self, v: ::std::vec::Vec) { + pub fn set_no_value( + &mut self, + v: ::std::vec::Vec, + ) { self.no_value = v; } // Mutable pointer to the field. - pub fn mut_no_value(&mut self) -> &mut ::std::vec::Vec { + pub fn mut_no_value( + &mut self, + ) -> &mut ::std::vec::Vec { &mut self.no_value } // Take field - pub fn take_no_value(&mut self) -> ::std::vec::Vec { + pub fn take_no_value( + &mut self, + ) -> ::std::vec::Vec { ::std::mem::replace(&mut self.no_value, ::std::vec::Vec::new()) } } @@ -1621,23 +1839,35 @@ impl ::protobuf::Message for ListAttributesPartialState { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.values)?; - }, - 2 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.no_value, 2, &mut self.unknown_fields)? - }, + } + 2 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.no_value, + 2, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1653,13 +1883,16 @@ impl ::protobuf::Message for ListAttributesPartialState { } for value in &self.no_value { my_size += ::protobuf::rt::enum_size(2, *value); - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.values.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1667,7 +1900,7 @@ impl ::protobuf::Message for ListAttributesPartialState { } for v in &self.no_value { os.write_enum(2, v.value())?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1703,34 +1936,46 @@ impl ::protobuf::Message for ListAttributesPartialState { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "values", - |m: &ListAttributesPartialState| { &m.values }, - |m: &mut ListAttributesPartialState| { &mut m.values }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage< + super::playlist4meta::ListAttributes, + >, + >( + "values", + |m: &ListAttributesPartialState| &m.values, + |m: &mut ListAttributesPartialState| &mut m.values, + ), + ); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum< + ListAttributesPartialState_ListAttributeKind, + >, + >( "no_value", - |m: &ListAttributesPartialState| { &m.no_value }, - |m: &mut ListAttributesPartialState| { &mut m.no_value }, + |m: &ListAttributesPartialState| &m.no_value, + |m: &mut ListAttributesPartialState| &mut m.no_value, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "ListAttributesPartialState", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static ListAttributesPartialState { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ListAttributesPartialState::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(ListAttributesPartialState::new) } } } @@ -1754,7 +1999,7 @@ impl ::protobuf::reflect::ProtobufValue for ListAttributesPartialState { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum ListAttributesPartialState_ListAttributeKind { LIST_UNKNOWN = 0, LIST_NAME = 1, @@ -1773,15 +2018,31 @@ impl ::protobuf::ProtobufEnum for ListAttributesPartialState_ListAttributeKind { fn from_i32(value: i32) -> ::std::option::Option { match value { - 0 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_UNKNOWN), - 1 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_NAME), - 2 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_DESCRIPTION), - 3 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_PICTURE), - 4 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_COLLABORATIVE), - 5 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_PL3_VERSION), - 6 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_DELETED_BY_OWNER), - 7 => ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_RESTRICTED_COLLABORATIVE), - _ => ::std::option::Option::None + 0 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_UNKNOWN, + ), + 1 => { + ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_NAME) + } + 2 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_DESCRIPTION, + ), + 3 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_PICTURE, + ), + 4 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_COLLABORATIVE, + ), + 5 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_PL3_VERSION, + ), + 6 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_DELETED_BY_OWNER, + ), + 7 => ::std::option::Option::Some( + ListAttributesPartialState_ListAttributeKind::LIST_RESTRICTED_COLLABORATIVE, + ), + _ => ::std::option::Option::None, } } @@ -1800,17 +2061,22 @@ impl ::protobuf::ProtobufEnum for ListAttributesPartialState_ListAttributeKind { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ListAttributesPartialState.ListAttributeKind", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::< + ListAttributesPartialState_ListAttributeKind, + >( + "ListAttributesPartialState.ListAttributeKind", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for ListAttributesPartialState_ListAttributeKind { -} +impl ::std::marker::Copy for ListAttributesPartialState_ListAttributeKind {} impl ::std::default::Default for ListAttributesPartialState_ListAttributeKind { fn default() -> Self { @@ -1824,7 +2090,7 @@ impl ::protobuf::reflect::ProtobufValue for ListAttributesPartialState_ListAttri } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct UpdateItemAttributes { // message fields index: ::std::option::Option, @@ -1850,7 +2116,6 @@ impl UpdateItemAttributes { // optional int32 index = 1; - pub fn get_index(&self) -> i32 { self.index.unwrap_or(0) } @@ -1869,9 +2134,10 @@ impl UpdateItemAttributes { // optional .ItemAttributesPartialState new_attributes = 2; - pub fn get_new_attributes(&self) -> &ItemAttributesPartialState { - self.new_attributes.as_ref().unwrap_or_else(|| ItemAttributesPartialState::default_instance()) + self.new_attributes + .as_ref() + .unwrap_or_else(|| ItemAttributesPartialState::default_instance()) } pub fn clear_new_attributes(&mut self) { self.new_attributes.clear(); @@ -1897,14 +2163,17 @@ impl UpdateItemAttributes { // Take field pub fn take_new_attributes(&mut self) -> ItemAttributesPartialState { - self.new_attributes.take().unwrap_or_else(|| ItemAttributesPartialState::new()) + self.new_attributes + .take() + .unwrap_or_else(|| ItemAttributesPartialState::new()) } // optional .ItemAttributesPartialState old_attributes = 3; - pub fn get_old_attributes(&self) -> &ItemAttributesPartialState { - self.old_attributes.as_ref().unwrap_or_else(|| ItemAttributesPartialState::default_instance()) + self.old_attributes + .as_ref() + .unwrap_or_else(|| ItemAttributesPartialState::default_instance()) } pub fn clear_old_attributes(&mut self) { self.old_attributes.clear(); @@ -1930,14 +2199,17 @@ impl UpdateItemAttributes { // Take field pub fn take_old_attributes(&mut self) -> ItemAttributesPartialState { - self.old_attributes.take().unwrap_or_else(|| ItemAttributesPartialState::new()) + self.old_attributes + .take() + .unwrap_or_else(|| ItemAttributesPartialState::new()) } // optional .ListChecksum list_checksum = 4; - pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.list_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.list_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_list_checksum(&mut self) { self.list_checksum.clear(); @@ -1963,14 +2235,17 @@ impl UpdateItemAttributes { // Take field pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.list_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.list_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListChecksum old_attributes_checksum = 5; - pub fn get_old_attributes_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.old_attributes_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.old_attributes_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_old_attributes_checksum(&mut self) { self.old_attributes_checksum.clear(); @@ -1996,7 +2271,9 @@ impl UpdateItemAttributes { // Take field pub fn take_old_attributes_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.old_attributes_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.old_attributes_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } } @@ -2006,51 +2283,77 @@ impl ::protobuf::Message for UpdateItemAttributes { if !v.is_initialized() { return false; } - }; + } for v in &self.old_attributes { if !v.is_initialized() { return false; } - }; + } for v in &self.list_checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.old_attributes_checksum { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.index = ::std::option::Option::Some(tmp); - }, + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.new_attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.new_attributes, + )?; + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.old_attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.old_attributes, + )?; + } 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.list_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.list_checksum, + )?; + } 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.old_attributes_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.old_attributes_checksum, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2084,7 +2387,10 @@ impl ::protobuf::Message for UpdateItemAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.index { os.write_int32(1, v)?; } @@ -2143,49 +2449,72 @@ impl ::protobuf::Message for UpdateItemAttributes { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "index", - |m: &UpdateItemAttributes| { &m.index }, - |m: &mut UpdateItemAttributes| { &mut m.index }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "new_attributes", - |m: &UpdateItemAttributes| { &m.new_attributes }, - |m: &mut UpdateItemAttributes| { &mut m.new_attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "old_attributes", - |m: &UpdateItemAttributes| { &m.old_attributes }, - |m: &mut UpdateItemAttributes| { &mut m.old_attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "list_checksum", - |m: &UpdateItemAttributes| { &m.list_checksum }, - |m: &mut UpdateItemAttributes| { &mut m.list_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "old_attributes_checksum", - |m: &UpdateItemAttributes| { &m.old_attributes_checksum }, - |m: &mut UpdateItemAttributes| { &mut m.old_attributes_checksum }, + |m: &UpdateItemAttributes| &m.index, + |m: &mut UpdateItemAttributes| &mut m.index, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "new_attributes", + |m: &UpdateItemAttributes| &m.new_attributes, + |m: &mut UpdateItemAttributes| &mut m.new_attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "old_attributes", + |m: &UpdateItemAttributes| &m.old_attributes, + |m: &mut UpdateItemAttributes| &mut m.old_attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "list_checksum", + |m: &UpdateItemAttributes| &m.list_checksum, + |m: &mut UpdateItemAttributes| &mut m.list_checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "old_attributes_checksum", + |m: &UpdateItemAttributes| &m.old_attributes_checksum, + |m: &mut UpdateItemAttributes| &mut m.old_attributes_checksum, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "UpdateItemAttributes", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static UpdateItemAttributes { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(UpdateItemAttributes::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(UpdateItemAttributes::new) } } } @@ -2212,7 +2541,7 @@ impl ::protobuf::reflect::ProtobufValue for UpdateItemAttributes { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct UpdateListAttributes { // message fields new_attributes: ::protobuf::SingularPtrField, @@ -2237,9 +2566,10 @@ impl UpdateListAttributes { // optional .ListAttributesPartialState new_attributes = 1; - pub fn get_new_attributes(&self) -> &ListAttributesPartialState { - self.new_attributes.as_ref().unwrap_or_else(|| ListAttributesPartialState::default_instance()) + self.new_attributes + .as_ref() + .unwrap_or_else(|| ListAttributesPartialState::default_instance()) } pub fn clear_new_attributes(&mut self) { self.new_attributes.clear(); @@ -2265,14 +2595,17 @@ impl UpdateListAttributes { // Take field pub fn take_new_attributes(&mut self) -> ListAttributesPartialState { - self.new_attributes.take().unwrap_or_else(|| ListAttributesPartialState::new()) + self.new_attributes + .take() + .unwrap_or_else(|| ListAttributesPartialState::new()) } // optional .ListAttributesPartialState old_attributes = 2; - pub fn get_old_attributes(&self) -> &ListAttributesPartialState { - self.old_attributes.as_ref().unwrap_or_else(|| ListAttributesPartialState::default_instance()) + self.old_attributes + .as_ref() + .unwrap_or_else(|| ListAttributesPartialState::default_instance()) } pub fn clear_old_attributes(&mut self) { self.old_attributes.clear(); @@ -2298,14 +2631,17 @@ impl UpdateListAttributes { // Take field pub fn take_old_attributes(&mut self) -> ListAttributesPartialState { - self.old_attributes.take().unwrap_or_else(|| ListAttributesPartialState::new()) + self.old_attributes + .take() + .unwrap_or_else(|| ListAttributesPartialState::new()) } // optional .ListChecksum list_checksum = 3; - pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.list_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.list_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_list_checksum(&mut self) { self.list_checksum.clear(); @@ -2331,14 +2667,17 @@ impl UpdateListAttributes { // Take field pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.list_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.list_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } // optional .ListChecksum old_attributes_checksum = 4; - pub fn get_old_attributes_checksum(&self) -> &super::playlist4meta::ListChecksum { - self.old_attributes_checksum.as_ref().unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) + self.old_attributes_checksum + .as_ref() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance()) } pub fn clear_old_attributes_checksum(&mut self) { self.old_attributes_checksum.clear(); @@ -2364,7 +2703,9 @@ impl UpdateListAttributes { // Take field pub fn take_old_attributes_checksum(&mut self) -> super::playlist4meta::ListChecksum { - self.old_attributes_checksum.take().unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) + self.old_attributes_checksum + .take() + .unwrap_or_else(|| super::playlist4meta::ListChecksum::new()) } } @@ -2374,44 +2715,68 @@ impl ::protobuf::Message for UpdateListAttributes { if !v.is_initialized() { return false; } - }; + } for v in &self.old_attributes { if !v.is_initialized() { return false; } - }; + } for v in &self.list_checksum { if !v.is_initialized() { return false; } - }; + } for v in &self.old_attributes_checksum { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.new_attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.new_attributes, + )?; + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.old_attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.old_attributes, + )?; + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.list_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.list_checksum, + )?; + } 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.old_attributes_checksum)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.old_attributes_checksum, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2442,7 +2807,10 @@ impl ::protobuf::Message for UpdateListAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.new_attributes.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2498,44 +2866,64 @@ impl ::protobuf::Message for UpdateListAttributes { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "new_attributes", - |m: &UpdateListAttributes| { &m.new_attributes }, - |m: &mut UpdateListAttributes| { &mut m.new_attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "old_attributes", - |m: &UpdateListAttributes| { &m.old_attributes }, - |m: &mut UpdateListAttributes| { &mut m.old_attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "list_checksum", - |m: &UpdateListAttributes| { &m.list_checksum }, - |m: &mut UpdateListAttributes| { &mut m.list_checksum }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "old_attributes_checksum", - |m: &UpdateListAttributes| { &m.old_attributes_checksum }, - |m: &mut UpdateListAttributes| { &mut m.old_attributes_checksum }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "new_attributes", + |m: &UpdateListAttributes| &m.new_attributes, + |m: &mut UpdateListAttributes| &mut m.new_attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "old_attributes", + |m: &UpdateListAttributes| &m.old_attributes, + |m: &mut UpdateListAttributes| &mut m.old_attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "list_checksum", + |m: &UpdateListAttributes| &m.list_checksum, + |m: &mut UpdateListAttributes| &mut m.list_checksum, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "old_attributes_checksum", + |m: &UpdateListAttributes| &m.old_attributes_checksum, + |m: &mut UpdateListAttributes| &mut m.old_attributes_checksum, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "UpdateListAttributes", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } } fn default_instance() -> &'static UpdateListAttributes { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(UpdateListAttributes::new) - } + static mut instance: ::protobuf::lazy::Lazy = + ::protobuf::lazy::Lazy::INIT; + unsafe { instance.get(UpdateListAttributes::new) } } } @@ -2561,7 +2949,7 @@ impl ::protobuf::reflect::ProtobufValue for UpdateListAttributes { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Op { // message fields kind: ::std::option::Option, @@ -2588,7 +2976,6 @@ impl Op { // optional .Op.Kind kind = 1; - pub fn get_kind(&self) -> Op_Kind { self.kind.unwrap_or(Op_Kind::KIND_UNKNOWN) } @@ -2607,7 +2994,6 @@ impl Op { // optional .Add add = 2; - pub fn get_add(&self) -> &Add { self.add.as_ref().unwrap_or_else(|| Add::default_instance()) } @@ -2640,7 +3026,6 @@ impl Op { // optional .Rem rem = 3; - pub fn get_rem(&self) -> &Rem { self.rem.as_ref().unwrap_or_else(|| Rem::default_instance()) } @@ -2673,7 +3058,6 @@ impl Op { // optional .Mov mov = 4; - pub fn get_mov(&self) -> &Mov { self.mov.as_ref().unwrap_or_else(|| Mov::default_instance()) } @@ -2706,9 +3090,10 @@ impl Op { // optional .UpdateItemAttributes update_item_attributes = 5; - pub fn get_update_item_attributes(&self) -> &UpdateItemAttributes { - self.update_item_attributes.as_ref().unwrap_or_else(|| UpdateItemAttributes::default_instance()) + self.update_item_attributes + .as_ref() + .unwrap_or_else(|| UpdateItemAttributes::default_instance()) } pub fn clear_update_item_attributes(&mut self) { self.update_item_attributes.clear(); @@ -2734,14 +3119,17 @@ impl Op { // Take field pub fn take_update_item_attributes(&mut self) -> UpdateItemAttributes { - self.update_item_attributes.take().unwrap_or_else(|| UpdateItemAttributes::new()) + self.update_item_attributes + .take() + .unwrap_or_else(|| UpdateItemAttributes::new()) } // optional .UpdateListAttributes update_list_attributes = 6; - pub fn get_update_list_attributes(&self) -> &UpdateListAttributes { - self.update_list_attributes.as_ref().unwrap_or_else(|| UpdateListAttributes::default_instance()) + self.update_list_attributes + .as_ref() + .unwrap_or_else(|| UpdateListAttributes::default_instance()) } pub fn clear_update_list_attributes(&mut self) { self.update_list_attributes.clear(); @@ -2767,7 +3155,9 @@ impl Op { // Take field pub fn take_update_list_attributes(&mut self) -> UpdateListAttributes { - self.update_list_attributes.take().unwrap_or_else(|| UpdateListAttributes::new()) + self.update_list_attributes + .take() + .unwrap_or_else(|| UpdateListAttributes::new()) } } @@ -2777,55 +3167,75 @@ impl ::protobuf::Message for Op { if !v.is_initialized() { return false; } - }; + } for v in &self.rem { if !v.is_initialized() { return false; } - }; + } for v in &self.mov { if !v.is_initialized() { return false; } - }; + } for v in &self.update_item_attributes { if !v.is_initialized() { return false; } - }; + } for v in &self.update_list_attributes { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.kind, 1, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.kind, + 1, + &mut self.unknown_fields, + )?, 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.add)?; - }, + } 3 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rem)?; - }, + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.mov)?; - }, + } 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.update_item_attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.update_item_attributes, + )?; + } 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.update_list_attributes)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.update_list_attributes, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2863,7 +3273,10 @@ impl ::protobuf::Message for Op { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.kind { os.write_enum(1, v.value())?; } @@ -2927,44 +3340,59 @@ impl ::protobuf::Message for Op { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "kind", - |m: &Op| { &m.kind }, - |m: &mut Op| { &mut m.kind }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "add", - |m: &Op| { &m.add }, - |m: &mut Op| { &mut m.add }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rem", - |m: &Op| { &m.rem }, - |m: &mut Op| { &mut m.rem }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "mov", - |m: &Op| { &m.mov }, - |m: &mut Op| { &mut m.mov }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "update_item_attributes", - |m: &Op| { &m.update_item_attributes }, - |m: &mut Op| { &mut m.update_item_attributes }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "update_list_attributes", - |m: &Op| { &m.update_list_attributes }, - |m: &mut Op| { &mut m.update_list_attributes }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( + "kind", |m: &Op| &m.kind, |m: &mut Op| &mut m.kind )); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("add", |m: &Op| &m.add, |m: &mut Op| &mut m.add), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("rem", |m: &Op| &m.rem, |m: &mut Op| &mut m.rem), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("mov", |m: &Op| &m.mov, |m: &mut Op| &mut m.mov), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "update_item_attributes", + |m: &Op| &m.update_item_attributes, + |m: &mut Op| &mut m.update_item_attributes, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "update_list_attributes", + |m: &Op| &m.update_list_attributes, + |m: &mut Op| &mut m.update_list_attributes, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Op", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2972,9 +3400,7 @@ impl ::protobuf::Message for Op { fn default_instance() -> &'static Op { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Op::new) - } + unsafe { instance.get(Op::new) } } } @@ -3002,7 +3428,7 @@ impl ::protobuf::reflect::ProtobufValue for Op { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Op_Kind { KIND_UNKNOWN = 0, ADD = 2, @@ -3025,7 +3451,7 @@ impl ::protobuf::ProtobufEnum for Op_Kind { 4 => ::std::option::Option::Some(Op_Kind::MOV), 5 => ::std::option::Option::Some(Op_Kind::UPDATE_ITEM_ATTRIBUTES), 6 => ::std::option::Option::Some(Op_Kind::UPDATE_LIST_ATTRIBUTES), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -3042,17 +3468,20 @@ impl ::protobuf::ProtobufEnum for Op_Kind { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Op.Kind", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "Op.Kind", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for Op_Kind { -} +impl ::std::marker::Copy for Op_Kind {} impl ::std::default::Default for Op_Kind { fn default() -> Self { @@ -3066,7 +3495,7 @@ impl ::protobuf::reflect::ProtobufValue for Op_Kind { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct OpList { // message fields ops: ::protobuf::RepeatedField, @@ -3088,7 +3517,6 @@ impl OpList { // repeated .Op ops = 1; - pub fn get_ops(&self) -> &[Op] { &self.ops } @@ -3118,20 +3546,28 @@ impl ::protobuf::Message for OpList { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ops)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3144,18 +3580,21 @@ impl ::protobuf::Message for OpList { for value in &self.ops { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.ops { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -3191,19 +3630,21 @@ impl ::protobuf::Message for OpList { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ops", - |m: &OpList| { &m.ops }, - |m: &mut OpList| { &mut m.ops }, - )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("ops", |m: &OpList| &m.ops, |m: &mut OpList| &mut m.ops), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "OpList", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3211,9 +3652,7 @@ impl ::protobuf::Message for OpList { fn default_instance() -> &'static OpList { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(OpList::new) - } + unsafe { instance.get(OpList::new) } } } @@ -3290,16 +3729,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x18\x01\x20\x03(\x0b2\x03.OpB\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/pubsub.rs b/protocol/src/pubsub.rs index 15d4e2a0..29ee2031 100644 --- a/protocol/src/pubsub.rs +++ b/protocol/src/pubsub.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Subscription { // message fields uri: ::protobuf::SingularField<::std::string::String>, @@ -50,7 +50,6 @@ impl Subscription { // optional string uri = 1; - pub fn get_uri(&self) -> &str { match self.uri.as_ref() { Some(v) => &v, @@ -81,12 +80,13 @@ impl Subscription { // Take field pub fn take_uri(&mut self) -> ::std::string::String { - self.uri.take().unwrap_or_else(|| ::std::string::String::new()) + self.uri + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional int32 expiry = 2; - pub fn get_expiry(&self) -> i32 { self.expiry.unwrap_or(0) } @@ -105,7 +105,6 @@ impl Subscription { // optional int32 status_code = 3; - pub fn get_status_code(&self) -> i32 { self.status_code.unwrap_or(0) } @@ -128,30 +127,42 @@ impl ::protobuf::Message for Subscription { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.expiry = ::std::option::Option::Some(tmp); - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.status_code = ::std::option::Option::Some(tmp); - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -175,7 +186,10 @@ impl ::protobuf::Message for Subscription { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.uri.as_ref() { os.write_string(1, &v)?; } @@ -220,29 +234,41 @@ impl ::protobuf::Message for Subscription { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "uri", - |m: &Subscription| { &m.uri }, - |m: &mut Subscription| { &mut m.uri }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "uri", + |m: &Subscription| &m.uri, + |m: &mut Subscription| &mut m.uri, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "expiry", - |m: &Subscription| { &m.expiry }, - |m: &mut Subscription| { &mut m.expiry }, + |m: &Subscription| &m.expiry, + |m: &mut Subscription| &mut m.expiry, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "status_code", - |m: &Subscription| { &m.status_code }, - |m: &mut Subscription| { &mut m.status_code }, + |m: &Subscription| &m.status_code, + |m: &mut Subscription| &mut m.status_code, )); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Subscription", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -250,9 +276,7 @@ impl ::protobuf::Message for Subscription { fn default_instance() -> &'static Subscription { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Subscription::new) - } + unsafe { instance.get(Subscription::new) } } } @@ -283,16 +307,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ us_code\x18\x03\x20\x01(\x05B\0:\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } } diff --git a/protocol/src/spirc.rs b/protocol/src/spirc.rs index ee626a2a..de0f7ae4 100644 --- a/protocol/src/spirc.rs +++ b/protocol/src/spirc.rs @@ -26,7 +26,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0; -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Frame { // message fields version: ::std::option::Option, @@ -62,7 +62,6 @@ impl Frame { // optional uint32 version = 1; - pub fn get_version(&self) -> u32 { self.version.unwrap_or(0) } @@ -81,7 +80,6 @@ impl Frame { // optional string ident = 2; - pub fn get_ident(&self) -> &str { match self.ident.as_ref() { Some(v) => &v, @@ -112,12 +110,13 @@ impl Frame { // Take field pub fn take_ident(&mut self) -> ::std::string::String { - self.ident.take().unwrap_or_else(|| ::std::string::String::new()) + self.ident + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string protocol_version = 3; - pub fn get_protocol_version(&self) -> &str { match self.protocol_version.as_ref() { Some(v) => &v, @@ -148,12 +147,13 @@ impl Frame { // Take field pub fn take_protocol_version(&mut self) -> ::std::string::String { - self.protocol_version.take().unwrap_or_else(|| ::std::string::String::new()) + self.protocol_version + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 seq_nr = 4; - pub fn get_seq_nr(&self) -> u32 { self.seq_nr.unwrap_or(0) } @@ -172,7 +172,6 @@ impl Frame { // optional .MessageType typ = 5; - pub fn get_typ(&self) -> MessageType { self.typ.unwrap_or(MessageType::kMessageTypeHello) } @@ -191,9 +190,10 @@ impl Frame { // optional .DeviceState device_state = 7; - pub fn get_device_state(&self) -> &DeviceState { - self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance()) + self.device_state + .as_ref() + .unwrap_or_else(|| DeviceState::default_instance()) } pub fn clear_device_state(&mut self) { self.device_state.clear(); @@ -219,14 +219,17 @@ impl Frame { // Take field pub fn take_device_state(&mut self) -> DeviceState { - self.device_state.take().unwrap_or_else(|| DeviceState::new()) + self.device_state + .take() + .unwrap_or_else(|| DeviceState::new()) } // optional .Goodbye goodbye = 11; - pub fn get_goodbye(&self) -> &Goodbye { - self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance()) + self.goodbye + .as_ref() + .unwrap_or_else(|| Goodbye::default_instance()) } pub fn clear_goodbye(&mut self) { self.goodbye.clear(); @@ -257,9 +260,10 @@ impl Frame { // optional .State state = 12; - pub fn get_state(&self) -> &State { - self.state.as_ref().unwrap_or_else(|| State::default_instance()) + self.state + .as_ref() + .unwrap_or_else(|| State::default_instance()) } pub fn clear_state(&mut self) { self.state.clear(); @@ -290,7 +294,6 @@ impl Frame { // optional uint32 position = 13; - pub fn get_position(&self) -> u32 { self.position.unwrap_or(0) } @@ -309,7 +312,6 @@ impl Frame { // optional uint32 volume = 14; - pub fn get_volume(&self) -> u32 { self.volume.unwrap_or(0) } @@ -328,7 +330,6 @@ impl Frame { // optional int64 state_update_id = 17; - pub fn get_state_update_id(&self) -> i64 { self.state_update_id.unwrap_or(0) } @@ -347,7 +348,6 @@ impl Frame { // repeated string recipient = 18; - pub fn get_recipient(&self) -> &[::std::string::String] { &self.recipient } @@ -372,7 +372,6 @@ impl Frame { // optional bytes context_player_state = 19; - pub fn get_context_player_state(&self) -> &[u8] { match self.context_player_state.as_ref() { Some(v) => &v, @@ -403,12 +402,13 @@ impl Frame { // Take field pub fn take_context_player_state(&mut self) -> ::std::vec::Vec { - self.context_player_state.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.context_player_state + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional string new_name = 20; - pub fn get_new_name(&self) -> &str { match self.new_name.as_ref() { Some(v) => &v, @@ -439,14 +439,17 @@ impl Frame { // Take field pub fn take_new_name(&mut self) -> ::std::string::String { - self.new_name.take().unwrap_or_else(|| ::std::string::String::new()) + self.new_name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional .Metadata metadata = 25; - pub fn get_metadata(&self) -> &Metadata { - self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance()) + self.metadata + .as_ref() + .unwrap_or_else(|| Metadata::default_instance()) } pub fn clear_metadata(&mut self) { self.metadata.clear(); @@ -482,97 +485,131 @@ impl ::protobuf::Message for Frame { if !v.is_initialized() { return false; } - }; + } for v in &self.goodbye { if !v.is_initialized() { return false; } - }; + } for v in &self.state { if !v.is_initialized() { return false; } - }; + } for v in &self.metadata { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.version = ::std::option::Option::Some(tmp); - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.ident)?; - }, + } 3 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.protocol_version)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.protocol_version, + )?; + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.seq_nr = ::std::option::Option::Some(tmp); - }, - 5 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 5, &mut self.unknown_fields)? - }, + } + 5 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.typ, + 5, + &mut self.unknown_fields, + )?, 7 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.device_state)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.device_state, + )?; + } 11 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.goodbye)?; - }, + } 12 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.state)?; - }, + } 13 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.position = ::std::option::Option::Some(tmp); - }, + } 14 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.volume = ::std::option::Option::Some(tmp); - }, + } 17 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.state_update_id = ::std::option::Option::Some(tmp); - }, + } 18 => { ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.recipient)?; - }, + } 19 => { - ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.context_player_state)?; - }, + ::protobuf::rt::read_singular_bytes_into( + wire_type, + is, + &mut self.context_player_state, + )?; + } 20 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.new_name)?; - }, + } 25 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.metadata)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -620,7 +657,7 @@ impl ::protobuf::Message for Frame { } for value in &self.recipient { my_size += ::protobuf::rt::string_size(18, &value); - }; + } if let Some(ref v) = self.context_player_state.as_ref() { my_size += ::protobuf::rt::bytes_size(19, &v); } @@ -636,7 +673,10 @@ impl ::protobuf::Message for Frame { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.version { os.write_uint32(1, v)?; } @@ -678,7 +718,7 @@ impl ::protobuf::Message for Frame { } for v in &self.recipient { os.write_string(18, &v)?; - }; + } if let Some(ref v) = self.context_player_state.as_ref() { os.write_bytes(19, &v)?; } @@ -725,89 +765,147 @@ impl ::protobuf::Message for Frame { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "version", - |m: &Frame| { &m.version }, - |m: &mut Frame| { &mut m.version }, + |m: &Frame| &m.version, + |m: &mut Frame| &mut m.version, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "ident", - |m: &Frame| { &m.ident }, - |m: &mut Frame| { &mut m.ident }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "protocol_version", - |m: &Frame| { &m.protocol_version }, - |m: &mut Frame| { &mut m.protocol_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "ident", |m: &Frame| &m.ident, |m: &mut Frame| &mut m.ident + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "protocol_version", + |m: &Frame| &m.protocol_version, + |m: &mut Frame| &mut m.protocol_version, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "seq_nr", - |m: &Frame| { &m.seq_nr }, - |m: &mut Frame| { &mut m.seq_nr }, + |m: &Frame| &m.seq_nr, + |m: &mut Frame| &mut m.seq_nr, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "typ", - |m: &Frame| { &m.typ }, - |m: &mut Frame| { &mut m.typ }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( + "typ", |m: &Frame| &m.typ, |m: &mut Frame| &mut m.typ )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "device_state", - |m: &Frame| { &m.device_state }, - |m: &mut Frame| { &mut m.device_state }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "goodbye", - |m: &Frame| { &m.goodbye }, - |m: &mut Frame| { &mut m.goodbye }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "state", - |m: &Frame| { &m.state }, - |m: &mut Frame| { &mut m.state }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "device_state", + |m: &Frame| &m.device_state, + |m: &mut Frame| &mut m.device_state, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "goodbye", + |m: &Frame| &m.goodbye, + |m: &mut Frame| &mut m.goodbye, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "state", |m: &Frame| &m.state, |m: &mut Frame| &mut m.state + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "position", - |m: &Frame| { &m.position }, - |m: &mut Frame| { &mut m.position }, + |m: &Frame| &m.position, + |m: &mut Frame| &mut m.position, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "volume", - |m: &Frame| { &m.volume }, - |m: &mut Frame| { &mut m.volume }, + |m: &Frame| &m.volume, + |m: &mut Frame| &mut m.volume, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "state_update_id", - |m: &Frame| { &m.state_update_id }, - |m: &mut Frame| { &mut m.state_update_id }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "recipient", - |m: &Frame| { &m.recipient }, - |m: &mut Frame| { &mut m.recipient }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "context_player_state", - |m: &Frame| { &m.context_player_state }, - |m: &mut Frame| { &mut m.context_player_state }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "new_name", - |m: &Frame| { &m.new_name }, - |m: &mut Frame| { &mut m.new_name }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "metadata", - |m: &Frame| { &m.metadata }, - |m: &mut Frame| { &mut m.metadata }, + |m: &Frame| &m.state_update_id, + |m: &mut Frame| &mut m.state_update_id, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "recipient", + |m: &Frame| &m.recipient, + |m: &mut Frame| &mut m.recipient, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "context_player_state", + |m: &Frame| &m.context_player_state, + |m: &mut Frame| &mut m.context_player_state, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "new_name", + |m: &Frame| &m.new_name, + |m: &mut Frame| &mut m.new_name, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "metadata", + |m: &Frame| &m.metadata, + |m: &mut Frame| &mut m.metadata, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Frame", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -815,9 +913,7 @@ impl ::protobuf::Message for Frame { fn default_instance() -> &'static Frame { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Frame::new) - } + unsafe { instance.get(Frame::new) } } } @@ -854,7 +950,7 @@ impl ::protobuf::reflect::ProtobufValue for Frame { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct DeviceState { // message fields sw_version: ::protobuf::SingularField<::std::string::String>, @@ -886,7 +982,6 @@ impl DeviceState { // optional string sw_version = 1; - pub fn get_sw_version(&self) -> &str { match self.sw_version.as_ref() { Some(v) => &v, @@ -917,12 +1012,13 @@ impl DeviceState { // Take field pub fn take_sw_version(&mut self) -> ::std::string::String { - self.sw_version.take().unwrap_or_else(|| ::std::string::String::new()) + self.sw_version + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool is_active = 10; - pub fn get_is_active(&self) -> bool { self.is_active.unwrap_or(false) } @@ -941,7 +1037,6 @@ impl DeviceState { // optional bool can_play = 11; - pub fn get_can_play(&self) -> bool { self.can_play.unwrap_or(false) } @@ -960,7 +1055,6 @@ impl DeviceState { // optional uint32 volume = 12; - pub fn get_volume(&self) -> u32 { self.volume.unwrap_or(0) } @@ -979,7 +1073,6 @@ impl DeviceState { // optional string name = 13; - pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, @@ -1010,12 +1103,13 @@ impl DeviceState { // Take field pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) + self.name + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 error_code = 14; - pub fn get_error_code(&self) -> u32 { self.error_code.unwrap_or(0) } @@ -1034,7 +1128,6 @@ impl DeviceState { // optional int64 became_active_at = 15; - pub fn get_became_active_at(&self) -> i64 { self.became_active_at.unwrap_or(0) } @@ -1053,7 +1146,6 @@ impl DeviceState { // optional string error_message = 16; - pub fn get_error_message(&self) -> &str { match self.error_message.as_ref() { Some(v) => &v, @@ -1084,12 +1176,13 @@ impl DeviceState { // Take field pub fn take_error_message(&mut self) -> ::std::string::String { - self.error_message.take().unwrap_or_else(|| ::std::string::String::new()) + self.error_message + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Capability capabilities = 17; - pub fn get_capabilities(&self) -> &[Capability] { &self.capabilities } @@ -1114,7 +1207,6 @@ impl DeviceState { // optional string context_player_error = 20; - pub fn get_context_player_error(&self) -> &str { match self.context_player_error.as_ref() { Some(v) => &v, @@ -1145,12 +1237,13 @@ impl DeviceState { // Take field pub fn take_context_player_error(&mut self) -> ::std::string::String { - self.context_player_error.take().unwrap_or_else(|| ::std::string::String::new()) + self.context_player_error + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // repeated .Metadata metadata = 25; - pub fn get_metadata(&self) -> &[Metadata] { &self.metadata } @@ -1180,75 +1273,105 @@ impl ::protobuf::Message for DeviceState { if !v.is_initialized() { return false; } - }; + } for v in &self.metadata { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.sw_version)?; - }, + } 10 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.is_active = ::std::option::Option::Some(tmp); - }, + } 11 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.can_play = ::std::option::Option::Some(tmp); - }, + } 12 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.volume = ::std::option::Option::Some(tmp); - }, + } 13 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; - }, + } 14 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.error_code = ::std::option::Option::Some(tmp); - }, + } 15 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.became_active_at = ::std::option::Option::Some(tmp); - }, + } 16 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.error_message)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.error_message, + )?; + } 17 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.capabilities)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.capabilities, + )?; + } 20 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_player_error)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.context_player_error, + )?; + } 25 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metadata)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1285,20 +1408,23 @@ impl ::protobuf::Message for DeviceState { for value in &self.capabilities { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.context_player_error.as_ref() { my_size += ::protobuf::rt::string_size(20, &v); } for value in &self.metadata { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.sw_version.as_ref() { os.write_string(1, &v)?; } @@ -1327,7 +1453,7 @@ impl ::protobuf::Message for DeviceState { os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.context_player_error.as_ref() { os.write_string(20, &v)?; } @@ -1335,7 +1461,7 @@ impl ::protobuf::Message for DeviceState { os.write_tag(25, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1371,69 +1497,115 @@ impl ::protobuf::Message for DeviceState { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "sw_version", - |m: &DeviceState| { &m.sw_version }, - |m: &mut DeviceState| { &mut m.sw_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "sw_version", + |m: &DeviceState| &m.sw_version, + |m: &mut DeviceState| &mut m.sw_version, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "is_active", - |m: &DeviceState| { &m.is_active }, - |m: &mut DeviceState| { &mut m.is_active }, + |m: &DeviceState| &m.is_active, + |m: &mut DeviceState| &mut m.is_active, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "can_play", - |m: &DeviceState| { &m.can_play }, - |m: &mut DeviceState| { &mut m.can_play }, + |m: &DeviceState| &m.can_play, + |m: &mut DeviceState| &mut m.can_play, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "volume", - |m: &DeviceState| { &m.volume }, - |m: &mut DeviceState| { &mut m.volume }, + |m: &DeviceState| &m.volume, + |m: &mut DeviceState| &mut m.volume, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &DeviceState| { &m.name }, - |m: &mut DeviceState| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "name", + |m: &DeviceState| &m.name, + |m: &mut DeviceState| &mut m.name, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "error_code", - |m: &DeviceState| { &m.error_code }, - |m: &mut DeviceState| { &mut m.error_code }, + |m: &DeviceState| &m.error_code, + |m: &mut DeviceState| &mut m.error_code, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "became_active_at", - |m: &DeviceState| { &m.became_active_at }, - |m: &mut DeviceState| { &mut m.became_active_at }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "error_message", - |m: &DeviceState| { &m.error_message }, - |m: &mut DeviceState| { &mut m.error_message }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "capabilities", - |m: &DeviceState| { &m.capabilities }, - |m: &mut DeviceState| { &mut m.capabilities }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "context_player_error", - |m: &DeviceState| { &m.context_player_error }, - |m: &mut DeviceState| { &mut m.context_player_error }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "metadata", - |m: &DeviceState| { &m.metadata }, - |m: &mut DeviceState| { &mut m.metadata }, + |m: &DeviceState| &m.became_active_at, + |m: &mut DeviceState| &mut m.became_active_at, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "error_message", + |m: &DeviceState| &m.error_message, + |m: &mut DeviceState| &mut m.error_message, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "capabilities", + |m: &DeviceState| &m.capabilities, + |m: &mut DeviceState| &mut m.capabilities, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "context_player_error", + |m: &DeviceState| &m.context_player_error, + |m: &mut DeviceState| &mut m.context_player_error, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "metadata", + |m: &DeviceState| &m.metadata, + |m: &mut DeviceState| &mut m.metadata, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "DeviceState", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1441,9 +1613,7 @@ impl ::protobuf::Message for DeviceState { fn default_instance() -> &'static DeviceState { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(DeviceState::new) - } + unsafe { instance.get(DeviceState::new) } } } @@ -1476,7 +1646,7 @@ impl ::protobuf::reflect::ProtobufValue for DeviceState { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Capability { // message fields typ: ::std::option::Option, @@ -1500,7 +1670,6 @@ impl Capability { // optional .CapabilityType typ = 1; - pub fn get_typ(&self) -> CapabilityType { self.typ.unwrap_or(CapabilityType::kSupportedContexts) } @@ -1519,7 +1688,6 @@ impl Capability { // repeated int64 intValue = 2; - pub fn get_intValue(&self) -> &[i64] { &self.intValue } @@ -1544,7 +1712,6 @@ impl Capability { // repeated string stringValue = 3; - pub fn get_stringValue(&self) -> &[::std::string::String] { &self.stringValue } @@ -1573,22 +1740,38 @@ impl ::protobuf::Message for Capability { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { - 1 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 1, &mut self.unknown_fields)? - }, + 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.typ, + 1, + &mut self.unknown_fields, + )?, 2 => { ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.intValue)?; - }, + } 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.stringValue)?; - }, + ::protobuf::rt::read_repeated_string_into( + wire_type, + is, + &mut self.stringValue, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1602,26 +1785,30 @@ impl ::protobuf::Message for Capability { my_size += ::protobuf::rt::enum_size(1, v); } for value in &self.intValue { - my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); - }; + my_size += + ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint); + } for value in &self.stringValue { my_size += ::protobuf::rt::string_size(3, &value); - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.typ { os.write_enum(1, v.value())?; } for v in &self.intValue { os.write_int64(2, *v)?; - }; + } for v in &self.stringValue { os.write_string(3, &v)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1657,29 +1844,41 @@ impl ::protobuf::Message for Capability { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "typ", - |m: &Capability| { &m.typ }, - |m: &mut Capability| { &mut m.typ }, + |m: &Capability| &m.typ, + |m: &mut Capability| &mut m.typ, )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + fields.push(::protobuf::reflect::accessor::make_vec_accessor::< + _, + ::protobuf::types::ProtobufTypeInt64, + >( "intValue", - |m: &Capability| { &m.intValue }, - |m: &mut Capability| { &mut m.intValue }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "stringValue", - |m: &Capability| { &m.stringValue }, - |m: &mut Capability| { &mut m.stringValue }, + |m: &Capability| &m.intValue, + |m: &mut Capability| &mut m.intValue, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "stringValue", + |m: &Capability| &m.stringValue, + |m: &mut Capability| &mut m.stringValue, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Capability", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1687,9 +1886,7 @@ impl ::protobuf::Message for Capability { fn default_instance() -> &'static Capability { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Capability::new) - } + unsafe { instance.get(Capability::new) } } } @@ -1714,7 +1911,7 @@ impl ::protobuf::reflect::ProtobufValue for Capability { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Goodbye { // message fields reason: ::protobuf::SingularField<::std::string::String>, @@ -1736,7 +1933,6 @@ impl Goodbye { // optional string reason = 1; - pub fn get_reason(&self) -> &str { match self.reason.as_ref() { Some(v) => &v, @@ -1767,7 +1963,9 @@ impl Goodbye { // Take field pub fn take_reason(&mut self) -> ::std::string::String { - self.reason.take().unwrap_or_else(|| ::std::string::String::new()) + self.reason + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -1776,16 +1974,24 @@ impl ::protobuf::Message for Goodbye { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.reason)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1803,7 +2009,10 @@ impl ::protobuf::Message for Goodbye { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.reason.as_ref() { os.write_string(1, &v)?; } @@ -1842,19 +2051,25 @@ impl ::protobuf::Message for Goodbye { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "reason", - |m: &Goodbye| { &m.reason }, - |m: &mut Goodbye| { &mut m.reason }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "reason", + |m: &Goodbye| &m.reason, + |m: &mut Goodbye| &mut m.reason, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Goodbye", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -1862,9 +2077,7 @@ impl ::protobuf::Message for Goodbye { fn default_instance() -> &'static Goodbye { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Goodbye::new) - } + unsafe { instance.get(Goodbye::new) } } } @@ -1887,7 +2100,7 @@ impl ::protobuf::reflect::ProtobufValue for Goodbye { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct State { // message fields context_uri: ::protobuf::SingularField<::std::string::String>, @@ -1923,7 +2136,6 @@ impl State { // optional string context_uri = 2; - pub fn get_context_uri(&self) -> &str { match self.context_uri.as_ref() { Some(v) => &v, @@ -1954,12 +2166,13 @@ impl State { // Take field pub fn take_context_uri(&mut self) -> ::std::string::String { - self.context_uri.take().unwrap_or_else(|| ::std::string::String::new()) + self.context_uri + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 index = 3; - pub fn get_index(&self) -> u32 { self.index.unwrap_or(0) } @@ -1978,7 +2191,6 @@ impl State { // optional uint32 position_ms = 4; - pub fn get_position_ms(&self) -> u32 { self.position_ms.unwrap_or(0) } @@ -1997,7 +2209,6 @@ impl State { // optional .PlayStatus status = 5; - pub fn get_status(&self) -> PlayStatus { self.status.unwrap_or(PlayStatus::kPlayStatusStop) } @@ -2016,7 +2227,6 @@ impl State { // optional uint64 position_measured_at = 7; - pub fn get_position_measured_at(&self) -> u64 { self.position_measured_at.unwrap_or(0) } @@ -2035,7 +2245,6 @@ impl State { // optional string context_description = 8; - pub fn get_context_description(&self) -> &str { match self.context_description.as_ref() { Some(v) => &v, @@ -2066,12 +2275,13 @@ impl State { // Take field pub fn take_context_description(&mut self) -> ::std::string::String { - self.context_description.take().unwrap_or_else(|| ::std::string::String::new()) + self.context_description + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool shuffle = 13; - pub fn get_shuffle(&self) -> bool { self.shuffle.unwrap_or(false) } @@ -2090,7 +2300,6 @@ impl State { // optional bool repeat = 14; - pub fn get_repeat(&self) -> bool { self.repeat.unwrap_or(false) } @@ -2109,7 +2318,6 @@ impl State { // optional string last_command_ident = 20; - pub fn get_last_command_ident(&self) -> &str { match self.last_command_ident.as_ref() { Some(v) => &v, @@ -2140,12 +2348,13 @@ impl State { // Take field pub fn take_last_command_ident(&mut self) -> ::std::string::String { - self.last_command_ident.take().unwrap_or_else(|| ::std::string::String::new()) + self.last_command_ident + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 last_command_msgid = 21; - pub fn get_last_command_msgid(&self) -> u32 { self.last_command_msgid.unwrap_or(0) } @@ -2164,7 +2373,6 @@ impl State { // optional bool playing_from_fallback = 24; - pub fn get_playing_from_fallback(&self) -> bool { self.playing_from_fallback.unwrap_or(false) } @@ -2183,7 +2391,6 @@ impl State { // optional uint32 row = 25; - pub fn get_row(&self) -> u32 { self.row.unwrap_or(0) } @@ -2202,7 +2409,6 @@ impl State { // optional uint32 playing_track_index = 26; - pub fn get_playing_track_index(&self) -> u32 { self.playing_track_index.unwrap_or(0) } @@ -2221,7 +2427,6 @@ impl State { // repeated .TrackRef track = 27; - pub fn get_track(&self) -> &[TrackRef] { &self.track } @@ -2246,7 +2451,6 @@ impl State { // optional .Ad ad = 28; - pub fn get_ad(&self) -> &Ad { self.ad.as_ref().unwrap_or_else(|| Ad::default_instance()) } @@ -2284,103 +2488,145 @@ impl ::protobuf::Message for State { if !v.is_initialized() { return false; } - }; + } for v in &self.ad { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 2 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_uri)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.context_uri, + )?; + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.index = ::std::option::Option::Some(tmp); - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.position_ms = ::std::option::Option::Some(tmp); - }, - 5 => { - ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 5, &mut self.unknown_fields)? - }, + } + 5 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.status, + 5, + &mut self.unknown_fields, + )?, 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.position_measured_at = ::std::option::Option::Some(tmp); - }, + } 8 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_description)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.context_description, + )?; + } 13 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.shuffle = ::std::option::Option::Some(tmp); - }, + } 14 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.repeat = ::std::option::Option::Some(tmp); - }, + } 20 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.last_command_ident)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.last_command_ident, + )?; + } 21 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.last_command_msgid = ::std::option::Option::Some(tmp); - }, + } 24 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.playing_from_fallback = ::std::option::Option::Some(tmp); - }, + } 25 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.row = ::std::option::Option::Some(tmp); - }, + } 26 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.playing_track_index = ::std::option::Option::Some(tmp); - }, + } 27 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?; - }, + } 28 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ad)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2432,7 +2678,7 @@ impl ::protobuf::Message for State { for value in &self.track { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.ad.as_ref() { let len = v.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -2442,7 +2688,10 @@ impl ::protobuf::Message for State { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.context_uri.as_ref() { os.write_string(2, &v)?; } @@ -2486,7 +2735,7 @@ impl ::protobuf::Message for State { os.write_tag(27, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.ad.as_ref() { os.write_tag(28, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2527,89 +2776,137 @@ impl ::protobuf::Message for State { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "context_uri", - |m: &State| { &m.context_uri }, - |m: &mut State| { &mut m.context_uri }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "context_uri", + |m: &State| &m.context_uri, + |m: &mut State| &mut m.context_uri, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "index", - |m: &State| { &m.index }, - |m: &mut State| { &mut m.index }, + |m: &State| &m.index, + |m: &mut State| &mut m.index, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "position_ms", - |m: &State| { &m.position_ms }, - |m: &mut State| { &mut m.position_ms }, + |m: &State| &m.position_ms, + |m: &mut State| &mut m.position_ms, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeEnum, + >( "status", - |m: &State| { &m.status }, - |m: &mut State| { &mut m.status }, + |m: &State| &m.status, + |m: &mut State| &mut m.status, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint64, + >( "position_measured_at", - |m: &State| { &m.position_measured_at }, - |m: &mut State| { &mut m.position_measured_at }, + |m: &State| &m.position_measured_at, + |m: &mut State| &mut m.position_measured_at, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "context_description", - |m: &State| { &m.context_description }, - |m: &mut State| { &mut m.context_description }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "context_description", + |m: &State| &m.context_description, + |m: &mut State| &mut m.context_description, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "shuffle", - |m: &State| { &m.shuffle }, - |m: &mut State| { &mut m.shuffle }, + |m: &State| &m.shuffle, + |m: &mut State| &mut m.shuffle, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "repeat", - |m: &State| { &m.repeat }, - |m: &mut State| { &mut m.repeat }, + |m: &State| &m.repeat, + |m: &mut State| &mut m.repeat, )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "last_command_ident", - |m: &State| { &m.last_command_ident }, - |m: &mut State| { &mut m.last_command_ident }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "last_command_ident", + |m: &State| &m.last_command_ident, + |m: &mut State| &mut m.last_command_ident, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "last_command_msgid", - |m: &State| { &m.last_command_msgid }, - |m: &mut State| { &mut m.last_command_msgid }, + |m: &State| &m.last_command_msgid, + |m: &mut State| &mut m.last_command_msgid, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "playing_from_fallback", - |m: &State| { &m.playing_from_fallback }, - |m: &mut State| { &mut m.playing_from_fallback }, + |m: &State| &m.playing_from_fallback, + |m: &mut State| &mut m.playing_from_fallback, )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "row", - |m: &State| { &m.row }, - |m: &mut State| { &mut m.row }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( + "row", |m: &State| &m.row, |m: &mut State| &mut m.row )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeUint32, + >( "playing_track_index", - |m: &State| { &m.playing_track_index }, - |m: &mut State| { &mut m.playing_track_index }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "track", - |m: &State| { &m.track }, - |m: &mut State| { &mut m.track }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ad", - |m: &State| { &m.ad }, - |m: &mut State| { &mut m.ad }, + |m: &State| &m.playing_track_index, + |m: &mut State| &mut m.playing_track_index, )); + fields.push( + ::protobuf::reflect::accessor::make_repeated_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >( + "track", |m: &State| &m.track, |m: &mut State| &mut m.track + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::< + _, + ::protobuf::types::ProtobufTypeMessage, + >("ad", |m: &State| &m.ad, |m: &mut State| &mut m.ad), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "State", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2617,9 +2914,7 @@ impl ::protobuf::Message for State { fn default_instance() -> &'static State { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(State::new) - } + unsafe { instance.get(State::new) } } } @@ -2656,7 +2951,7 @@ impl ::protobuf::reflect::ProtobufValue for State { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct TrackRef { // message fields gid: ::protobuf::SingularField<::std::vec::Vec>, @@ -2681,7 +2976,6 @@ impl TrackRef { // optional bytes gid = 1; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -2717,7 +3011,6 @@ impl TrackRef { // optional string uri = 2; - pub fn get_uri(&self) -> &str { match self.uri.as_ref() { Some(v) => &v, @@ -2748,12 +3041,13 @@ impl TrackRef { // Take field pub fn take_uri(&mut self) -> ::std::string::String { - self.uri.take().unwrap_or_else(|| ::std::string::String::new()) + self.uri + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bool queued = 3; - pub fn get_queued(&self) -> bool { self.queued.unwrap_or(false) } @@ -2772,7 +3066,6 @@ impl TrackRef { // optional string context = 4; - pub fn get_context(&self) -> &str { match self.context.as_ref() { Some(v) => &v, @@ -2803,7 +3096,9 @@ impl TrackRef { // Take field pub fn take_context(&mut self) -> ::std::string::String { - self.context.take().unwrap_or_else(|| ::std::string::String::new()) + self.context + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -2812,29 +3107,39 @@ impl ::protobuf::Message for TrackRef { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?; - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.queued = ::std::option::Option::Some(tmp); - }, + } 4 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2861,7 +3166,10 @@ impl ::protobuf::Message for TrackRef { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.gid.as_ref() { os.write_bytes(1, &v)?; } @@ -2909,34 +3217,49 @@ impl ::protobuf::Message for TrackRef { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &TrackRef| { &m.gid }, - |m: &mut TrackRef| { &mut m.gid }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "uri", - |m: &TrackRef| { &m.uri }, - |m: &mut TrackRef| { &mut m.uri }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "gid", |m: &TrackRef| &m.gid, |m: &mut TrackRef| &mut m.gid + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "uri", |m: &TrackRef| &m.uri, |m: &mut TrackRef| &mut m.uri + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeBool, + >( "queued", - |m: &TrackRef| { &m.queued }, - |m: &mut TrackRef| { &mut m.queued }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "context", - |m: &TrackRef| { &m.context }, - |m: &mut TrackRef| { &mut m.context }, + |m: &TrackRef| &m.queued, + |m: &mut TrackRef| &mut m.queued, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "context", + |m: &TrackRef| &m.context, + |m: &mut TrackRef| &mut m.context, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "TrackRef", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -2944,9 +3267,7 @@ impl ::protobuf::Message for TrackRef { fn default_instance() -> &'static TrackRef { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(TrackRef::new) - } + unsafe { instance.get(TrackRef::new) } } } @@ -2972,7 +3293,7 @@ impl ::protobuf::reflect::ProtobufValue for TrackRef { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Ad { // message fields next: ::std::option::Option, @@ -3002,7 +3323,6 @@ impl Ad { // optional int32 next = 1; - pub fn get_next(&self) -> i32 { self.next.unwrap_or(0) } @@ -3021,7 +3341,6 @@ impl Ad { // optional bytes ogg_fid = 2; - pub fn get_ogg_fid(&self) -> &[u8] { match self.ogg_fid.as_ref() { Some(v) => &v, @@ -3052,12 +3371,13 @@ impl Ad { // Take field pub fn take_ogg_fid(&mut self) -> ::std::vec::Vec { - self.ogg_fid.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.ogg_fid + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bytes image_fid = 3; - pub fn get_image_fid(&self) -> &[u8] { match self.image_fid.as_ref() { Some(v) => &v, @@ -3088,12 +3408,13 @@ impl Ad { // Take field pub fn take_image_fid(&mut self) -> ::std::vec::Vec { - self.image_fid.take().unwrap_or_else(|| ::std::vec::Vec::new()) + self.image_fid + .take() + .unwrap_or_else(|| ::std::vec::Vec::new()) } // optional int32 duration = 4; - pub fn get_duration(&self) -> i32 { self.duration.unwrap_or(0) } @@ -3112,7 +3433,6 @@ impl Ad { // optional string click_url = 5; - pub fn get_click_url(&self) -> &str { match self.click_url.as_ref() { Some(v) => &v, @@ -3143,12 +3463,13 @@ impl Ad { // Take field pub fn take_click_url(&mut self) -> ::std::string::String { - self.click_url.take().unwrap_or_else(|| ::std::string::String::new()) + self.click_url + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string impression_url = 6; - pub fn get_impression_url(&self) -> &str { match self.impression_url.as_ref() { Some(v) => &v, @@ -3179,12 +3500,13 @@ impl Ad { // Take field pub fn take_impression_url(&mut self) -> ::std::string::String { - self.impression_url.take().unwrap_or_else(|| ::std::string::String::new()) + self.impression_url + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string product = 7; - pub fn get_product(&self) -> &str { match self.product.as_ref() { Some(v) => &v, @@ -3215,12 +3537,13 @@ impl Ad { // Take field pub fn take_product(&mut self) -> ::std::string::String { - self.product.take().unwrap_or_else(|| ::std::string::String::new()) + self.product + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string advertiser = 8; - pub fn get_advertiser(&self) -> &str { match self.advertiser.as_ref() { Some(v) => &v, @@ -3251,12 +3574,13 @@ impl Ad { // Take field pub fn take_advertiser(&mut self) -> ::std::string::String { - self.advertiser.take().unwrap_or_else(|| ::std::string::String::new()) + self.advertiser + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional bytes gid = 9; - pub fn get_gid(&self) -> &[u8] { match self.gid.as_ref() { Some(v) => &v, @@ -3296,48 +3620,64 @@ impl ::protobuf::Message for Ad { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.next = ::std::option::Option::Some(tmp); - }, + } 2 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.ogg_fid)?; - }, + } 3 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.image_fid)?; - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.duration = ::std::option::Option::Some(tmp); - }, + } 5 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.click_url)?; - }, + } 6 => { - ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.impression_url)?; - }, + ::protobuf::rt::read_singular_string_into( + wire_type, + is, + &mut self.impression_url, + )?; + } 7 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.product)?; - }, + } 8 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.advertiser)?; - }, + } 9 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3379,7 +3719,10 @@ impl ::protobuf::Message for Ad { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.next { os.write_int32(1, v)?; } @@ -3442,59 +3785,91 @@ impl ::protobuf::Message for Ad { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "next", - |m: &Ad| { &m.next }, - |m: &mut Ad| { &mut m.next }, + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( + "next", |m: &Ad| &m.next, |m: &mut Ad| &mut m.next )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "ogg_fid", - |m: &Ad| { &m.ogg_fid }, - |m: &mut Ad| { &mut m.ogg_fid }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "image_fid", - |m: &Ad| { &m.image_fid }, - |m: &mut Ad| { &mut m.image_fid }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "ogg_fid", |m: &Ad| &m.ogg_fid, |m: &mut Ad| &mut m.ogg_fid + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >( + "image_fid", + |m: &Ad| &m.image_fid, + |m: &mut Ad| &mut m.image_fid, + ), + ); + fields.push(::protobuf::reflect::accessor::make_option_accessor::< + _, + ::protobuf::types::ProtobufTypeInt32, + >( "duration", - |m: &Ad| { &m.duration }, - |m: &mut Ad| { &mut m.duration }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "click_url", - |m: &Ad| { &m.click_url }, - |m: &mut Ad| { &mut m.click_url }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "impression_url", - |m: &Ad| { &m.impression_url }, - |m: &mut Ad| { &mut m.impression_url }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "product", - |m: &Ad| { &m.product }, - |m: &mut Ad| { &mut m.product }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "advertiser", - |m: &Ad| { &m.advertiser }, - |m: &mut Ad| { &mut m.advertiser }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "gid", - |m: &Ad| { &m.gid }, - |m: &mut Ad| { &mut m.gid }, + |m: &Ad| &m.duration, + |m: &mut Ad| &mut m.duration, )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "click_url", + |m: &Ad| &m.click_url, + |m: &mut Ad| &mut m.click_url, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "impression_url", + |m: &Ad| &m.impression_url, + |m: &mut Ad| &mut m.impression_url, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "product", |m: &Ad| &m.product, |m: &mut Ad| &mut m.product + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "advertiser", + |m: &Ad| &m.advertiser, + |m: &mut Ad| &mut m.advertiser, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeBytes, + >("gid", |m: &Ad| &m.gid, |m: &mut Ad| &mut m.gid), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Ad", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3502,9 +3877,7 @@ impl ::protobuf::Message for Ad { fn default_instance() -> &'static Ad { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Ad::new) - } + unsafe { instance.get(Ad::new) } } } @@ -3535,7 +3908,7 @@ impl ::protobuf::reflect::ProtobufValue for Ad { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Metadata { // message fields field_type: ::protobuf::SingularField<::std::string::String>, @@ -3558,7 +3931,6 @@ impl Metadata { // optional string type = 1; - pub fn get_field_type(&self) -> &str { match self.field_type.as_ref() { Some(v) => &v, @@ -3589,12 +3961,13 @@ impl Metadata { // Take field pub fn take_field_type(&mut self) -> ::std::string::String { - self.field_type.take().unwrap_or_else(|| ::std::string::String::new()) + self.field_type + .take() + .unwrap_or_else(|| ::std::string::String::new()) } // optional string metadata = 2; - pub fn get_metadata(&self) -> &str { match self.metadata.as_ref() { Some(v) => &v, @@ -3625,7 +3998,9 @@ impl Metadata { // Take field pub fn take_metadata(&mut self) -> ::std::string::String { - self.metadata.take().unwrap_or_else(|| ::std::string::String::new()) + self.metadata + .take() + .unwrap_or_else(|| ::std::string::String::new()) } } @@ -3634,19 +4009,27 @@ impl ::protobuf::Message for Metadata { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.field_type)?; - }, + } 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.metadata)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3667,7 +4050,10 @@ impl ::protobuf::Message for Metadata { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.field_type.as_ref() { os.write_string(1, &v)?; } @@ -3709,24 +4095,35 @@ impl ::protobuf::Message for Metadata { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &Metadata| { &m.field_type }, - |m: &mut Metadata| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "metadata", - |m: &Metadata| { &m.metadata }, - |m: &mut Metadata| { &mut m.metadata }, - )); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "type", + |m: &Metadata| &m.field_type, + |m: &mut Metadata| &mut m.field_type, + ), + ); + fields.push( + ::protobuf::reflect::accessor::make_singular_field_accessor::< + _, + ::protobuf::types::ProtobufTypeString, + >( + "metadata", + |m: &Metadata| &m.metadata, + |m: &mut Metadata| &mut m.metadata, + ), + ); ::protobuf::reflect::MessageDescriptor::new_pb_name::( "Metadata", fields, - file_descriptor_proto() + file_descriptor_proto(), ) }) } @@ -3734,9 +4131,7 @@ impl ::protobuf::Message for Metadata { fn default_instance() -> &'static Metadata { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Metadata::new) - } + unsafe { instance.get(Metadata::new) } } } @@ -3760,7 +4155,7 @@ impl ::protobuf::reflect::ProtobufValue for Metadata { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum MessageType { kMessageTypeHello = 1, kMessageTypeGoodbye = 2, @@ -3813,7 +4208,7 @@ impl ::protobuf::ProtobufEnum for MessageType { 35 => ::std::option::Option::Some(MessageType::kMessageTypeAction), 36 => ::std::option::Option::Some(MessageType::kMessageTypeRename), 128 => ::std::option::Option::Some(MessageType::kMessageTypeUpdateMetadata), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -3845,17 +4240,20 @@ impl ::protobuf::ProtobufEnum for MessageType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("MessageType", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "MessageType", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for MessageType { -} +impl ::std::marker::Copy for MessageType {} // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for MessageType { @@ -3870,7 +4268,7 @@ impl ::protobuf::reflect::ProtobufValue for MessageType { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum CapabilityType { kSupportedContexts = 1, kCanBePlayer = 2, @@ -3909,7 +4307,7 @@ impl ::protobuf::ProtobufEnum for CapabilityType { 12 => ::std::option::Option::Some(CapabilityType::kHidden), 13 => ::std::option::Option::Some(CapabilityType::kSupportsPlaylistV2), 14 => ::std::option::Option::Some(CapabilityType::kSupportsExternalEpisodes), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -3934,17 +4332,20 @@ impl ::protobuf::ProtobufEnum for CapabilityType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("CapabilityType", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "CapabilityType", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for CapabilityType { -} +impl ::std::marker::Copy for CapabilityType {} // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for CapabilityType { @@ -3959,7 +4360,7 @@ impl ::protobuf::reflect::ProtobufValue for CapabilityType { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum PlayStatus { kPlayStatusStop = 0, kPlayStatusPlay = 1, @@ -3978,7 +4379,7 @@ impl ::protobuf::ProtobufEnum for PlayStatus { 1 => ::std::option::Option::Some(PlayStatus::kPlayStatusPlay), 2 => ::std::option::Option::Some(PlayStatus::kPlayStatusPause), 3 => ::std::option::Option::Some(PlayStatus::kPlayStatusLoading), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } @@ -3993,17 +4394,20 @@ impl ::protobuf::ProtobufEnum for PlayStatus { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = + ::protobuf::lazy::Lazy::INIT; unsafe { descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("PlayStatus", file_descriptor_proto()) + ::protobuf::reflect::EnumDescriptor::new_pb_name::( + "PlayStatus", + file_descriptor_proto(), + ) }) } } } -impl ::std::marker::Copy for PlayStatus { -} +impl ::std::marker::Copy for PlayStatus {} impl ::std::default::Default for PlayStatus { fn default() -> Self { @@ -4086,16 +4490,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ se\x10\x02\x12\x16\n\x12kPlayStatusLoading\x10\x03\x1a\0B\0b\x06proto2\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy< + ::protobuf::descriptor::FileDescriptorProto, +> = ::protobuf::lazy::Lazy::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) } }