Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

run cargo fmt

+1274 -2530
+1240 -2506
cli/src/api/rockbox.v1alpha1.rs
··· 43 43 dead_code, 44 44 missing_docs, 45 45 clippy::wildcard_imports, 46 - clippy::let_unit_value, 46 + clippy::let_unit_value 47 47 )] 48 - use tonic::codegen::*; 49 48 use tonic::codegen::http::Uri; 49 + use tonic::codegen::*; 50 50 #[derive(Debug, Clone)] 51 51 pub struct BrowseServiceClient<T> { 52 52 inner: tonic::client::Grpc<T>, ··· 90 90 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 91 91 >, 92 92 >, 93 - <T as tonic::codegen::Service< 94 - http::Request<tonic::body::BoxBody>, 95 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 93 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 94 + Into<StdError> + std::marker::Send + std::marker::Sync, 96 95 { 97 96 BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) 98 97 } ··· 130 129 pub async fn tree_get_entries( 131 130 &mut self, 132 131 request: impl tonic::IntoRequest<super::TreeGetEntriesRequest>, 133 - ) -> std::result::Result< 134 - tonic::Response<super::TreeGetEntriesResponse>, 135 - tonic::Status, 136 - > { 137 - self.inner 138 - .ready() 139 - .await 140 - .map_err(|e| { 141 - tonic::Status::unknown( 142 - format!("Service was not ready: {}", e.into()), 143 - ) 144 - })?; 132 + ) -> std::result::Result<tonic::Response<super::TreeGetEntriesResponse>, tonic::Status> 133 + { 134 + self.inner.ready().await.map_err(|e| { 135 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 136 + })?; 145 137 let codec = tonic::codec::ProstCodec::default(); 146 138 let path = http::uri::PathAndQuery::from_static( 147 139 "/rockbox.v1alpha1.BrowseService/TreeGetEntries", 148 140 ); 149 141 let mut req = request.into_request(); 150 - req.extensions_mut() 151 - .insert( 152 - GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), 153 - ); 142 + req.extensions_mut().insert(GrpcMethod::new( 143 + "rockbox.v1alpha1.BrowseService", 144 + "TreeGetEntries", 145 + )); 154 146 self.inner.unary(req, path, codec).await 155 147 } 156 148 } ··· 162 154 dead_code, 163 155 missing_docs, 164 156 clippy::wildcard_imports, 165 - clippy::let_unit_value, 157 + clippy::let_unit_value 166 158 )] 167 159 use tonic::codegen::*; 168 160 /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. ··· 171 163 async fn tree_get_entries( 172 164 &self, 173 165 request: tonic::Request<super::TreeGetEntriesRequest>, 174 - ) -> std::result::Result< 175 - tonic::Response<super::TreeGetEntriesResponse>, 176 - tonic::Status, 177 - >; 166 + ) -> std::result::Result<tonic::Response<super::TreeGetEntriesResponse>, tonic::Status>; 178 167 } 179 168 #[derive(Debug)] 180 169 pub struct BrowseServiceServer<T> { ··· 197 186 max_encoding_message_size: None, 198 187 } 199 188 } 200 - pub fn with_interceptor<F>( 201 - inner: T, 202 - interceptor: F, 203 - ) -> InterceptedService<Self, F> 189 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 204 190 where 205 191 F: tonic::service::Interceptor, 206 192 { ··· 255 241 "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { 256 242 #[allow(non_camel_case_types)] 257 243 struct TreeGetEntriesSvc<T: BrowseService>(pub Arc<T>); 258 - impl< 259 - T: BrowseService, 260 - > tonic::server::UnaryService<super::TreeGetEntriesRequest> 261 - for TreeGetEntriesSvc<T> { 244 + impl<T: BrowseService> tonic::server::UnaryService<super::TreeGetEntriesRequest> 245 + for TreeGetEntriesSvc<T> 246 + { 262 247 type Response = super::TreeGetEntriesResponse; 263 - type Future = BoxFuture< 264 - tonic::Response<Self::Response>, 265 - tonic::Status, 266 - >; 248 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 267 249 fn call( 268 250 &mut self, 269 251 request: tonic::Request<super::TreeGetEntriesRequest>, 270 252 ) -> Self::Future { 271 253 let inner = Arc::clone(&self.0); 272 254 let fut = async move { 273 - <T as BrowseService>::tree_get_entries(&inner, request) 274 - .await 255 + <T as BrowseService>::tree_get_entries(&inner, request).await 275 256 }; 276 257 Box::pin(fut) 277 258 } ··· 298 279 }; 299 280 Box::pin(fut) 300 281 } 301 - _ => { 302 - Box::pin(async move { 303 - let mut response = http::Response::new(empty_body()); 304 - let headers = response.headers_mut(); 305 - headers 306 - .insert( 307 - tonic::Status::GRPC_STATUS, 308 - (tonic::Code::Unimplemented as i32).into(), 309 - ); 310 - headers 311 - .insert( 312 - http::header::CONTENT_TYPE, 313 - tonic::metadata::GRPC_CONTENT_TYPE, 314 - ); 315 - Ok(response) 316 - }) 317 - } 282 + _ => Box::pin(async move { 283 + let mut response = http::Response::new(empty_body()); 284 + let headers = response.headers_mut(); 285 + headers.insert( 286 + tonic::Status::GRPC_STATUS, 287 + (tonic::Code::Unimplemented as i32).into(), 288 + ); 289 + headers.insert( 290 + http::header::CONTENT_TYPE, 291 + tonic::metadata::GRPC_CONTENT_TYPE, 292 + ); 293 + Ok(response) 294 + }), 318 295 } 319 296 } 320 297 } ··· 550 527 dead_code, 551 528 missing_docs, 552 529 clippy::wildcard_imports, 553 - clippy::let_unit_value, 530 + clippy::let_unit_value 554 531 )] 555 - use tonic::codegen::*; 556 532 use tonic::codegen::http::Uri; 533 + use tonic::codegen::*; 557 534 #[derive(Debug, Clone)] 558 535 pub struct LibraryServiceClient<T> { 559 536 inner: tonic::client::Grpc<T>, ··· 597 574 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 598 575 >, 599 576 >, 600 - <T as tonic::codegen::Service< 601 - http::Request<tonic::body::BoxBody>, 602 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 577 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 578 + Into<StdError> + std::marker::Send + std::marker::Sync, 603 579 { 604 580 LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) 605 581 } ··· 637 613 pub async fn get_albums( 638 614 &mut self, 639 615 request: impl tonic::IntoRequest<super::GetAlbumsRequest>, 640 - ) -> std::result::Result< 641 - tonic::Response<super::GetAlbumsResponse>, 642 - tonic::Status, 643 - > { 644 - self.inner 645 - .ready() 646 - .await 647 - .map_err(|e| { 648 - tonic::Status::unknown( 649 - format!("Service was not ready: {}", e.into()), 650 - ) 651 - })?; 616 + ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status> { 617 + self.inner.ready().await.map_err(|e| { 618 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 619 + })?; 652 620 let codec = tonic::codec::ProstCodec::default(); 653 - let path = http::uri::PathAndQuery::from_static( 654 - "/rockbox.v1alpha1.LibraryService/GetAlbums", 655 - ); 621 + let path = 622 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); 656 623 let mut req = request.into_request(); 657 - req.extensions_mut() 658 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); 624 + req.extensions_mut().insert(GrpcMethod::new( 625 + "rockbox.v1alpha1.LibraryService", 626 + "GetAlbums", 627 + )); 659 628 self.inner.unary(req, path, codec).await 660 629 } 661 630 pub async fn get_artists( 662 631 &mut self, 663 632 request: impl tonic::IntoRequest<super::GetArtistsRequest>, 664 - ) -> std::result::Result< 665 - tonic::Response<super::GetArtistsResponse>, 666 - tonic::Status, 667 - > { 668 - self.inner 669 - .ready() 670 - .await 671 - .map_err(|e| { 672 - tonic::Status::unknown( 673 - format!("Service was not ready: {}", e.into()), 674 - ) 675 - })?; 633 + ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status> 634 + { 635 + self.inner.ready().await.map_err(|e| { 636 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 637 + })?; 676 638 let codec = tonic::codec::ProstCodec::default(); 677 - let path = http::uri::PathAndQuery::from_static( 678 - "/rockbox.v1alpha1.LibraryService/GetArtists", 679 - ); 639 + let path = 640 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); 680 641 let mut req = request.into_request(); 681 - req.extensions_mut() 682 - .insert( 683 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), 684 - ); 642 + req.extensions_mut().insert(GrpcMethod::new( 643 + "rockbox.v1alpha1.LibraryService", 644 + "GetArtists", 645 + )); 685 646 self.inner.unary(req, path, codec).await 686 647 } 687 648 pub async fn get_tracks( 688 649 &mut self, 689 650 request: impl tonic::IntoRequest<super::GetTracksRequest>, 690 - ) -> std::result::Result< 691 - tonic::Response<super::GetTracksResponse>, 692 - tonic::Status, 693 - > { 694 - self.inner 695 - .ready() 696 - .await 697 - .map_err(|e| { 698 - tonic::Status::unknown( 699 - format!("Service was not ready: {}", e.into()), 700 - ) 701 - })?; 651 + ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status> { 652 + self.inner.ready().await.map_err(|e| { 653 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 654 + })?; 702 655 let codec = tonic::codec::ProstCodec::default(); 703 - let path = http::uri::PathAndQuery::from_static( 704 - "/rockbox.v1alpha1.LibraryService/GetTracks", 705 - ); 656 + let path = 657 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); 706 658 let mut req = request.into_request(); 707 - req.extensions_mut() 708 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); 659 + req.extensions_mut().insert(GrpcMethod::new( 660 + "rockbox.v1alpha1.LibraryService", 661 + "GetTracks", 662 + )); 709 663 self.inner.unary(req, path, codec).await 710 664 } 711 665 pub async fn get_album( 712 666 &mut self, 713 667 request: impl tonic::IntoRequest<super::GetAlbumRequest>, 714 - ) -> std::result::Result< 715 - tonic::Response<super::GetAlbumResponse>, 716 - tonic::Status, 717 - > { 718 - self.inner 719 - .ready() 720 - .await 721 - .map_err(|e| { 722 - tonic::Status::unknown( 723 - format!("Service was not ready: {}", e.into()), 724 - ) 725 - })?; 668 + ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status> { 669 + self.inner.ready().await.map_err(|e| { 670 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 671 + })?; 726 672 let codec = tonic::codec::ProstCodec::default(); 727 - let path = http::uri::PathAndQuery::from_static( 728 - "/rockbox.v1alpha1.LibraryService/GetAlbum", 729 - ); 673 + let path = 674 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); 730 675 let mut req = request.into_request(); 731 - req.extensions_mut() 732 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); 676 + req.extensions_mut().insert(GrpcMethod::new( 677 + "rockbox.v1alpha1.LibraryService", 678 + "GetAlbum", 679 + )); 733 680 self.inner.unary(req, path, codec).await 734 681 } 735 682 pub async fn get_artist( 736 683 &mut self, 737 684 request: impl tonic::IntoRequest<super::GetArtistRequest>, 738 - ) -> std::result::Result< 739 - tonic::Response<super::GetArtistResponse>, 740 - tonic::Status, 741 - > { 742 - self.inner 743 - .ready() 744 - .await 745 - .map_err(|e| { 746 - tonic::Status::unknown( 747 - format!("Service was not ready: {}", e.into()), 748 - ) 749 - })?; 685 + ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status> { 686 + self.inner.ready().await.map_err(|e| { 687 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 688 + })?; 750 689 let codec = tonic::codec::ProstCodec::default(); 751 - let path = http::uri::PathAndQuery::from_static( 752 - "/rockbox.v1alpha1.LibraryService/GetArtist", 753 - ); 690 + let path = 691 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); 754 692 let mut req = request.into_request(); 755 - req.extensions_mut() 756 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); 693 + req.extensions_mut().insert(GrpcMethod::new( 694 + "rockbox.v1alpha1.LibraryService", 695 + "GetArtist", 696 + )); 757 697 self.inner.unary(req, path, codec).await 758 698 } 759 699 pub async fn get_track( 760 700 &mut self, 761 701 request: impl tonic::IntoRequest<super::GetTrackRequest>, 762 - ) -> std::result::Result< 763 - tonic::Response<super::GetTrackResponse>, 764 - tonic::Status, 765 - > { 766 - self.inner 767 - .ready() 768 - .await 769 - .map_err(|e| { 770 - tonic::Status::unknown( 771 - format!("Service was not ready: {}", e.into()), 772 - ) 773 - })?; 702 + ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status> { 703 + self.inner.ready().await.map_err(|e| { 704 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 705 + })?; 774 706 let codec = tonic::codec::ProstCodec::default(); 775 - let path = http::uri::PathAndQuery::from_static( 776 - "/rockbox.v1alpha1.LibraryService/GetTrack", 777 - ); 707 + let path = 708 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); 778 709 let mut req = request.into_request(); 779 - req.extensions_mut() 780 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); 710 + req.extensions_mut().insert(GrpcMethod::new( 711 + "rockbox.v1alpha1.LibraryService", 712 + "GetTrack", 713 + )); 781 714 self.inner.unary(req, path, codec).await 782 715 } 783 716 pub async fn like_track( 784 717 &mut self, 785 718 request: impl tonic::IntoRequest<super::LikeTrackRequest>, 786 - ) -> std::result::Result< 787 - tonic::Response<super::LikeTrackResponse>, 788 - tonic::Status, 789 - > { 790 - self.inner 791 - .ready() 792 - .await 793 - .map_err(|e| { 794 - tonic::Status::unknown( 795 - format!("Service was not ready: {}", e.into()), 796 - ) 797 - })?; 719 + ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status> { 720 + self.inner.ready().await.map_err(|e| { 721 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 722 + })?; 798 723 let codec = tonic::codec::ProstCodec::default(); 799 - let path = http::uri::PathAndQuery::from_static( 800 - "/rockbox.v1alpha1.LibraryService/LikeTrack", 801 - ); 724 + let path = 725 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); 802 726 let mut req = request.into_request(); 803 - req.extensions_mut() 804 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); 727 + req.extensions_mut().insert(GrpcMethod::new( 728 + "rockbox.v1alpha1.LibraryService", 729 + "LikeTrack", 730 + )); 805 731 self.inner.unary(req, path, codec).await 806 732 } 807 733 pub async fn unlike_track( 808 734 &mut self, 809 735 request: impl tonic::IntoRequest<super::UnlikeTrackRequest>, 810 - ) -> std::result::Result< 811 - tonic::Response<super::UnlikeTrackResponse>, 812 - tonic::Status, 813 - > { 814 - self.inner 815 - .ready() 816 - .await 817 - .map_err(|e| { 818 - tonic::Status::unknown( 819 - format!("Service was not ready: {}", e.into()), 820 - ) 821 - })?; 736 + ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status> 737 + { 738 + self.inner.ready().await.map_err(|e| { 739 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 740 + })?; 822 741 let codec = tonic::codec::ProstCodec::default(); 823 742 let path = http::uri::PathAndQuery::from_static( 824 743 "/rockbox.v1alpha1.LibraryService/UnlikeTrack", 825 744 ); 826 745 let mut req = request.into_request(); 827 - req.extensions_mut() 828 - .insert( 829 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), 830 - ); 746 + req.extensions_mut().insert(GrpcMethod::new( 747 + "rockbox.v1alpha1.LibraryService", 748 + "UnlikeTrack", 749 + )); 831 750 self.inner.unary(req, path, codec).await 832 751 } 833 752 pub async fn like_album( 834 753 &mut self, 835 754 request: impl tonic::IntoRequest<super::LikeAlbumRequest>, 836 - ) -> std::result::Result< 837 - tonic::Response<super::LikeAlbumResponse>, 838 - tonic::Status, 839 - > { 840 - self.inner 841 - .ready() 842 - .await 843 - .map_err(|e| { 844 - tonic::Status::unknown( 845 - format!("Service was not ready: {}", e.into()), 846 - ) 847 - })?; 755 + ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status> { 756 + self.inner.ready().await.map_err(|e| { 757 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 758 + })?; 848 759 let codec = tonic::codec::ProstCodec::default(); 849 - let path = http::uri::PathAndQuery::from_static( 850 - "/rockbox.v1alpha1.LibraryService/LikeAlbum", 851 - ); 760 + let path = 761 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); 852 762 let mut req = request.into_request(); 853 - req.extensions_mut() 854 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); 763 + req.extensions_mut().insert(GrpcMethod::new( 764 + "rockbox.v1alpha1.LibraryService", 765 + "LikeAlbum", 766 + )); 855 767 self.inner.unary(req, path, codec).await 856 768 } 857 769 pub async fn unlike_album( 858 770 &mut self, 859 771 request: impl tonic::IntoRequest<super::UnlikeAlbumRequest>, 860 - ) -> std::result::Result< 861 - tonic::Response<super::UnlikeAlbumResponse>, 862 - tonic::Status, 863 - > { 864 - self.inner 865 - .ready() 866 - .await 867 - .map_err(|e| { 868 - tonic::Status::unknown( 869 - format!("Service was not ready: {}", e.into()), 870 - ) 871 - })?; 772 + ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status> 773 + { 774 + self.inner.ready().await.map_err(|e| { 775 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 776 + })?; 872 777 let codec = tonic::codec::ProstCodec::default(); 873 778 let path = http::uri::PathAndQuery::from_static( 874 779 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", 875 780 ); 876 781 let mut req = request.into_request(); 877 - req.extensions_mut() 878 - .insert( 879 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), 880 - ); 782 + req.extensions_mut().insert(GrpcMethod::new( 783 + "rockbox.v1alpha1.LibraryService", 784 + "UnlikeAlbum", 785 + )); 881 786 self.inner.unary(req, path, codec).await 882 787 } 883 788 pub async fn get_liked_tracks( 884 789 &mut self, 885 790 request: impl tonic::IntoRequest<super::GetLikedTracksRequest>, 886 - ) -> std::result::Result< 887 - tonic::Response<super::GetLikedTracksResponse>, 888 - tonic::Status, 889 - > { 890 - self.inner 891 - .ready() 892 - .await 893 - .map_err(|e| { 894 - tonic::Status::unknown( 895 - format!("Service was not ready: {}", e.into()), 896 - ) 897 - })?; 791 + ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status> 792 + { 793 + self.inner.ready().await.map_err(|e| { 794 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 795 + })?; 898 796 let codec = tonic::codec::ProstCodec::default(); 899 797 let path = http::uri::PathAndQuery::from_static( 900 798 "/rockbox.v1alpha1.LibraryService/GetLikedTracks", 901 799 ); 902 800 let mut req = request.into_request(); 903 - req.extensions_mut() 904 - .insert( 905 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), 906 - ); 801 + req.extensions_mut().insert(GrpcMethod::new( 802 + "rockbox.v1alpha1.LibraryService", 803 + "GetLikedTracks", 804 + )); 907 805 self.inner.unary(req, path, codec).await 908 806 } 909 807 pub async fn get_liked_albums( 910 808 &mut self, 911 809 request: impl tonic::IntoRequest<super::GetLikedAlbumsRequest>, 912 - ) -> std::result::Result< 913 - tonic::Response<super::GetLikedAlbumsResponse>, 914 - tonic::Status, 915 - > { 916 - self.inner 917 - .ready() 918 - .await 919 - .map_err(|e| { 920 - tonic::Status::unknown( 921 - format!("Service was not ready: {}", e.into()), 922 - ) 923 - })?; 810 + ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status> 811 + { 812 + self.inner.ready().await.map_err(|e| { 813 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 814 + })?; 924 815 let codec = tonic::codec::ProstCodec::default(); 925 816 let path = http::uri::PathAndQuery::from_static( 926 817 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", 927 818 ); 928 819 let mut req = request.into_request(); 929 - req.extensions_mut() 930 - .insert( 931 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), 932 - ); 820 + req.extensions_mut().insert(GrpcMethod::new( 821 + "rockbox.v1alpha1.LibraryService", 822 + "GetLikedAlbums", 823 + )); 933 824 self.inner.unary(req, path, codec).await 934 825 } 935 826 pub async fn scan_library( 936 827 &mut self, 937 828 request: impl tonic::IntoRequest<super::ScanLibraryRequest>, 938 - ) -> std::result::Result< 939 - tonic::Response<super::ScanLibraryResponse>, 940 - tonic::Status, 941 - > { 942 - self.inner 943 - .ready() 944 - .await 945 - .map_err(|e| { 946 - tonic::Status::unknown( 947 - format!("Service was not ready: {}", e.into()), 948 - ) 949 - })?; 829 + ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status> 830 + { 831 + self.inner.ready().await.map_err(|e| { 832 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 833 + })?; 950 834 let codec = tonic::codec::ProstCodec::default(); 951 835 let path = http::uri::PathAndQuery::from_static( 952 836 "/rockbox.v1alpha1.LibraryService/ScanLibrary", 953 837 ); 954 838 let mut req = request.into_request(); 955 - req.extensions_mut() 956 - .insert( 957 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), 958 - ); 839 + req.extensions_mut().insert(GrpcMethod::new( 840 + "rockbox.v1alpha1.LibraryService", 841 + "ScanLibrary", 842 + )); 959 843 self.inner.unary(req, path, codec).await 960 844 } 961 845 pub async fn search( 962 846 &mut self, 963 847 request: impl tonic::IntoRequest<super::SearchRequest>, 964 848 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> { 965 - self.inner 966 - .ready() 967 - .await 968 - .map_err(|e| { 969 - tonic::Status::unknown( 970 - format!("Service was not ready: {}", e.into()), 971 - ) 972 - })?; 849 + self.inner.ready().await.map_err(|e| { 850 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 851 + })?; 973 852 let codec = tonic::codec::ProstCodec::default(); 974 - let path = http::uri::PathAndQuery::from_static( 975 - "/rockbox.v1alpha1.LibraryService/Search", 976 - ); 853 + let path = 854 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); 977 855 let mut req = request.into_request(); 978 856 req.extensions_mut() 979 857 .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); ··· 988 866 dead_code, 989 867 missing_docs, 990 868 clippy::wildcard_imports, 991 - clippy::let_unit_value, 869 + clippy::let_unit_value 992 870 )] 993 871 use tonic::codegen::*; 994 872 /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. ··· 997 875 async fn get_albums( 998 876 &self, 999 877 request: tonic::Request<super::GetAlbumsRequest>, 1000 - ) -> std::result::Result< 1001 - tonic::Response<super::GetAlbumsResponse>, 1002 - tonic::Status, 1003 - >; 878 + ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status>; 1004 879 async fn get_artists( 1005 880 &self, 1006 881 request: tonic::Request<super::GetArtistsRequest>, 1007 - ) -> std::result::Result< 1008 - tonic::Response<super::GetArtistsResponse>, 1009 - tonic::Status, 1010 - >; 882 + ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status>; 1011 883 async fn get_tracks( 1012 884 &self, 1013 885 request: tonic::Request<super::GetTracksRequest>, 1014 - ) -> std::result::Result< 1015 - tonic::Response<super::GetTracksResponse>, 1016 - tonic::Status, 1017 - >; 886 + ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status>; 1018 887 async fn get_album( 1019 888 &self, 1020 889 request: tonic::Request<super::GetAlbumRequest>, 1021 - ) -> std::result::Result< 1022 - tonic::Response<super::GetAlbumResponse>, 1023 - tonic::Status, 1024 - >; 890 + ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status>; 1025 891 async fn get_artist( 1026 892 &self, 1027 893 request: tonic::Request<super::GetArtistRequest>, 1028 - ) -> std::result::Result< 1029 - tonic::Response<super::GetArtistResponse>, 1030 - tonic::Status, 1031 - >; 894 + ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status>; 1032 895 async fn get_track( 1033 896 &self, 1034 897 request: tonic::Request<super::GetTrackRequest>, 1035 - ) -> std::result::Result< 1036 - tonic::Response<super::GetTrackResponse>, 1037 - tonic::Status, 1038 - >; 898 + ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status>; 1039 899 async fn like_track( 1040 900 &self, 1041 901 request: tonic::Request<super::LikeTrackRequest>, 1042 - ) -> std::result::Result< 1043 - tonic::Response<super::LikeTrackResponse>, 1044 - tonic::Status, 1045 - >; 902 + ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status>; 1046 903 async fn unlike_track( 1047 904 &self, 1048 905 request: tonic::Request<super::UnlikeTrackRequest>, 1049 - ) -> std::result::Result< 1050 - tonic::Response<super::UnlikeTrackResponse>, 1051 - tonic::Status, 1052 - >; 906 + ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status>; 1053 907 async fn like_album( 1054 908 &self, 1055 909 request: tonic::Request<super::LikeAlbumRequest>, 1056 - ) -> std::result::Result< 1057 - tonic::Response<super::LikeAlbumResponse>, 1058 - tonic::Status, 1059 - >; 910 + ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status>; 1060 911 async fn unlike_album( 1061 912 &self, 1062 913 request: tonic::Request<super::UnlikeAlbumRequest>, 1063 - ) -> std::result::Result< 1064 - tonic::Response<super::UnlikeAlbumResponse>, 1065 - tonic::Status, 1066 - >; 914 + ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status>; 1067 915 async fn get_liked_tracks( 1068 916 &self, 1069 917 request: tonic::Request<super::GetLikedTracksRequest>, 1070 - ) -> std::result::Result< 1071 - tonic::Response<super::GetLikedTracksResponse>, 1072 - tonic::Status, 1073 - >; 918 + ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status>; 1074 919 async fn get_liked_albums( 1075 920 &self, 1076 921 request: tonic::Request<super::GetLikedAlbumsRequest>, 1077 - ) -> std::result::Result< 1078 - tonic::Response<super::GetLikedAlbumsResponse>, 1079 - tonic::Status, 1080 - >; 922 + ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status>; 1081 923 async fn scan_library( 1082 924 &self, 1083 925 request: tonic::Request<super::ScanLibraryRequest>, 1084 - ) -> std::result::Result< 1085 - tonic::Response<super::ScanLibraryResponse>, 1086 - tonic::Status, 1087 - >; 926 + ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status>; 1088 927 async fn search( 1089 928 &self, 1090 929 request: tonic::Request<super::SearchRequest>, ··· 1111 950 max_encoding_message_size: None, 1112 951 } 1113 952 } 1114 - pub fn with_interceptor<F>( 1115 - inner: T, 1116 - interceptor: F, 1117 - ) -> InterceptedService<Self, F> 953 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 1118 954 where 1119 955 F: tonic::service::Interceptor, 1120 956 { ··· 1169 1005 "/rockbox.v1alpha1.LibraryService/GetAlbums" => { 1170 1006 #[allow(non_camel_case_types)] 1171 1007 struct GetAlbumsSvc<T: LibraryService>(pub Arc<T>); 1172 - impl< 1173 - T: LibraryService, 1174 - > tonic::server::UnaryService<super::GetAlbumsRequest> 1175 - for GetAlbumsSvc<T> { 1008 + impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumsRequest> for GetAlbumsSvc<T> { 1176 1009 type Response = super::GetAlbumsResponse; 1177 - type Future = BoxFuture< 1178 - tonic::Response<Self::Response>, 1179 - tonic::Status, 1180 - >; 1010 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1181 1011 fn call( 1182 1012 &mut self, 1183 1013 request: tonic::Request<super::GetAlbumsRequest>, ··· 1214 1044 "/rockbox.v1alpha1.LibraryService/GetArtists" => { 1215 1045 #[allow(non_camel_case_types)] 1216 1046 struct GetArtistsSvc<T: LibraryService>(pub Arc<T>); 1217 - impl< 1218 - T: LibraryService, 1219 - > tonic::server::UnaryService<super::GetArtistsRequest> 1220 - for GetArtistsSvc<T> { 1047 + impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistsRequest> for GetArtistsSvc<T> { 1221 1048 type Response = super::GetArtistsResponse; 1222 - type Future = BoxFuture< 1223 - tonic::Response<Self::Response>, 1224 - tonic::Status, 1225 - >; 1049 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1226 1050 fn call( 1227 1051 &mut self, 1228 1052 request: tonic::Request<super::GetArtistsRequest>, ··· 1259 1083 "/rockbox.v1alpha1.LibraryService/GetTracks" => { 1260 1084 #[allow(non_camel_case_types)] 1261 1085 struct GetTracksSvc<T: LibraryService>(pub Arc<T>); 1262 - impl< 1263 - T: LibraryService, 1264 - > tonic::server::UnaryService<super::GetTracksRequest> 1265 - for GetTracksSvc<T> { 1086 + impl<T: LibraryService> tonic::server::UnaryService<super::GetTracksRequest> for GetTracksSvc<T> { 1266 1087 type Response = super::GetTracksResponse; 1267 - type Future = BoxFuture< 1268 - tonic::Response<Self::Response>, 1269 - tonic::Status, 1270 - >; 1088 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1271 1089 fn call( 1272 1090 &mut self, 1273 1091 request: tonic::Request<super::GetTracksRequest>, ··· 1304 1122 "/rockbox.v1alpha1.LibraryService/GetAlbum" => { 1305 1123 #[allow(non_camel_case_types)] 1306 1124 struct GetAlbumSvc<T: LibraryService>(pub Arc<T>); 1307 - impl< 1308 - T: LibraryService, 1309 - > tonic::server::UnaryService<super::GetAlbumRequest> 1310 - for GetAlbumSvc<T> { 1125 + impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumRequest> for GetAlbumSvc<T> { 1311 1126 type Response = super::GetAlbumResponse; 1312 - type Future = BoxFuture< 1313 - tonic::Response<Self::Response>, 1314 - tonic::Status, 1315 - >; 1127 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1316 1128 fn call( 1317 1129 &mut self, 1318 1130 request: tonic::Request<super::GetAlbumRequest>, ··· 1349 1161 "/rockbox.v1alpha1.LibraryService/GetArtist" => { 1350 1162 #[allow(non_camel_case_types)] 1351 1163 struct GetArtistSvc<T: LibraryService>(pub Arc<T>); 1352 - impl< 1353 - T: LibraryService, 1354 - > tonic::server::UnaryService<super::GetArtistRequest> 1355 - for GetArtistSvc<T> { 1164 + impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistRequest> for GetArtistSvc<T> { 1356 1165 type Response = super::GetArtistResponse; 1357 - type Future = BoxFuture< 1358 - tonic::Response<Self::Response>, 1359 - tonic::Status, 1360 - >; 1166 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1361 1167 fn call( 1362 1168 &mut self, 1363 1169 request: tonic::Request<super::GetArtistRequest>, ··· 1394 1200 "/rockbox.v1alpha1.LibraryService/GetTrack" => { 1395 1201 #[allow(non_camel_case_types)] 1396 1202 struct GetTrackSvc<T: LibraryService>(pub Arc<T>); 1397 - impl< 1398 - T: LibraryService, 1399 - > tonic::server::UnaryService<super::GetTrackRequest> 1400 - for GetTrackSvc<T> { 1203 + impl<T: LibraryService> tonic::server::UnaryService<super::GetTrackRequest> for GetTrackSvc<T> { 1401 1204 type Response = super::GetTrackResponse; 1402 - type Future = BoxFuture< 1403 - tonic::Response<Self::Response>, 1404 - tonic::Status, 1405 - >; 1205 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1406 1206 fn call( 1407 1207 &mut self, 1408 1208 request: tonic::Request<super::GetTrackRequest>, ··· 1439 1239 "/rockbox.v1alpha1.LibraryService/LikeTrack" => { 1440 1240 #[allow(non_camel_case_types)] 1441 1241 struct LikeTrackSvc<T: LibraryService>(pub Arc<T>); 1442 - impl< 1443 - T: LibraryService, 1444 - > tonic::server::UnaryService<super::LikeTrackRequest> 1445 - for LikeTrackSvc<T> { 1242 + impl<T: LibraryService> tonic::server::UnaryService<super::LikeTrackRequest> for LikeTrackSvc<T> { 1446 1243 type Response = super::LikeTrackResponse; 1447 - type Future = BoxFuture< 1448 - tonic::Response<Self::Response>, 1449 - tonic::Status, 1450 - >; 1244 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1451 1245 fn call( 1452 1246 &mut self, 1453 1247 request: tonic::Request<super::LikeTrackRequest>, ··· 1484 1278 "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { 1485 1279 #[allow(non_camel_case_types)] 1486 1280 struct UnlikeTrackSvc<T: LibraryService>(pub Arc<T>); 1487 - impl< 1488 - T: LibraryService, 1489 - > tonic::server::UnaryService<super::UnlikeTrackRequest> 1490 - for UnlikeTrackSvc<T> { 1281 + impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeTrackRequest> 1282 + for UnlikeTrackSvc<T> 1283 + { 1491 1284 type Response = super::UnlikeTrackResponse; 1492 - type Future = BoxFuture< 1493 - tonic::Response<Self::Response>, 1494 - tonic::Status, 1495 - >; 1285 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1496 1286 fn call( 1497 1287 &mut self, 1498 1288 request: tonic::Request<super::UnlikeTrackRequest>, ··· 1529 1319 "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { 1530 1320 #[allow(non_camel_case_types)] 1531 1321 struct LikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1532 - impl< 1533 - T: LibraryService, 1534 - > tonic::server::UnaryService<super::LikeAlbumRequest> 1535 - for LikeAlbumSvc<T> { 1322 + impl<T: LibraryService> tonic::server::UnaryService<super::LikeAlbumRequest> for LikeAlbumSvc<T> { 1536 1323 type Response = super::LikeAlbumResponse; 1537 - type Future = BoxFuture< 1538 - tonic::Response<Self::Response>, 1539 - tonic::Status, 1540 - >; 1324 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1541 1325 fn call( 1542 1326 &mut self, 1543 1327 request: tonic::Request<super::LikeAlbumRequest>, ··· 1574 1358 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { 1575 1359 #[allow(non_camel_case_types)] 1576 1360 struct UnlikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1577 - impl< 1578 - T: LibraryService, 1579 - > tonic::server::UnaryService<super::UnlikeAlbumRequest> 1580 - for UnlikeAlbumSvc<T> { 1361 + impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeAlbumRequest> 1362 + for UnlikeAlbumSvc<T> 1363 + { 1581 1364 type Response = super::UnlikeAlbumResponse; 1582 - type Future = BoxFuture< 1583 - tonic::Response<Self::Response>, 1584 - tonic::Status, 1585 - >; 1365 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1586 1366 fn call( 1587 1367 &mut self, 1588 1368 request: tonic::Request<super::UnlikeAlbumRequest>, ··· 1619 1399 "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { 1620 1400 #[allow(non_camel_case_types)] 1621 1401 struct GetLikedTracksSvc<T: LibraryService>(pub Arc<T>); 1622 - impl< 1623 - T: LibraryService, 1624 - > tonic::server::UnaryService<super::GetLikedTracksRequest> 1625 - for GetLikedTracksSvc<T> { 1402 + impl<T: LibraryService> 1403 + tonic::server::UnaryService<super::GetLikedTracksRequest> 1404 + for GetLikedTracksSvc<T> 1405 + { 1626 1406 type Response = super::GetLikedTracksResponse; 1627 - type Future = BoxFuture< 1628 - tonic::Response<Self::Response>, 1629 - tonic::Status, 1630 - >; 1407 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1631 1408 fn call( 1632 1409 &mut self, 1633 1410 request: tonic::Request<super::GetLikedTracksRequest>, 1634 1411 ) -> Self::Future { 1635 1412 let inner = Arc::clone(&self.0); 1636 1413 let fut = async move { 1637 - <T as LibraryService>::get_liked_tracks(&inner, request) 1638 - .await 1414 + <T as LibraryService>::get_liked_tracks(&inner, request).await 1639 1415 }; 1640 1416 Box::pin(fut) 1641 1417 } ··· 1665 1441 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { 1666 1442 #[allow(non_camel_case_types)] 1667 1443 struct GetLikedAlbumsSvc<T: LibraryService>(pub Arc<T>); 1668 - impl< 1669 - T: LibraryService, 1670 - > tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1671 - for GetLikedAlbumsSvc<T> { 1444 + impl<T: LibraryService> 1445 + tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1446 + for GetLikedAlbumsSvc<T> 1447 + { 1672 1448 type Response = super::GetLikedAlbumsResponse; 1673 - type Future = BoxFuture< 1674 - tonic::Response<Self::Response>, 1675 - tonic::Status, 1676 - >; 1449 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1677 1450 fn call( 1678 1451 &mut self, 1679 1452 request: tonic::Request<super::GetLikedAlbumsRequest>, 1680 1453 ) -> Self::Future { 1681 1454 let inner = Arc::clone(&self.0); 1682 1455 let fut = async move { 1683 - <T as LibraryService>::get_liked_albums(&inner, request) 1684 - .await 1456 + <T as LibraryService>::get_liked_albums(&inner, request).await 1685 1457 }; 1686 1458 Box::pin(fut) 1687 1459 } ··· 1711 1483 "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { 1712 1484 #[allow(non_camel_case_types)] 1713 1485 struct ScanLibrarySvc<T: LibraryService>(pub Arc<T>); 1714 - impl< 1715 - T: LibraryService, 1716 - > tonic::server::UnaryService<super::ScanLibraryRequest> 1717 - for ScanLibrarySvc<T> { 1486 + impl<T: LibraryService> tonic::server::UnaryService<super::ScanLibraryRequest> 1487 + for ScanLibrarySvc<T> 1488 + { 1718 1489 type Response = super::ScanLibraryResponse; 1719 - type Future = BoxFuture< 1720 - tonic::Response<Self::Response>, 1721 - tonic::Status, 1722 - >; 1490 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1723 1491 fn call( 1724 1492 &mut self, 1725 1493 request: tonic::Request<super::ScanLibraryRequest>, ··· 1756 1524 "/rockbox.v1alpha1.LibraryService/Search" => { 1757 1525 #[allow(non_camel_case_types)] 1758 1526 struct SearchSvc<T: LibraryService>(pub Arc<T>); 1759 - impl< 1760 - T: LibraryService, 1761 - > tonic::server::UnaryService<super::SearchRequest> 1762 - for SearchSvc<T> { 1527 + impl<T: LibraryService> tonic::server::UnaryService<super::SearchRequest> for SearchSvc<T> { 1763 1528 type Response = super::SearchResponse; 1764 - type Future = BoxFuture< 1765 - tonic::Response<Self::Response>, 1766 - tonic::Status, 1767 - >; 1529 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1768 1530 fn call( 1769 1531 &mut self, 1770 1532 request: tonic::Request<super::SearchRequest>, 1771 1533 ) -> Self::Future { 1772 1534 let inner = Arc::clone(&self.0); 1773 - let fut = async move { 1774 - <T as LibraryService>::search(&inner, request).await 1775 - }; 1535 + let fut = 1536 + async move { <T as LibraryService>::search(&inner, request).await }; 1776 1537 Box::pin(fut) 1777 1538 } 1778 1539 } ··· 1798 1559 }; 1799 1560 Box::pin(fut) 1800 1561 } 1801 - _ => { 1802 - Box::pin(async move { 1803 - let mut response = http::Response::new(empty_body()); 1804 - let headers = response.headers_mut(); 1805 - headers 1806 - .insert( 1807 - tonic::Status::GRPC_STATUS, 1808 - (tonic::Code::Unimplemented as i32).into(), 1809 - ); 1810 - headers 1811 - .insert( 1812 - http::header::CONTENT_TYPE, 1813 - tonic::metadata::GRPC_CONTENT_TYPE, 1814 - ); 1815 - Ok(response) 1816 - }) 1817 - } 1562 + _ => Box::pin(async move { 1563 + let mut response = http::Response::new(empty_body()); 1564 + let headers = response.headers_mut(); 1565 + headers.insert( 1566 + tonic::Status::GRPC_STATUS, 1567 + (tonic::Code::Unimplemented as i32).into(), 1568 + ); 1569 + headers.insert( 1570 + http::header::CONTENT_TYPE, 1571 + tonic::metadata::GRPC_CONTENT_TYPE, 1572 + ); 1573 + Ok(response) 1574 + }), 1818 1575 } 1819 1576 } 1820 1577 } ··· 1843 1600 dead_code, 1844 1601 missing_docs, 1845 1602 clippy::wildcard_imports, 1846 - clippy::let_unit_value, 1603 + clippy::let_unit_value 1847 1604 )] 1848 - use tonic::codegen::*; 1849 1605 use tonic::codegen::http::Uri; 1606 + use tonic::codegen::*; 1850 1607 #[derive(Debug, Clone)] 1851 1608 pub struct MetadataServiceClient<T> { 1852 1609 inner: tonic::client::Grpc<T>, ··· 1890 1647 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 1891 1648 >, 1892 1649 >, 1893 - <T as tonic::codegen::Service< 1894 - http::Request<tonic::body::BoxBody>, 1895 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 1650 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 1651 + Into<StdError> + std::marker::Send + std::marker::Sync, 1896 1652 { 1897 1653 MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) 1898 1654 } ··· 1936 1692 dead_code, 1937 1693 missing_docs, 1938 1694 clippy::wildcard_imports, 1939 - clippy::let_unit_value, 1695 + clippy::let_unit_value 1940 1696 )] 1941 1697 use tonic::codegen::*; 1942 1698 /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. ··· 1963 1719 max_encoding_message_size: None, 1964 1720 } 1965 1721 } 1966 - pub fn with_interceptor<F>( 1967 - inner: T, 1968 - interceptor: F, 1969 - ) -> InterceptedService<Self, F> 1722 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 1970 1723 where 1971 1724 F: tonic::service::Interceptor, 1972 1725 { ··· 2018 1771 } 2019 1772 fn call(&mut self, req: http::Request<B>) -> Self::Future { 2020 1773 match req.uri().path() { 2021 - _ => { 2022 - Box::pin(async move { 2023 - let mut response = http::Response::new(empty_body()); 2024 - let headers = response.headers_mut(); 2025 - headers 2026 - .insert( 2027 - tonic::Status::GRPC_STATUS, 2028 - (tonic::Code::Unimplemented as i32).into(), 2029 - ); 2030 - headers 2031 - .insert( 2032 - http::header::CONTENT_TYPE, 2033 - tonic::metadata::GRPC_CONTENT_TYPE, 2034 - ); 2035 - Ok(response) 2036 - }) 2037 - } 1774 + _ => Box::pin(async move { 1775 + let mut response = http::Response::new(empty_body()); 1776 + let headers = response.headers_mut(); 1777 + headers.insert( 1778 + tonic::Status::GRPC_STATUS, 1779 + (tonic::Code::Unimplemented as i32).into(), 1780 + ); 1781 + headers.insert( 1782 + http::header::CONTENT_TYPE, 1783 + tonic::metadata::GRPC_CONTENT_TYPE, 1784 + ); 1785 + Ok(response) 1786 + }), 2038 1787 } 2039 1788 } 2040 1789 } ··· 2318 2067 dead_code, 2319 2068 missing_docs, 2320 2069 clippy::wildcard_imports, 2321 - clippy::let_unit_value, 2070 + clippy::let_unit_value 2322 2071 )] 2323 - use tonic::codegen::*; 2324 2072 use tonic::codegen::http::Uri; 2073 + use tonic::codegen::*; 2325 2074 #[derive(Debug, Clone)] 2326 2075 pub struct PlaybackServiceClient<T> { 2327 2076 inner: tonic::client::Grpc<T>, ··· 2365 2114 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 2366 2115 >, 2367 2116 >, 2368 - <T as tonic::codegen::Service< 2369 - http::Request<tonic::body::BoxBody>, 2370 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 2117 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 2118 + Into<StdError> + std::marker::Send + std::marker::Sync, 2371 2119 { 2372 2120 PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) 2373 2121 } ··· 2406 2154 &mut self, 2407 2155 request: impl tonic::IntoRequest<super::PlayRequest>, 2408 2156 ) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> { 2409 - self.inner 2410 - .ready() 2411 - .await 2412 - .map_err(|e| { 2413 - tonic::Status::unknown( 2414 - format!("Service was not ready: {}", e.into()), 2415 - ) 2416 - })?; 2157 + self.inner.ready().await.map_err(|e| { 2158 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2159 + })?; 2417 2160 let codec = tonic::codec::ProstCodec::default(); 2418 - let path = http::uri::PathAndQuery::from_static( 2419 - "/rockbox.v1alpha1.PlaybackService/Play", 2420 - ); 2161 + let path = 2162 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); 2421 2163 let mut req = request.into_request(); 2422 2164 req.extensions_mut() 2423 2165 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); ··· 2427 2169 &mut self, 2428 2170 request: impl tonic::IntoRequest<super::PauseRequest>, 2429 2171 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> { 2430 - self.inner 2431 - .ready() 2432 - .await 2433 - .map_err(|e| { 2434 - tonic::Status::unknown( 2435 - format!("Service was not ready: {}", e.into()), 2436 - ) 2437 - })?; 2172 + self.inner.ready().await.map_err(|e| { 2173 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2174 + })?; 2438 2175 let codec = tonic::codec::ProstCodec::default(); 2439 - let path = http::uri::PathAndQuery::from_static( 2440 - "/rockbox.v1alpha1.PlaybackService/Pause", 2441 - ); 2176 + let path = 2177 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); 2442 2178 let mut req = request.into_request(); 2443 2179 req.extensions_mut() 2444 2180 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); ··· 2447 2183 pub async fn play_or_pause( 2448 2184 &mut self, 2449 2185 request: impl tonic::IntoRequest<super::PlayOrPauseRequest>, 2450 - ) -> std::result::Result< 2451 - tonic::Response<super::PlayOrPauseResponse>, 2452 - tonic::Status, 2453 - > { 2454 - self.inner 2455 - .ready() 2456 - .await 2457 - .map_err(|e| { 2458 - tonic::Status::unknown( 2459 - format!("Service was not ready: {}", e.into()), 2460 - ) 2461 - })?; 2186 + ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status> 2187 + { 2188 + self.inner.ready().await.map_err(|e| { 2189 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2190 + })?; 2462 2191 let codec = tonic::codec::ProstCodec::default(); 2463 2192 let path = http::uri::PathAndQuery::from_static( 2464 2193 "/rockbox.v1alpha1.PlaybackService/PlayOrPause", 2465 2194 ); 2466 2195 let mut req = request.into_request(); 2467 - req.extensions_mut() 2468 - .insert( 2469 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), 2470 - ); 2196 + req.extensions_mut().insert(GrpcMethod::new( 2197 + "rockbox.v1alpha1.PlaybackService", 2198 + "PlayOrPause", 2199 + )); 2471 2200 self.inner.unary(req, path, codec).await 2472 2201 } 2473 2202 pub async fn resume( 2474 2203 &mut self, 2475 2204 request: impl tonic::IntoRequest<super::ResumeRequest>, 2476 2205 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> { 2477 - self.inner 2478 - .ready() 2479 - .await 2480 - .map_err(|e| { 2481 - tonic::Status::unknown( 2482 - format!("Service was not ready: {}", e.into()), 2483 - ) 2484 - })?; 2206 + self.inner.ready().await.map_err(|e| { 2207 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2208 + })?; 2485 2209 let codec = tonic::codec::ProstCodec::default(); 2486 - let path = http::uri::PathAndQuery::from_static( 2487 - "/rockbox.v1alpha1.PlaybackService/Resume", 2488 - ); 2210 + let path = 2211 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); 2489 2212 let mut req = request.into_request(); 2490 - req.extensions_mut() 2491 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); 2213 + req.extensions_mut().insert(GrpcMethod::new( 2214 + "rockbox.v1alpha1.PlaybackService", 2215 + "Resume", 2216 + )); 2492 2217 self.inner.unary(req, path, codec).await 2493 2218 } 2494 2219 pub async fn next( 2495 2220 &mut self, 2496 2221 request: impl tonic::IntoRequest<super::NextRequest>, 2497 2222 ) -> std::result::Result<tonic::Response<super::NextResponse>, tonic::Status> { 2498 - self.inner 2499 - .ready() 2500 - .await 2501 - .map_err(|e| { 2502 - tonic::Status::unknown( 2503 - format!("Service was not ready: {}", e.into()), 2504 - ) 2505 - })?; 2223 + self.inner.ready().await.map_err(|e| { 2224 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2225 + })?; 2506 2226 let codec = tonic::codec::ProstCodec::default(); 2507 - let path = http::uri::PathAndQuery::from_static( 2508 - "/rockbox.v1alpha1.PlaybackService/Next", 2509 - ); 2227 + let path = 2228 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); 2510 2229 let mut req = request.into_request(); 2511 2230 req.extensions_mut() 2512 2231 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); ··· 2515 2234 pub async fn previous( 2516 2235 &mut self, 2517 2236 request: impl tonic::IntoRequest<super::PreviousRequest>, 2518 - ) -> std::result::Result< 2519 - tonic::Response<super::PreviousResponse>, 2520 - tonic::Status, 2521 - > { 2522 - self.inner 2523 - .ready() 2524 - .await 2525 - .map_err(|e| { 2526 - tonic::Status::unknown( 2527 - format!("Service was not ready: {}", e.into()), 2528 - ) 2529 - })?; 2237 + ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status> { 2238 + self.inner.ready().await.map_err(|e| { 2239 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2240 + })?; 2530 2241 let codec = tonic::codec::ProstCodec::default(); 2531 - let path = http::uri::PathAndQuery::from_static( 2532 - "/rockbox.v1alpha1.PlaybackService/Previous", 2533 - ); 2242 + let path = 2243 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); 2534 2244 let mut req = request.into_request(); 2535 - req.extensions_mut() 2536 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); 2245 + req.extensions_mut().insert(GrpcMethod::new( 2246 + "rockbox.v1alpha1.PlaybackService", 2247 + "Previous", 2248 + )); 2537 2249 self.inner.unary(req, path, codec).await 2538 2250 } 2539 2251 pub async fn fast_forward_rewind( 2540 2252 &mut self, 2541 2253 request: impl tonic::IntoRequest<super::FastForwardRewindRequest>, 2542 - ) -> std::result::Result< 2543 - tonic::Response<super::FastForwardRewindResponse>, 2544 - tonic::Status, 2545 - > { 2546 - self.inner 2547 - .ready() 2548 - .await 2549 - .map_err(|e| { 2550 - tonic::Status::unknown( 2551 - format!("Service was not ready: {}", e.into()), 2552 - ) 2553 - })?; 2254 + ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status> 2255 + { 2256 + self.inner.ready().await.map_err(|e| { 2257 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2258 + })?; 2554 2259 let codec = tonic::codec::ProstCodec::default(); 2555 2260 let path = http::uri::PathAndQuery::from_static( 2556 2261 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", 2557 2262 ); 2558 2263 let mut req = request.into_request(); 2559 - req.extensions_mut() 2560 - .insert( 2561 - GrpcMethod::new( 2562 - "rockbox.v1alpha1.PlaybackService", 2563 - "FastForwardRewind", 2564 - ), 2565 - ); 2264 + req.extensions_mut().insert(GrpcMethod::new( 2265 + "rockbox.v1alpha1.PlaybackService", 2266 + "FastForwardRewind", 2267 + )); 2566 2268 self.inner.unary(req, path, codec).await 2567 2269 } 2568 2270 pub async fn status( 2569 2271 &mut self, 2570 2272 request: impl tonic::IntoRequest<super::StatusRequest>, 2571 2273 ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status> { 2572 - self.inner 2573 - .ready() 2574 - .await 2575 - .map_err(|e| { 2576 - tonic::Status::unknown( 2577 - format!("Service was not ready: {}", e.into()), 2578 - ) 2579 - })?; 2274 + self.inner.ready().await.map_err(|e| { 2275 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2276 + })?; 2580 2277 let codec = tonic::codec::ProstCodec::default(); 2581 - let path = http::uri::PathAndQuery::from_static( 2582 - "/rockbox.v1alpha1.PlaybackService/Status", 2583 - ); 2278 + let path = 2279 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); 2584 2280 let mut req = request.into_request(); 2585 - req.extensions_mut() 2586 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); 2281 + req.extensions_mut().insert(GrpcMethod::new( 2282 + "rockbox.v1alpha1.PlaybackService", 2283 + "Status", 2284 + )); 2587 2285 self.inner.unary(req, path, codec).await 2588 2286 } 2589 2287 pub async fn current_track( 2590 2288 &mut self, 2591 2289 request: impl tonic::IntoRequest<super::CurrentTrackRequest>, 2592 - ) -> std::result::Result< 2593 - tonic::Response<super::CurrentTrackResponse>, 2594 - tonic::Status, 2595 - > { 2596 - self.inner 2597 - .ready() 2598 - .await 2599 - .map_err(|e| { 2600 - tonic::Status::unknown( 2601 - format!("Service was not ready: {}", e.into()), 2602 - ) 2603 - })?; 2290 + ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status> 2291 + { 2292 + self.inner.ready().await.map_err(|e| { 2293 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2294 + })?; 2604 2295 let codec = tonic::codec::ProstCodec::default(); 2605 2296 let path = http::uri::PathAndQuery::from_static( 2606 2297 "/rockbox.v1alpha1.PlaybackService/CurrentTrack", 2607 2298 ); 2608 2299 let mut req = request.into_request(); 2609 - req.extensions_mut() 2610 - .insert( 2611 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), 2612 - ); 2300 + req.extensions_mut().insert(GrpcMethod::new( 2301 + "rockbox.v1alpha1.PlaybackService", 2302 + "CurrentTrack", 2303 + )); 2613 2304 self.inner.unary(req, path, codec).await 2614 2305 } 2615 2306 pub async fn next_track( 2616 2307 &mut self, 2617 2308 request: impl tonic::IntoRequest<super::NextTrackRequest>, 2618 - ) -> std::result::Result< 2619 - tonic::Response<super::NextTrackResponse>, 2620 - tonic::Status, 2621 - > { 2622 - self.inner 2623 - .ready() 2624 - .await 2625 - .map_err(|e| { 2626 - tonic::Status::unknown( 2627 - format!("Service was not ready: {}", e.into()), 2628 - ) 2629 - })?; 2309 + ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status> { 2310 + self.inner.ready().await.map_err(|e| { 2311 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2312 + })?; 2630 2313 let codec = tonic::codec::ProstCodec::default(); 2631 - let path = http::uri::PathAndQuery::from_static( 2632 - "/rockbox.v1alpha1.PlaybackService/NextTrack", 2633 - ); 2314 + let path = 2315 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); 2634 2316 let mut req = request.into_request(); 2635 - req.extensions_mut() 2636 - .insert( 2637 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), 2638 - ); 2317 + req.extensions_mut().insert(GrpcMethod::new( 2318 + "rockbox.v1alpha1.PlaybackService", 2319 + "NextTrack", 2320 + )); 2639 2321 self.inner.unary(req, path, codec).await 2640 2322 } 2641 2323 pub async fn flush_and_reload_tracks( 2642 2324 &mut self, 2643 2325 request: impl tonic::IntoRequest<super::FlushAndReloadTracksRequest>, 2644 - ) -> std::result::Result< 2645 - tonic::Response<super::FlushAndReloadTracksResponse>, 2646 - tonic::Status, 2647 - > { 2648 - self.inner 2649 - .ready() 2650 - .await 2651 - .map_err(|e| { 2652 - tonic::Status::unknown( 2653 - format!("Service was not ready: {}", e.into()), 2654 - ) 2655 - })?; 2326 + ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status> 2327 + { 2328 + self.inner.ready().await.map_err(|e| { 2329 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2330 + })?; 2656 2331 let codec = tonic::codec::ProstCodec::default(); 2657 2332 let path = http::uri::PathAndQuery::from_static( 2658 2333 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", 2659 2334 ); 2660 2335 let mut req = request.into_request(); 2661 - req.extensions_mut() 2662 - .insert( 2663 - GrpcMethod::new( 2664 - "rockbox.v1alpha1.PlaybackService", 2665 - "FlushAndReloadTracks", 2666 - ), 2667 - ); 2336 + req.extensions_mut().insert(GrpcMethod::new( 2337 + "rockbox.v1alpha1.PlaybackService", 2338 + "FlushAndReloadTracks", 2339 + )); 2668 2340 self.inner.unary(req, path, codec).await 2669 2341 } 2670 2342 pub async fn get_file_position( 2671 2343 &mut self, 2672 2344 request: impl tonic::IntoRequest<super::GetFilePositionRequest>, 2673 - ) -> std::result::Result< 2674 - tonic::Response<super::GetFilePositionResponse>, 2675 - tonic::Status, 2676 - > { 2677 - self.inner 2678 - .ready() 2679 - .await 2680 - .map_err(|e| { 2681 - tonic::Status::unknown( 2682 - format!("Service was not ready: {}", e.into()), 2683 - ) 2684 - })?; 2345 + ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status> 2346 + { 2347 + self.inner.ready().await.map_err(|e| { 2348 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2349 + })?; 2685 2350 let codec = tonic::codec::ProstCodec::default(); 2686 2351 let path = http::uri::PathAndQuery::from_static( 2687 2352 "/rockbox.v1alpha1.PlaybackService/GetFilePosition", 2688 2353 ); 2689 2354 let mut req = request.into_request(); 2690 - req.extensions_mut() 2691 - .insert( 2692 - GrpcMethod::new( 2693 - "rockbox.v1alpha1.PlaybackService", 2694 - "GetFilePosition", 2695 - ), 2696 - ); 2355 + req.extensions_mut().insert(GrpcMethod::new( 2356 + "rockbox.v1alpha1.PlaybackService", 2357 + "GetFilePosition", 2358 + )); 2697 2359 self.inner.unary(req, path, codec).await 2698 2360 } 2699 2361 pub async fn hard_stop( 2700 2362 &mut self, 2701 2363 request: impl tonic::IntoRequest<super::HardStopRequest>, 2702 - ) -> std::result::Result< 2703 - tonic::Response<super::HardStopResponse>, 2704 - tonic::Status, 2705 - > { 2706 - self.inner 2707 - .ready() 2708 - .await 2709 - .map_err(|e| { 2710 - tonic::Status::unknown( 2711 - format!("Service was not ready: {}", e.into()), 2712 - ) 2713 - })?; 2364 + ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status> { 2365 + self.inner.ready().await.map_err(|e| { 2366 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2367 + })?; 2714 2368 let codec = tonic::codec::ProstCodec::default(); 2715 - let path = http::uri::PathAndQuery::from_static( 2716 - "/rockbox.v1alpha1.PlaybackService/HardStop", 2717 - ); 2369 + let path = 2370 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); 2718 2371 let mut req = request.into_request(); 2719 - req.extensions_mut() 2720 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); 2372 + req.extensions_mut().insert(GrpcMethod::new( 2373 + "rockbox.v1alpha1.PlaybackService", 2374 + "HardStop", 2375 + )); 2721 2376 self.inner.unary(req, path, codec).await 2722 2377 } 2723 2378 pub async fn play_album( 2724 2379 &mut self, 2725 2380 request: impl tonic::IntoRequest<super::PlayAlbumRequest>, 2726 - ) -> std::result::Result< 2727 - tonic::Response<super::PlayAlbumResponse>, 2728 - tonic::Status, 2729 - > { 2730 - self.inner 2731 - .ready() 2732 - .await 2733 - .map_err(|e| { 2734 - tonic::Status::unknown( 2735 - format!("Service was not ready: {}", e.into()), 2736 - ) 2737 - })?; 2381 + ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status> { 2382 + self.inner.ready().await.map_err(|e| { 2383 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2384 + })?; 2738 2385 let codec = tonic::codec::ProstCodec::default(); 2739 - let path = http::uri::PathAndQuery::from_static( 2740 - "/rockbox.v1alpha1.PlaybackService/PlayAlbum", 2741 - ); 2386 + let path = 2387 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); 2742 2388 let mut req = request.into_request(); 2743 - req.extensions_mut() 2744 - .insert( 2745 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), 2746 - ); 2389 + req.extensions_mut().insert(GrpcMethod::new( 2390 + "rockbox.v1alpha1.PlaybackService", 2391 + "PlayAlbum", 2392 + )); 2747 2393 self.inner.unary(req, path, codec).await 2748 2394 } 2749 2395 pub async fn play_artist_tracks( 2750 2396 &mut self, 2751 2397 request: impl tonic::IntoRequest<super::PlayArtistTracksRequest>, 2752 - ) -> std::result::Result< 2753 - tonic::Response<super::PlayArtistTracksResponse>, 2754 - tonic::Status, 2755 - > { 2756 - self.inner 2757 - .ready() 2758 - .await 2759 - .map_err(|e| { 2760 - tonic::Status::unknown( 2761 - format!("Service was not ready: {}", e.into()), 2762 - ) 2763 - })?; 2398 + ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status> 2399 + { 2400 + self.inner.ready().await.map_err(|e| { 2401 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2402 + })?; 2764 2403 let codec = tonic::codec::ProstCodec::default(); 2765 2404 let path = http::uri::PathAndQuery::from_static( 2766 2405 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", 2767 2406 ); 2768 2407 let mut req = request.into_request(); 2769 - req.extensions_mut() 2770 - .insert( 2771 - GrpcMethod::new( 2772 - "rockbox.v1alpha1.PlaybackService", 2773 - "PlayArtistTracks", 2774 - ), 2775 - ); 2408 + req.extensions_mut().insert(GrpcMethod::new( 2409 + "rockbox.v1alpha1.PlaybackService", 2410 + "PlayArtistTracks", 2411 + )); 2776 2412 self.inner.unary(req, path, codec).await 2777 2413 } 2778 2414 pub async fn play_playlist( 2779 2415 &mut self, 2780 2416 request: impl tonic::IntoRequest<super::PlayPlaylistRequest>, 2781 - ) -> std::result::Result< 2782 - tonic::Response<super::PlayPlaylistResponse>, 2783 - tonic::Status, 2784 - > { 2785 - self.inner 2786 - .ready() 2787 - .await 2788 - .map_err(|e| { 2789 - tonic::Status::unknown( 2790 - format!("Service was not ready: {}", e.into()), 2791 - ) 2792 - })?; 2417 + ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status> 2418 + { 2419 + self.inner.ready().await.map_err(|e| { 2420 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2421 + })?; 2793 2422 let codec = tonic::codec::ProstCodec::default(); 2794 2423 let path = http::uri::PathAndQuery::from_static( 2795 2424 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", 2796 2425 ); 2797 2426 let mut req = request.into_request(); 2798 - req.extensions_mut() 2799 - .insert( 2800 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), 2801 - ); 2427 + req.extensions_mut().insert(GrpcMethod::new( 2428 + "rockbox.v1alpha1.PlaybackService", 2429 + "PlayPlaylist", 2430 + )); 2802 2431 self.inner.unary(req, path, codec).await 2803 2432 } 2804 2433 pub async fn play_directory( 2805 2434 &mut self, 2806 2435 request: impl tonic::IntoRequest<super::PlayDirectoryRequest>, 2807 - ) -> std::result::Result< 2808 - tonic::Response<super::PlayDirectoryResponse>, 2809 - tonic::Status, 2810 - > { 2811 - self.inner 2812 - .ready() 2813 - .await 2814 - .map_err(|e| { 2815 - tonic::Status::unknown( 2816 - format!("Service was not ready: {}", e.into()), 2817 - ) 2818 - })?; 2436 + ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status> 2437 + { 2438 + self.inner.ready().await.map_err(|e| { 2439 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2440 + })?; 2819 2441 let codec = tonic::codec::ProstCodec::default(); 2820 2442 let path = http::uri::PathAndQuery::from_static( 2821 2443 "/rockbox.v1alpha1.PlaybackService/PlayDirectory", 2822 2444 ); 2823 2445 let mut req = request.into_request(); 2824 - req.extensions_mut() 2825 - .insert( 2826 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), 2827 - ); 2446 + req.extensions_mut().insert(GrpcMethod::new( 2447 + "rockbox.v1alpha1.PlaybackService", 2448 + "PlayDirectory", 2449 + )); 2828 2450 self.inner.unary(req, path, codec).await 2829 2451 } 2830 2452 pub async fn play_music_directory( 2831 2453 &mut self, 2832 2454 request: impl tonic::IntoRequest<super::PlayMusicDirectoryRequest>, 2833 - ) -> std::result::Result< 2834 - tonic::Response<super::PlayMusicDirectoryResponse>, 2835 - tonic::Status, 2836 - > { 2837 - self.inner 2838 - .ready() 2839 - .await 2840 - .map_err(|e| { 2841 - tonic::Status::unknown( 2842 - format!("Service was not ready: {}", e.into()), 2843 - ) 2844 - })?; 2455 + ) -> std::result::Result<tonic::Response<super::PlayMusicDirectoryResponse>, tonic::Status> 2456 + { 2457 + self.inner.ready().await.map_err(|e| { 2458 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2459 + })?; 2845 2460 let codec = tonic::codec::ProstCodec::default(); 2846 2461 let path = http::uri::PathAndQuery::from_static( 2847 2462 "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory", 2848 2463 ); 2849 2464 let mut req = request.into_request(); 2850 - req.extensions_mut() 2851 - .insert( 2852 - GrpcMethod::new( 2853 - "rockbox.v1alpha1.PlaybackService", 2854 - "PlayMusicDirectory", 2855 - ), 2856 - ); 2465 + req.extensions_mut().insert(GrpcMethod::new( 2466 + "rockbox.v1alpha1.PlaybackService", 2467 + "PlayMusicDirectory", 2468 + )); 2857 2469 self.inner.unary(req, path, codec).await 2858 2470 } 2859 2471 pub async fn play_track( 2860 2472 &mut self, 2861 2473 request: impl tonic::IntoRequest<super::PlayTrackRequest>, 2862 - ) -> std::result::Result< 2863 - tonic::Response<super::PlayTrackResponse>, 2864 - tonic::Status, 2865 - > { 2866 - self.inner 2867 - .ready() 2868 - .await 2869 - .map_err(|e| { 2870 - tonic::Status::unknown( 2871 - format!("Service was not ready: {}", e.into()), 2872 - ) 2873 - })?; 2474 + ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status> { 2475 + self.inner.ready().await.map_err(|e| { 2476 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2477 + })?; 2874 2478 let codec = tonic::codec::ProstCodec::default(); 2875 - let path = http::uri::PathAndQuery::from_static( 2876 - "/rockbox.v1alpha1.PlaybackService/PlayTrack", 2877 - ); 2479 + let path = 2480 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); 2878 2481 let mut req = request.into_request(); 2879 - req.extensions_mut() 2880 - .insert( 2881 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), 2882 - ); 2482 + req.extensions_mut().insert(GrpcMethod::new( 2483 + "rockbox.v1alpha1.PlaybackService", 2484 + "PlayTrack", 2485 + )); 2883 2486 self.inner.unary(req, path, codec).await 2884 2487 } 2885 2488 pub async fn play_liked_tracks( 2886 2489 &mut self, 2887 2490 request: impl tonic::IntoRequest<super::PlayLikedTracksRequest>, 2888 - ) -> std::result::Result< 2889 - tonic::Response<super::PlayLikedTracksResponse>, 2890 - tonic::Status, 2891 - > { 2892 - self.inner 2893 - .ready() 2894 - .await 2895 - .map_err(|e| { 2896 - tonic::Status::unknown( 2897 - format!("Service was not ready: {}", e.into()), 2898 - ) 2899 - })?; 2491 + ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status> 2492 + { 2493 + self.inner.ready().await.map_err(|e| { 2494 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2495 + })?; 2900 2496 let codec = tonic::codec::ProstCodec::default(); 2901 2497 let path = http::uri::PathAndQuery::from_static( 2902 2498 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", 2903 2499 ); 2904 2500 let mut req = request.into_request(); 2905 - req.extensions_mut() 2906 - .insert( 2907 - GrpcMethod::new( 2908 - "rockbox.v1alpha1.PlaybackService", 2909 - "PlayLikedTracks", 2910 - ), 2911 - ); 2501 + req.extensions_mut().insert(GrpcMethod::new( 2502 + "rockbox.v1alpha1.PlaybackService", 2503 + "PlayLikedTracks", 2504 + )); 2912 2505 self.inner.unary(req, path, codec).await 2913 2506 } 2914 2507 pub async fn play_all_tracks( 2915 2508 &mut self, 2916 2509 request: impl tonic::IntoRequest<super::PlayAllTracksRequest>, 2917 - ) -> std::result::Result< 2918 - tonic::Response<super::PlayAllTracksResponse>, 2919 - tonic::Status, 2920 - > { 2921 - self.inner 2922 - .ready() 2923 - .await 2924 - .map_err(|e| { 2925 - tonic::Status::unknown( 2926 - format!("Service was not ready: {}", e.into()), 2927 - ) 2928 - })?; 2510 + ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status> 2511 + { 2512 + self.inner.ready().await.map_err(|e| { 2513 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2514 + })?; 2929 2515 let codec = tonic::codec::ProstCodec::default(); 2930 2516 let path = http::uri::PathAndQuery::from_static( 2931 2517 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", 2932 2518 ); 2933 2519 let mut req = request.into_request(); 2934 - req.extensions_mut() 2935 - .insert( 2936 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), 2937 - ); 2520 + req.extensions_mut().insert(GrpcMethod::new( 2521 + "rockbox.v1alpha1.PlaybackService", 2522 + "PlayAllTracks", 2523 + )); 2938 2524 self.inner.unary(req, path, codec).await 2939 2525 } 2940 2526 pub async fn stream_current_track( ··· 2944 2530 tonic::Response<tonic::codec::Streaming<super::CurrentTrackResponse>>, 2945 2531 tonic::Status, 2946 2532 > { 2947 - self.inner 2948 - .ready() 2949 - .await 2950 - .map_err(|e| { 2951 - tonic::Status::unknown( 2952 - format!("Service was not ready: {}", e.into()), 2953 - ) 2954 - })?; 2533 + self.inner.ready().await.map_err(|e| { 2534 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2535 + })?; 2955 2536 let codec = tonic::codec::ProstCodec::default(); 2956 2537 let path = http::uri::PathAndQuery::from_static( 2957 2538 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", 2958 2539 ); 2959 2540 let mut req = request.into_request(); 2960 - req.extensions_mut() 2961 - .insert( 2962 - GrpcMethod::new( 2963 - "rockbox.v1alpha1.PlaybackService", 2964 - "StreamCurrentTrack", 2965 - ), 2966 - ); 2541 + req.extensions_mut().insert(GrpcMethod::new( 2542 + "rockbox.v1alpha1.PlaybackService", 2543 + "StreamCurrentTrack", 2544 + )); 2967 2545 self.inner.server_streaming(req, path, codec).await 2968 2546 } 2969 2547 pub async fn stream_status( ··· 2973 2551 tonic::Response<tonic::codec::Streaming<super::StatusResponse>>, 2974 2552 tonic::Status, 2975 2553 > { 2976 - self.inner 2977 - .ready() 2978 - .await 2979 - .map_err(|e| { 2980 - tonic::Status::unknown( 2981 - format!("Service was not ready: {}", e.into()), 2982 - ) 2983 - })?; 2554 + self.inner.ready().await.map_err(|e| { 2555 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2556 + })?; 2984 2557 let codec = tonic::codec::ProstCodec::default(); 2985 2558 let path = http::uri::PathAndQuery::from_static( 2986 2559 "/rockbox.v1alpha1.PlaybackService/StreamStatus", 2987 2560 ); 2988 2561 let mut req = request.into_request(); 2989 - req.extensions_mut() 2990 - .insert( 2991 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), 2992 - ); 2562 + req.extensions_mut().insert(GrpcMethod::new( 2563 + "rockbox.v1alpha1.PlaybackService", 2564 + "StreamStatus", 2565 + )); 2993 2566 self.inner.server_streaming(req, path, codec).await 2994 2567 } 2995 2568 pub async fn stream_playlist( ··· 2999 2572 tonic::Response<tonic::codec::Streaming<super::PlaylistResponse>>, 3000 2573 tonic::Status, 3001 2574 > { 3002 - self.inner 3003 - .ready() 3004 - .await 3005 - .map_err(|e| { 3006 - tonic::Status::unknown( 3007 - format!("Service was not ready: {}", e.into()), 3008 - ) 3009 - })?; 2575 + self.inner.ready().await.map_err(|e| { 2576 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2577 + })?; 3010 2578 let codec = tonic::codec::ProstCodec::default(); 3011 2579 let path = http::uri::PathAndQuery::from_static( 3012 2580 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", 3013 2581 ); 3014 2582 let mut req = request.into_request(); 3015 - req.extensions_mut() 3016 - .insert( 3017 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), 3018 - ); 2583 + req.extensions_mut().insert(GrpcMethod::new( 2584 + "rockbox.v1alpha1.PlaybackService", 2585 + "StreamPlaylist", 2586 + )); 3019 2587 self.inner.server_streaming(req, path, codec).await 3020 2588 } 3021 2589 } ··· 3027 2595 dead_code, 3028 2596 missing_docs, 3029 2597 clippy::wildcard_imports, 3030 - clippy::let_unit_value, 2598 + clippy::let_unit_value 3031 2599 )] 3032 2600 use tonic::codegen::*; 3033 2601 /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. ··· 3044 2612 async fn play_or_pause( 3045 2613 &self, 3046 2614 request: tonic::Request<super::PlayOrPauseRequest>, 3047 - ) -> std::result::Result< 3048 - tonic::Response<super::PlayOrPauseResponse>, 3049 - tonic::Status, 3050 - >; 2615 + ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status>; 3051 2616 async fn resume( 3052 2617 &self, 3053 2618 request: tonic::Request<super::ResumeRequest>, ··· 3059 2624 async fn previous( 3060 2625 &self, 3061 2626 request: tonic::Request<super::PreviousRequest>, 3062 - ) -> std::result::Result< 3063 - tonic::Response<super::PreviousResponse>, 3064 - tonic::Status, 3065 - >; 2627 + ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status>; 3066 2628 async fn fast_forward_rewind( 3067 2629 &self, 3068 2630 request: tonic::Request<super::FastForwardRewindRequest>, 3069 - ) -> std::result::Result< 3070 - tonic::Response<super::FastForwardRewindResponse>, 3071 - tonic::Status, 3072 - >; 2631 + ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status>; 3073 2632 async fn status( 3074 2633 &self, 3075 2634 request: tonic::Request<super::StatusRequest>, ··· 3077 2636 async fn current_track( 3078 2637 &self, 3079 2638 request: tonic::Request<super::CurrentTrackRequest>, 3080 - ) -> std::result::Result< 3081 - tonic::Response<super::CurrentTrackResponse>, 3082 - tonic::Status, 3083 - >; 2639 + ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status>; 3084 2640 async fn next_track( 3085 2641 &self, 3086 2642 request: tonic::Request<super::NextTrackRequest>, 3087 - ) -> std::result::Result< 3088 - tonic::Response<super::NextTrackResponse>, 3089 - tonic::Status, 3090 - >; 2643 + ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status>; 3091 2644 async fn flush_and_reload_tracks( 3092 2645 &self, 3093 2646 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3094 - ) -> std::result::Result< 3095 - tonic::Response<super::FlushAndReloadTracksResponse>, 3096 - tonic::Status, 3097 - >; 2647 + ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status>; 3098 2648 async fn get_file_position( 3099 2649 &self, 3100 2650 request: tonic::Request<super::GetFilePositionRequest>, 3101 - ) -> std::result::Result< 3102 - tonic::Response<super::GetFilePositionResponse>, 3103 - tonic::Status, 3104 - >; 2651 + ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status>; 3105 2652 async fn hard_stop( 3106 2653 &self, 3107 2654 request: tonic::Request<super::HardStopRequest>, 3108 - ) -> std::result::Result< 3109 - tonic::Response<super::HardStopResponse>, 3110 - tonic::Status, 3111 - >; 2655 + ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status>; 3112 2656 async fn play_album( 3113 2657 &self, 3114 2658 request: tonic::Request<super::PlayAlbumRequest>, 3115 - ) -> std::result::Result< 3116 - tonic::Response<super::PlayAlbumResponse>, 3117 - tonic::Status, 3118 - >; 2659 + ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status>; 3119 2660 async fn play_artist_tracks( 3120 2661 &self, 3121 2662 request: tonic::Request<super::PlayArtistTracksRequest>, 3122 - ) -> std::result::Result< 3123 - tonic::Response<super::PlayArtistTracksResponse>, 3124 - tonic::Status, 3125 - >; 2663 + ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status>; 3126 2664 async fn play_playlist( 3127 2665 &self, 3128 2666 request: tonic::Request<super::PlayPlaylistRequest>, 3129 - ) -> std::result::Result< 3130 - tonic::Response<super::PlayPlaylistResponse>, 3131 - tonic::Status, 3132 - >; 2667 + ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status>; 3133 2668 async fn play_directory( 3134 2669 &self, 3135 2670 request: tonic::Request<super::PlayDirectoryRequest>, 3136 - ) -> std::result::Result< 3137 - tonic::Response<super::PlayDirectoryResponse>, 3138 - tonic::Status, 3139 - >; 2671 + ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status>; 3140 2672 async fn play_music_directory( 3141 2673 &self, 3142 2674 request: tonic::Request<super::PlayMusicDirectoryRequest>, 3143 - ) -> std::result::Result< 3144 - tonic::Response<super::PlayMusicDirectoryResponse>, 3145 - tonic::Status, 3146 - >; 2675 + ) -> std::result::Result<tonic::Response<super::PlayMusicDirectoryResponse>, tonic::Status>; 3147 2676 async fn play_track( 3148 2677 &self, 3149 2678 request: tonic::Request<super::PlayTrackRequest>, 3150 - ) -> std::result::Result< 3151 - tonic::Response<super::PlayTrackResponse>, 3152 - tonic::Status, 3153 - >; 2679 + ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status>; 3154 2680 async fn play_liked_tracks( 3155 2681 &self, 3156 2682 request: tonic::Request<super::PlayLikedTracksRequest>, 3157 - ) -> std::result::Result< 3158 - tonic::Response<super::PlayLikedTracksResponse>, 3159 - tonic::Status, 3160 - >; 2683 + ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status>; 3161 2684 async fn play_all_tracks( 3162 2685 &self, 3163 2686 request: tonic::Request<super::PlayAllTracksRequest>, 3164 - ) -> std::result::Result< 3165 - tonic::Response<super::PlayAllTracksResponse>, 3166 - tonic::Status, 3167 - >; 2687 + ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status>; 3168 2688 /// Server streaming response type for the StreamCurrentTrack method. 3169 2689 type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< 3170 2690 Item = std::result::Result<super::CurrentTrackResponse, tonic::Status>, 3171 - > 3172 - + std::marker::Send 2691 + > + std::marker::Send 3173 2692 + 'static; 3174 2693 async fn stream_current_track( 3175 2694 &self, 3176 2695 request: tonic::Request<super::StreamCurrentTrackRequest>, 3177 - ) -> std::result::Result< 3178 - tonic::Response<Self::StreamCurrentTrackStream>, 3179 - tonic::Status, 3180 - >; 2696 + ) -> std::result::Result<tonic::Response<Self::StreamCurrentTrackStream>, tonic::Status>; 3181 2697 /// Server streaming response type for the StreamStatus method. 3182 2698 type StreamStatusStream: tonic::codegen::tokio_stream::Stream< 3183 2699 Item = std::result::Result<super::StatusResponse, tonic::Status>, 3184 - > 3185 - + std::marker::Send 2700 + > + std::marker::Send 3186 2701 + 'static; 3187 2702 async fn stream_status( 3188 2703 &self, 3189 2704 request: tonic::Request<super::StreamStatusRequest>, 3190 - ) -> std::result::Result< 3191 - tonic::Response<Self::StreamStatusStream>, 3192 - tonic::Status, 3193 - >; 2705 + ) -> std::result::Result<tonic::Response<Self::StreamStatusStream>, tonic::Status>; 3194 2706 /// Server streaming response type for the StreamPlaylist method. 3195 2707 type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< 3196 2708 Item = std::result::Result<super::PlaylistResponse, tonic::Status>, 3197 - > 3198 - + std::marker::Send 2709 + > + std::marker::Send 3199 2710 + 'static; 3200 2711 async fn stream_playlist( 3201 2712 &self, 3202 2713 request: tonic::Request<super::StreamPlaylistRequest>, 3203 - ) -> std::result::Result< 3204 - tonic::Response<Self::StreamPlaylistStream>, 3205 - tonic::Status, 3206 - >; 2714 + ) -> std::result::Result<tonic::Response<Self::StreamPlaylistStream>, tonic::Status>; 3207 2715 } 3208 2716 #[derive(Debug)] 3209 2717 pub struct PlaybackServiceServer<T> { ··· 3226 2734 max_encoding_message_size: None, 3227 2735 } 3228 2736 } 3229 - pub fn with_interceptor<F>( 3230 - inner: T, 3231 - interceptor: F, 3232 - ) -> InterceptedService<Self, F> 2737 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 3233 2738 where 3234 2739 F: tonic::service::Interceptor, 3235 2740 { ··· 3284 2789 "/rockbox.v1alpha1.PlaybackService/Play" => { 3285 2790 #[allow(non_camel_case_types)] 3286 2791 struct PlaySvc<T: PlaybackService>(pub Arc<T>); 3287 - impl< 3288 - T: PlaybackService, 3289 - > tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 2792 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 3290 2793 type Response = super::PlayResponse; 3291 - type Future = BoxFuture< 3292 - tonic::Response<Self::Response>, 3293 - tonic::Status, 3294 - >; 2794 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3295 2795 fn call( 3296 2796 &mut self, 3297 2797 request: tonic::Request<super::PlayRequest>, 3298 2798 ) -> Self::Future { 3299 2799 let inner = Arc::clone(&self.0); 3300 - let fut = async move { 3301 - <T as PlaybackService>::play(&inner, request).await 3302 - }; 2800 + let fut = 2801 + async move { <T as PlaybackService>::play(&inner, request).await }; 3303 2802 Box::pin(fut) 3304 2803 } 3305 2804 } ··· 3328 2827 "/rockbox.v1alpha1.PlaybackService/Pause" => { 3329 2828 #[allow(non_camel_case_types)] 3330 2829 struct PauseSvc<T: PlaybackService>(pub Arc<T>); 3331 - impl< 3332 - T: PlaybackService, 3333 - > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 2830 + impl<T: PlaybackService> tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 3334 2831 type Response = super::PauseResponse; 3335 - type Future = BoxFuture< 3336 - tonic::Response<Self::Response>, 3337 - tonic::Status, 3338 - >; 2832 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3339 2833 fn call( 3340 2834 &mut self, 3341 2835 request: tonic::Request<super::PauseRequest>, 3342 2836 ) -> Self::Future { 3343 2837 let inner = Arc::clone(&self.0); 3344 - let fut = async move { 3345 - <T as PlaybackService>::pause(&inner, request).await 3346 - }; 2838 + let fut = 2839 + async move { <T as PlaybackService>::pause(&inner, request).await }; 3347 2840 Box::pin(fut) 3348 2841 } 3349 2842 } ··· 3372 2865 "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { 3373 2866 #[allow(non_camel_case_types)] 3374 2867 struct PlayOrPauseSvc<T: PlaybackService>(pub Arc<T>); 3375 - impl< 3376 - T: PlaybackService, 3377 - > tonic::server::UnaryService<super::PlayOrPauseRequest> 3378 - for PlayOrPauseSvc<T> { 2868 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayOrPauseRequest> 2869 + for PlayOrPauseSvc<T> 2870 + { 3379 2871 type Response = super::PlayOrPauseResponse; 3380 - type Future = BoxFuture< 3381 - tonic::Response<Self::Response>, 3382 - tonic::Status, 3383 - >; 2872 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3384 2873 fn call( 3385 2874 &mut self, 3386 2875 request: tonic::Request<super::PlayOrPauseRequest>, ··· 3417 2906 "/rockbox.v1alpha1.PlaybackService/Resume" => { 3418 2907 #[allow(non_camel_case_types)] 3419 2908 struct ResumeSvc<T: PlaybackService>(pub Arc<T>); 3420 - impl< 3421 - T: PlaybackService, 3422 - > tonic::server::UnaryService<super::ResumeRequest> 3423 - for ResumeSvc<T> { 2909 + impl<T: PlaybackService> tonic::server::UnaryService<super::ResumeRequest> for ResumeSvc<T> { 3424 2910 type Response = super::ResumeResponse; 3425 - type Future = BoxFuture< 3426 - tonic::Response<Self::Response>, 3427 - tonic::Status, 3428 - >; 2911 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3429 2912 fn call( 3430 2913 &mut self, 3431 2914 request: tonic::Request<super::ResumeRequest>, ··· 3462 2945 "/rockbox.v1alpha1.PlaybackService/Next" => { 3463 2946 #[allow(non_camel_case_types)] 3464 2947 struct NextSvc<T: PlaybackService>(pub Arc<T>); 3465 - impl< 3466 - T: PlaybackService, 3467 - > tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 2948 + impl<T: PlaybackService> tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 3468 2949 type Response = super::NextResponse; 3469 - type Future = BoxFuture< 3470 - tonic::Response<Self::Response>, 3471 - tonic::Status, 3472 - >; 2950 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3473 2951 fn call( 3474 2952 &mut self, 3475 2953 request: tonic::Request<super::NextRequest>, 3476 2954 ) -> Self::Future { 3477 2955 let inner = Arc::clone(&self.0); 3478 - let fut = async move { 3479 - <T as PlaybackService>::next(&inner, request).await 3480 - }; 2956 + let fut = 2957 + async move { <T as PlaybackService>::next(&inner, request).await }; 3481 2958 Box::pin(fut) 3482 2959 } 3483 2960 } ··· 3506 2983 "/rockbox.v1alpha1.PlaybackService/Previous" => { 3507 2984 #[allow(non_camel_case_types)] 3508 2985 struct PreviousSvc<T: PlaybackService>(pub Arc<T>); 3509 - impl< 3510 - T: PlaybackService, 3511 - > tonic::server::UnaryService<super::PreviousRequest> 3512 - for PreviousSvc<T> { 2986 + impl<T: PlaybackService> tonic::server::UnaryService<super::PreviousRequest> for PreviousSvc<T> { 3513 2987 type Response = super::PreviousResponse; 3514 - type Future = BoxFuture< 3515 - tonic::Response<Self::Response>, 3516 - tonic::Status, 3517 - >; 2988 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3518 2989 fn call( 3519 2990 &mut self, 3520 2991 request: tonic::Request<super::PreviousRequest>, ··· 3551 3022 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { 3552 3023 #[allow(non_camel_case_types)] 3553 3024 struct FastForwardRewindSvc<T: PlaybackService>(pub Arc<T>); 3554 - impl< 3555 - T: PlaybackService, 3556 - > tonic::server::UnaryService<super::FastForwardRewindRequest> 3557 - for FastForwardRewindSvc<T> { 3025 + impl<T: PlaybackService> 3026 + tonic::server::UnaryService<super::FastForwardRewindRequest> 3027 + for FastForwardRewindSvc<T> 3028 + { 3558 3029 type Response = super::FastForwardRewindResponse; 3559 - type Future = BoxFuture< 3560 - tonic::Response<Self::Response>, 3561 - tonic::Status, 3562 - >; 3030 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3563 3031 fn call( 3564 3032 &mut self, 3565 3033 request: tonic::Request<super::FastForwardRewindRequest>, 3566 3034 ) -> Self::Future { 3567 3035 let inner = Arc::clone(&self.0); 3568 3036 let fut = async move { 3569 - <T as PlaybackService>::fast_forward_rewind(&inner, request) 3570 - .await 3037 + <T as PlaybackService>::fast_forward_rewind(&inner, request).await 3571 3038 }; 3572 3039 Box::pin(fut) 3573 3040 } ··· 3597 3064 "/rockbox.v1alpha1.PlaybackService/Status" => { 3598 3065 #[allow(non_camel_case_types)] 3599 3066 struct StatusSvc<T: PlaybackService>(pub Arc<T>); 3600 - impl< 3601 - T: PlaybackService, 3602 - > tonic::server::UnaryService<super::StatusRequest> 3603 - for StatusSvc<T> { 3067 + impl<T: PlaybackService> tonic::server::UnaryService<super::StatusRequest> for StatusSvc<T> { 3604 3068 type Response = super::StatusResponse; 3605 - type Future = BoxFuture< 3606 - tonic::Response<Self::Response>, 3607 - tonic::Status, 3608 - >; 3069 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3609 3070 fn call( 3610 3071 &mut self, 3611 3072 request: tonic::Request<super::StatusRequest>, ··· 3642 3103 "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { 3643 3104 #[allow(non_camel_case_types)] 3644 3105 struct CurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 3645 - impl< 3646 - T: PlaybackService, 3647 - > tonic::server::UnaryService<super::CurrentTrackRequest> 3648 - for CurrentTrackSvc<T> { 3106 + impl<T: PlaybackService> tonic::server::UnaryService<super::CurrentTrackRequest> 3107 + for CurrentTrackSvc<T> 3108 + { 3649 3109 type Response = super::CurrentTrackResponse; 3650 - type Future = BoxFuture< 3651 - tonic::Response<Self::Response>, 3652 - tonic::Status, 3653 - >; 3110 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3654 3111 fn call( 3655 3112 &mut self, 3656 3113 request: tonic::Request<super::CurrentTrackRequest>, ··· 3687 3144 "/rockbox.v1alpha1.PlaybackService/NextTrack" => { 3688 3145 #[allow(non_camel_case_types)] 3689 3146 struct NextTrackSvc<T: PlaybackService>(pub Arc<T>); 3690 - impl< 3691 - T: PlaybackService, 3692 - > tonic::server::UnaryService<super::NextTrackRequest> 3693 - for NextTrackSvc<T> { 3147 + impl<T: PlaybackService> tonic::server::UnaryService<super::NextTrackRequest> for NextTrackSvc<T> { 3694 3148 type Response = super::NextTrackResponse; 3695 - type Future = BoxFuture< 3696 - tonic::Response<Self::Response>, 3697 - tonic::Status, 3698 - >; 3149 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3699 3150 fn call( 3700 3151 &mut self, 3701 3152 request: tonic::Request<super::NextTrackRequest>, ··· 3732 3183 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { 3733 3184 #[allow(non_camel_case_types)] 3734 3185 struct FlushAndReloadTracksSvc<T: PlaybackService>(pub Arc<T>); 3735 - impl< 3736 - T: PlaybackService, 3737 - > tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3738 - for FlushAndReloadTracksSvc<T> { 3186 + impl<T: PlaybackService> 3187 + tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3188 + for FlushAndReloadTracksSvc<T> 3189 + { 3739 3190 type Response = super::FlushAndReloadTracksResponse; 3740 - type Future = BoxFuture< 3741 - tonic::Response<Self::Response>, 3742 - tonic::Status, 3743 - >; 3191 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3744 3192 fn call( 3745 3193 &mut self, 3746 3194 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3747 3195 ) -> Self::Future { 3748 3196 let inner = Arc::clone(&self.0); 3749 3197 let fut = async move { 3750 - <T as PlaybackService>::flush_and_reload_tracks( 3751 - &inner, 3752 - request, 3753 - ) 3198 + <T as PlaybackService>::flush_and_reload_tracks(&inner, request) 3754 3199 .await 3755 3200 }; 3756 3201 Box::pin(fut) ··· 3781 3226 "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { 3782 3227 #[allow(non_camel_case_types)] 3783 3228 struct GetFilePositionSvc<T: PlaybackService>(pub Arc<T>); 3784 - impl< 3785 - T: PlaybackService, 3786 - > tonic::server::UnaryService<super::GetFilePositionRequest> 3787 - for GetFilePositionSvc<T> { 3229 + impl<T: PlaybackService> 3230 + tonic::server::UnaryService<super::GetFilePositionRequest> 3231 + for GetFilePositionSvc<T> 3232 + { 3788 3233 type Response = super::GetFilePositionResponse; 3789 - type Future = BoxFuture< 3790 - tonic::Response<Self::Response>, 3791 - tonic::Status, 3792 - >; 3234 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3793 3235 fn call( 3794 3236 &mut self, 3795 3237 request: tonic::Request<super::GetFilePositionRequest>, 3796 3238 ) -> Self::Future { 3797 3239 let inner = Arc::clone(&self.0); 3798 3240 let fut = async move { 3799 - <T as PlaybackService>::get_file_position(&inner, request) 3800 - .await 3241 + <T as PlaybackService>::get_file_position(&inner, request).await 3801 3242 }; 3802 3243 Box::pin(fut) 3803 3244 } ··· 3827 3268 "/rockbox.v1alpha1.PlaybackService/HardStop" => { 3828 3269 #[allow(non_camel_case_types)] 3829 3270 struct HardStopSvc<T: PlaybackService>(pub Arc<T>); 3830 - impl< 3831 - T: PlaybackService, 3832 - > tonic::server::UnaryService<super::HardStopRequest> 3833 - for HardStopSvc<T> { 3271 + impl<T: PlaybackService> tonic::server::UnaryService<super::HardStopRequest> for HardStopSvc<T> { 3834 3272 type Response = super::HardStopResponse; 3835 - type Future = BoxFuture< 3836 - tonic::Response<Self::Response>, 3837 - tonic::Status, 3838 - >; 3273 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3839 3274 fn call( 3840 3275 &mut self, 3841 3276 request: tonic::Request<super::HardStopRequest>, ··· 3872 3307 "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { 3873 3308 #[allow(non_camel_case_types)] 3874 3309 struct PlayAlbumSvc<T: PlaybackService>(pub Arc<T>); 3875 - impl< 3876 - T: PlaybackService, 3877 - > tonic::server::UnaryService<super::PlayAlbumRequest> 3878 - for PlayAlbumSvc<T> { 3310 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayAlbumRequest> for PlayAlbumSvc<T> { 3879 3311 type Response = super::PlayAlbumResponse; 3880 - type Future = BoxFuture< 3881 - tonic::Response<Self::Response>, 3882 - tonic::Status, 3883 - >; 3312 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3884 3313 fn call( 3885 3314 &mut self, 3886 3315 request: tonic::Request<super::PlayAlbumRequest>, ··· 3917 3346 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { 3918 3347 #[allow(non_camel_case_types)] 3919 3348 struct PlayArtistTracksSvc<T: PlaybackService>(pub Arc<T>); 3920 - impl< 3921 - T: PlaybackService, 3922 - > tonic::server::UnaryService<super::PlayArtistTracksRequest> 3923 - for PlayArtistTracksSvc<T> { 3349 + impl<T: PlaybackService> 3350 + tonic::server::UnaryService<super::PlayArtistTracksRequest> 3351 + for PlayArtistTracksSvc<T> 3352 + { 3924 3353 type Response = super::PlayArtistTracksResponse; 3925 - type Future = BoxFuture< 3926 - tonic::Response<Self::Response>, 3927 - tonic::Status, 3928 - >; 3354 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3929 3355 fn call( 3930 3356 &mut self, 3931 3357 request: tonic::Request<super::PlayArtistTracksRequest>, 3932 3358 ) -> Self::Future { 3933 3359 let inner = Arc::clone(&self.0); 3934 3360 let fut = async move { 3935 - <T as PlaybackService>::play_artist_tracks(&inner, request) 3936 - .await 3361 + <T as PlaybackService>::play_artist_tracks(&inner, request).await 3937 3362 }; 3938 3363 Box::pin(fut) 3939 3364 } ··· 3963 3388 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { 3964 3389 #[allow(non_camel_case_types)] 3965 3390 struct PlayPlaylistSvc<T: PlaybackService>(pub Arc<T>); 3966 - impl< 3967 - T: PlaybackService, 3968 - > tonic::server::UnaryService<super::PlayPlaylistRequest> 3969 - for PlayPlaylistSvc<T> { 3391 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayPlaylistRequest> 3392 + for PlayPlaylistSvc<T> 3393 + { 3970 3394 type Response = super::PlayPlaylistResponse; 3971 - type Future = BoxFuture< 3972 - tonic::Response<Self::Response>, 3973 - tonic::Status, 3974 - >; 3395 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3975 3396 fn call( 3976 3397 &mut self, 3977 3398 request: tonic::Request<super::PlayPlaylistRequest>, ··· 4008 3429 "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { 4009 3430 #[allow(non_camel_case_types)] 4010 3431 struct PlayDirectorySvc<T: PlaybackService>(pub Arc<T>); 4011 - impl< 4012 - T: PlaybackService, 4013 - > tonic::server::UnaryService<super::PlayDirectoryRequest> 4014 - for PlayDirectorySvc<T> { 3432 + impl<T: PlaybackService> 3433 + tonic::server::UnaryService<super::PlayDirectoryRequest> 3434 + for PlayDirectorySvc<T> 3435 + { 4015 3436 type Response = super::PlayDirectoryResponse; 4016 - type Future = BoxFuture< 4017 - tonic::Response<Self::Response>, 4018 - tonic::Status, 4019 - >; 3437 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4020 3438 fn call( 4021 3439 &mut self, 4022 3440 request: tonic::Request<super::PlayDirectoryRequest>, 4023 3441 ) -> Self::Future { 4024 3442 let inner = Arc::clone(&self.0); 4025 3443 let fut = async move { 4026 - <T as PlaybackService>::play_directory(&inner, request) 4027 - .await 3444 + <T as PlaybackService>::play_directory(&inner, request).await 4028 3445 }; 4029 3446 Box::pin(fut) 4030 3447 } ··· 4054 3471 "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory" => { 4055 3472 #[allow(non_camel_case_types)] 4056 3473 struct PlayMusicDirectorySvc<T: PlaybackService>(pub Arc<T>); 4057 - impl< 4058 - T: PlaybackService, 4059 - > tonic::server::UnaryService<super::PlayMusicDirectoryRequest> 4060 - for PlayMusicDirectorySvc<T> { 3474 + impl<T: PlaybackService> 3475 + tonic::server::UnaryService<super::PlayMusicDirectoryRequest> 3476 + for PlayMusicDirectorySvc<T> 3477 + { 4061 3478 type Response = super::PlayMusicDirectoryResponse; 4062 - type Future = BoxFuture< 4063 - tonic::Response<Self::Response>, 4064 - tonic::Status, 4065 - >; 3479 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4066 3480 fn call( 4067 3481 &mut self, 4068 3482 request: tonic::Request<super::PlayMusicDirectoryRequest>, 4069 3483 ) -> Self::Future { 4070 3484 let inner = Arc::clone(&self.0); 4071 3485 let fut = async move { 4072 - <T as PlaybackService>::play_music_directory( 4073 - &inner, 4074 - request, 4075 - ) 4076 - .await 3486 + <T as PlaybackService>::play_music_directory(&inner, request).await 4077 3487 }; 4078 3488 Box::pin(fut) 4079 3489 } ··· 4103 3513 "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { 4104 3514 #[allow(non_camel_case_types)] 4105 3515 struct PlayTrackSvc<T: PlaybackService>(pub Arc<T>); 4106 - impl< 4107 - T: PlaybackService, 4108 - > tonic::server::UnaryService<super::PlayTrackRequest> 4109 - for PlayTrackSvc<T> { 3516 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayTrackRequest> for PlayTrackSvc<T> { 4110 3517 type Response = super::PlayTrackResponse; 4111 - type Future = BoxFuture< 4112 - tonic::Response<Self::Response>, 4113 - tonic::Status, 4114 - >; 3518 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4115 3519 fn call( 4116 3520 &mut self, 4117 3521 request: tonic::Request<super::PlayTrackRequest>, ··· 4148 3552 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { 4149 3553 #[allow(non_camel_case_types)] 4150 3554 struct PlayLikedTracksSvc<T: PlaybackService>(pub Arc<T>); 4151 - impl< 4152 - T: PlaybackService, 4153 - > tonic::server::UnaryService<super::PlayLikedTracksRequest> 4154 - for PlayLikedTracksSvc<T> { 3555 + impl<T: PlaybackService> 3556 + tonic::server::UnaryService<super::PlayLikedTracksRequest> 3557 + for PlayLikedTracksSvc<T> 3558 + { 4155 3559 type Response = super::PlayLikedTracksResponse; 4156 - type Future = BoxFuture< 4157 - tonic::Response<Self::Response>, 4158 - tonic::Status, 4159 - >; 3560 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4160 3561 fn call( 4161 3562 &mut self, 4162 3563 request: tonic::Request<super::PlayLikedTracksRequest>, 4163 3564 ) -> Self::Future { 4164 3565 let inner = Arc::clone(&self.0); 4165 3566 let fut = async move { 4166 - <T as PlaybackService>::play_liked_tracks(&inner, request) 4167 - .await 3567 + <T as PlaybackService>::play_liked_tracks(&inner, request).await 4168 3568 }; 4169 3569 Box::pin(fut) 4170 3570 } ··· 4194 3594 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { 4195 3595 #[allow(non_camel_case_types)] 4196 3596 struct PlayAllTracksSvc<T: PlaybackService>(pub Arc<T>); 4197 - impl< 4198 - T: PlaybackService, 4199 - > tonic::server::UnaryService<super::PlayAllTracksRequest> 4200 - for PlayAllTracksSvc<T> { 3597 + impl<T: PlaybackService> 3598 + tonic::server::UnaryService<super::PlayAllTracksRequest> 3599 + for PlayAllTracksSvc<T> 3600 + { 4201 3601 type Response = super::PlayAllTracksResponse; 4202 - type Future = BoxFuture< 4203 - tonic::Response<Self::Response>, 4204 - tonic::Status, 4205 - >; 3602 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4206 3603 fn call( 4207 3604 &mut self, 4208 3605 request: tonic::Request<super::PlayAllTracksRequest>, 4209 3606 ) -> Self::Future { 4210 3607 let inner = Arc::clone(&self.0); 4211 3608 let fut = async move { 4212 - <T as PlaybackService>::play_all_tracks(&inner, request) 4213 - .await 3609 + <T as PlaybackService>::play_all_tracks(&inner, request).await 4214 3610 }; 4215 3611 Box::pin(fut) 4216 3612 } ··· 4240 3636 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { 4241 3637 #[allow(non_camel_case_types)] 4242 3638 struct StreamCurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 4243 - impl< 4244 - T: PlaybackService, 4245 - > tonic::server::ServerStreamingService< 4246 - super::StreamCurrentTrackRequest, 4247 - > for StreamCurrentTrackSvc<T> { 3639 + impl<T: PlaybackService> 3640 + tonic::server::ServerStreamingService<super::StreamCurrentTrackRequest> 3641 + for StreamCurrentTrackSvc<T> 3642 + { 4248 3643 type Response = super::CurrentTrackResponse; 4249 3644 type ResponseStream = T::StreamCurrentTrackStream; 4250 - type Future = BoxFuture< 4251 - tonic::Response<Self::ResponseStream>, 4252 - tonic::Status, 4253 - >; 3645 + type Future = 3646 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4254 3647 fn call( 4255 3648 &mut self, 4256 3649 request: tonic::Request<super::StreamCurrentTrackRequest>, 4257 3650 ) -> Self::Future { 4258 3651 let inner = Arc::clone(&self.0); 4259 3652 let fut = async move { 4260 - <T as PlaybackService>::stream_current_track( 4261 - &inner, 4262 - request, 4263 - ) 4264 - .await 3653 + <T as PlaybackService>::stream_current_track(&inner, request).await 4265 3654 }; 4266 3655 Box::pin(fut) 4267 3656 } ··· 4291 3680 "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { 4292 3681 #[allow(non_camel_case_types)] 4293 3682 struct StreamStatusSvc<T: PlaybackService>(pub Arc<T>); 4294 - impl< 4295 - T: PlaybackService, 4296 - > tonic::server::ServerStreamingService<super::StreamStatusRequest> 4297 - for StreamStatusSvc<T> { 3683 + impl<T: PlaybackService> 3684 + tonic::server::ServerStreamingService<super::StreamStatusRequest> 3685 + for StreamStatusSvc<T> 3686 + { 4298 3687 type Response = super::StatusResponse; 4299 3688 type ResponseStream = T::StreamStatusStream; 4300 - type Future = BoxFuture< 4301 - tonic::Response<Self::ResponseStream>, 4302 - tonic::Status, 4303 - >; 3689 + type Future = 3690 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4304 3691 fn call( 4305 3692 &mut self, 4306 3693 request: tonic::Request<super::StreamStatusRequest>, ··· 4337 3724 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { 4338 3725 #[allow(non_camel_case_types)] 4339 3726 struct StreamPlaylistSvc<T: PlaybackService>(pub Arc<T>); 4340 - impl< 4341 - T: PlaybackService, 4342 - > tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 4343 - for StreamPlaylistSvc<T> { 3727 + impl<T: PlaybackService> 3728 + tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 3729 + for StreamPlaylistSvc<T> 3730 + { 4344 3731 type Response = super::PlaylistResponse; 4345 3732 type ResponseStream = T::StreamPlaylistStream; 4346 - type Future = BoxFuture< 4347 - tonic::Response<Self::ResponseStream>, 4348 - tonic::Status, 4349 - >; 3733 + type Future = 3734 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4350 3735 fn call( 4351 3736 &mut self, 4352 3737 request: tonic::Request<super::StreamPlaylistRequest>, 4353 3738 ) -> Self::Future { 4354 3739 let inner = Arc::clone(&self.0); 4355 3740 let fut = async move { 4356 - <T as PlaybackService>::stream_playlist(&inner, request) 4357 - .await 3741 + <T as PlaybackService>::stream_playlist(&inner, request).await 4358 3742 }; 4359 3743 Box::pin(fut) 4360 3744 } ··· 4381 3765 }; 4382 3766 Box::pin(fut) 4383 3767 } 4384 - _ => { 4385 - Box::pin(async move { 4386 - let mut response = http::Response::new(empty_body()); 4387 - let headers = response.headers_mut(); 4388 - headers 4389 - .insert( 4390 - tonic::Status::GRPC_STATUS, 4391 - (tonic::Code::Unimplemented as i32).into(), 4392 - ); 4393 - headers 4394 - .insert( 4395 - http::header::CONTENT_TYPE, 4396 - tonic::metadata::GRPC_CONTENT_TYPE, 4397 - ); 4398 - Ok(response) 4399 - }) 4400 - } 3768 + _ => Box::pin(async move { 3769 + let mut response = http::Response::new(empty_body()); 3770 + let headers = response.headers_mut(); 3771 + headers.insert( 3772 + tonic::Status::GRPC_STATUS, 3773 + (tonic::Code::Unimplemented as i32).into(), 3774 + ); 3775 + headers.insert( 3776 + http::header::CONTENT_TYPE, 3777 + tonic::metadata::GRPC_CONTENT_TYPE, 3778 + ); 3779 + Ok(response) 3780 + }), 4401 3781 } 4402 3782 } 4403 3783 } ··· 4604 3984 dead_code, 4605 3985 missing_docs, 4606 3986 clippy::wildcard_imports, 4607 - clippy::let_unit_value, 3987 + clippy::let_unit_value 4608 3988 )] 4609 - use tonic::codegen::*; 4610 3989 use tonic::codegen::http::Uri; 3990 + use tonic::codegen::*; 4611 3991 #[derive(Debug, Clone)] 4612 3992 pub struct PlaylistServiceClient<T> { 4613 3993 inner: tonic::client::Grpc<T>, ··· 4651 4031 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 4652 4032 >, 4653 4033 >, 4654 - <T as tonic::codegen::Service< 4655 - http::Request<tonic::body::BoxBody>, 4656 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 4034 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 4035 + Into<StdError> + std::marker::Send + std::marker::Sync, 4657 4036 { 4658 4037 PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) 4659 4038 } ··· 4691 4070 pub async fn get_current( 4692 4071 &mut self, 4693 4072 request: impl tonic::IntoRequest<super::GetCurrentRequest>, 4694 - ) -> std::result::Result< 4695 - tonic::Response<super::GetCurrentResponse>, 4696 - tonic::Status, 4697 - > { 4698 - self.inner 4699 - .ready() 4700 - .await 4701 - .map_err(|e| { 4702 - tonic::Status::unknown( 4703 - format!("Service was not ready: {}", e.into()), 4704 - ) 4705 - })?; 4073 + ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status> 4074 + { 4075 + self.inner.ready().await.map_err(|e| { 4076 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4077 + })?; 4706 4078 let codec = tonic::codec::ProstCodec::default(); 4707 4079 let path = http::uri::PathAndQuery::from_static( 4708 4080 "/rockbox.v1alpha1.PlaylistService/GetCurrent", 4709 4081 ); 4710 4082 let mut req = request.into_request(); 4711 - req.extensions_mut() 4712 - .insert( 4713 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), 4714 - ); 4083 + req.extensions_mut().insert(GrpcMethod::new( 4084 + "rockbox.v1alpha1.PlaylistService", 4085 + "GetCurrent", 4086 + )); 4715 4087 self.inner.unary(req, path, codec).await 4716 4088 } 4717 4089 pub async fn get_resume_info( 4718 4090 &mut self, 4719 4091 request: impl tonic::IntoRequest<super::GetResumeInfoRequest>, 4720 - ) -> std::result::Result< 4721 - tonic::Response<super::GetResumeInfoResponse>, 4722 - tonic::Status, 4723 - > { 4724 - self.inner 4725 - .ready() 4726 - .await 4727 - .map_err(|e| { 4728 - tonic::Status::unknown( 4729 - format!("Service was not ready: {}", e.into()), 4730 - ) 4731 - })?; 4092 + ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status> 4093 + { 4094 + self.inner.ready().await.map_err(|e| { 4095 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4096 + })?; 4732 4097 let codec = tonic::codec::ProstCodec::default(); 4733 4098 let path = http::uri::PathAndQuery::from_static( 4734 4099 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", 4735 4100 ); 4736 4101 let mut req = request.into_request(); 4737 - req.extensions_mut() 4738 - .insert( 4739 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), 4740 - ); 4102 + req.extensions_mut().insert(GrpcMethod::new( 4103 + "rockbox.v1alpha1.PlaylistService", 4104 + "GetResumeInfo", 4105 + )); 4741 4106 self.inner.unary(req, path, codec).await 4742 4107 } 4743 4108 pub async fn get_track_info( 4744 4109 &mut self, 4745 4110 request: impl tonic::IntoRequest<super::GetTrackInfoRequest>, 4746 - ) -> std::result::Result< 4747 - tonic::Response<super::GetTrackInfoResponse>, 4748 - tonic::Status, 4749 - > { 4750 - self.inner 4751 - .ready() 4752 - .await 4753 - .map_err(|e| { 4754 - tonic::Status::unknown( 4755 - format!("Service was not ready: {}", e.into()), 4756 - ) 4757 - })?; 4111 + ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status> 4112 + { 4113 + self.inner.ready().await.map_err(|e| { 4114 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4115 + })?; 4758 4116 let codec = tonic::codec::ProstCodec::default(); 4759 4117 let path = http::uri::PathAndQuery::from_static( 4760 4118 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", 4761 4119 ); 4762 4120 let mut req = request.into_request(); 4763 - req.extensions_mut() 4764 - .insert( 4765 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), 4766 - ); 4121 + req.extensions_mut().insert(GrpcMethod::new( 4122 + "rockbox.v1alpha1.PlaylistService", 4123 + "GetTrackInfo", 4124 + )); 4767 4125 self.inner.unary(req, path, codec).await 4768 4126 } 4769 4127 pub async fn get_first_index( 4770 4128 &mut self, 4771 4129 request: impl tonic::IntoRequest<super::GetFirstIndexRequest>, 4772 - ) -> std::result::Result< 4773 - tonic::Response<super::GetFirstIndexResponse>, 4774 - tonic::Status, 4775 - > { 4776 - self.inner 4777 - .ready() 4778 - .await 4779 - .map_err(|e| { 4780 - tonic::Status::unknown( 4781 - format!("Service was not ready: {}", e.into()), 4782 - ) 4783 - })?; 4130 + ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status> 4131 + { 4132 + self.inner.ready().await.map_err(|e| { 4133 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4134 + })?; 4784 4135 let codec = tonic::codec::ProstCodec::default(); 4785 4136 let path = http::uri::PathAndQuery::from_static( 4786 4137 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", 4787 4138 ); 4788 4139 let mut req = request.into_request(); 4789 - req.extensions_mut() 4790 - .insert( 4791 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), 4792 - ); 4140 + req.extensions_mut().insert(GrpcMethod::new( 4141 + "rockbox.v1alpha1.PlaylistService", 4142 + "GetFirstIndex", 4143 + )); 4793 4144 self.inner.unary(req, path, codec).await 4794 4145 } 4795 4146 pub async fn get_display_index( 4796 4147 &mut self, 4797 4148 request: impl tonic::IntoRequest<super::GetDisplayIndexRequest>, 4798 - ) -> std::result::Result< 4799 - tonic::Response<super::GetDisplayIndexResponse>, 4800 - tonic::Status, 4801 - > { 4802 - self.inner 4803 - .ready() 4804 - .await 4805 - .map_err(|e| { 4806 - tonic::Status::unknown( 4807 - format!("Service was not ready: {}", e.into()), 4808 - ) 4809 - })?; 4149 + ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status> 4150 + { 4151 + self.inner.ready().await.map_err(|e| { 4152 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4153 + })?; 4810 4154 let codec = tonic::codec::ProstCodec::default(); 4811 4155 let path = http::uri::PathAndQuery::from_static( 4812 4156 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", 4813 4157 ); 4814 4158 let mut req = request.into_request(); 4815 - req.extensions_mut() 4816 - .insert( 4817 - GrpcMethod::new( 4818 - "rockbox.v1alpha1.PlaylistService", 4819 - "GetDisplayIndex", 4820 - ), 4821 - ); 4159 + req.extensions_mut().insert(GrpcMethod::new( 4160 + "rockbox.v1alpha1.PlaylistService", 4161 + "GetDisplayIndex", 4162 + )); 4822 4163 self.inner.unary(req, path, codec).await 4823 4164 } 4824 4165 pub async fn amount( 4825 4166 &mut self, 4826 4167 request: impl tonic::IntoRequest<super::AmountRequest>, 4827 4168 ) -> std::result::Result<tonic::Response<super::AmountResponse>, tonic::Status> { 4828 - self.inner 4829 - .ready() 4830 - .await 4831 - .map_err(|e| { 4832 - tonic::Status::unknown( 4833 - format!("Service was not ready: {}", e.into()), 4834 - ) 4835 - })?; 4169 + self.inner.ready().await.map_err(|e| { 4170 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4171 + })?; 4836 4172 let codec = tonic::codec::ProstCodec::default(); 4837 - let path = http::uri::PathAndQuery::from_static( 4838 - "/rockbox.v1alpha1.PlaylistService/Amount", 4839 - ); 4173 + let path = 4174 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); 4840 4175 let mut req = request.into_request(); 4841 - req.extensions_mut() 4842 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); 4176 + req.extensions_mut().insert(GrpcMethod::new( 4177 + "rockbox.v1alpha1.PlaylistService", 4178 + "Amount", 4179 + )); 4843 4180 self.inner.unary(req, path, codec).await 4844 4181 } 4845 4182 pub async fn playlist_resume( 4846 4183 &mut self, 4847 4184 request: impl tonic::IntoRequest<super::PlaylistResumeRequest>, 4848 - ) -> std::result::Result< 4849 - tonic::Response<super::PlaylistResumeResponse>, 4850 - tonic::Status, 4851 - > { 4852 - self.inner 4853 - .ready() 4854 - .await 4855 - .map_err(|e| { 4856 - tonic::Status::unknown( 4857 - format!("Service was not ready: {}", e.into()), 4858 - ) 4859 - })?; 4185 + ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status> 4186 + { 4187 + self.inner.ready().await.map_err(|e| { 4188 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4189 + })?; 4860 4190 let codec = tonic::codec::ProstCodec::default(); 4861 4191 let path = http::uri::PathAndQuery::from_static( 4862 4192 "/rockbox.v1alpha1.PlaylistService/PlaylistResume", 4863 4193 ); 4864 4194 let mut req = request.into_request(); 4865 - req.extensions_mut() 4866 - .insert( 4867 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), 4868 - ); 4195 + req.extensions_mut().insert(GrpcMethod::new( 4196 + "rockbox.v1alpha1.PlaylistService", 4197 + "PlaylistResume", 4198 + )); 4869 4199 self.inner.unary(req, path, codec).await 4870 4200 } 4871 4201 pub async fn resume_track( 4872 4202 &mut self, 4873 4203 request: impl tonic::IntoRequest<super::ResumeTrackRequest>, 4874 - ) -> std::result::Result< 4875 - tonic::Response<super::ResumeTrackResponse>, 4876 - tonic::Status, 4877 - > { 4878 - self.inner 4879 - .ready() 4880 - .await 4881 - .map_err(|e| { 4882 - tonic::Status::unknown( 4883 - format!("Service was not ready: {}", e.into()), 4884 - ) 4885 - })?; 4204 + ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status> 4205 + { 4206 + self.inner.ready().await.map_err(|e| { 4207 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4208 + })?; 4886 4209 let codec = tonic::codec::ProstCodec::default(); 4887 4210 let path = http::uri::PathAndQuery::from_static( 4888 4211 "/rockbox.v1alpha1.PlaylistService/ResumeTrack", 4889 4212 ); 4890 4213 let mut req = request.into_request(); 4891 - req.extensions_mut() 4892 - .insert( 4893 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), 4894 - ); 4214 + req.extensions_mut().insert(GrpcMethod::new( 4215 + "rockbox.v1alpha1.PlaylistService", 4216 + "ResumeTrack", 4217 + )); 4895 4218 self.inner.unary(req, path, codec).await 4896 4219 } 4897 4220 pub async fn set_modified( 4898 4221 &mut self, 4899 4222 request: impl tonic::IntoRequest<super::SetModifiedRequest>, 4900 - ) -> std::result::Result< 4901 - tonic::Response<super::SetModifiedResponse>, 4902 - tonic::Status, 4903 - > { 4904 - self.inner 4905 - .ready() 4906 - .await 4907 - .map_err(|e| { 4908 - tonic::Status::unknown( 4909 - format!("Service was not ready: {}", e.into()), 4910 - ) 4911 - })?; 4223 + ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status> 4224 + { 4225 + self.inner.ready().await.map_err(|e| { 4226 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4227 + })?; 4912 4228 let codec = tonic::codec::ProstCodec::default(); 4913 4229 let path = http::uri::PathAndQuery::from_static( 4914 4230 "/rockbox.v1alpha1.PlaylistService/SetModified", 4915 4231 ); 4916 4232 let mut req = request.into_request(); 4917 - req.extensions_mut() 4918 - .insert( 4919 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), 4920 - ); 4233 + req.extensions_mut().insert(GrpcMethod::new( 4234 + "rockbox.v1alpha1.PlaylistService", 4235 + "SetModified", 4236 + )); 4921 4237 self.inner.unary(req, path, codec).await 4922 4238 } 4923 4239 pub async fn start( 4924 4240 &mut self, 4925 4241 request: impl tonic::IntoRequest<super::StartRequest>, 4926 4242 ) -> std::result::Result<tonic::Response<super::StartResponse>, tonic::Status> { 4927 - self.inner 4928 - .ready() 4929 - .await 4930 - .map_err(|e| { 4931 - tonic::Status::unknown( 4932 - format!("Service was not ready: {}", e.into()), 4933 - ) 4934 - })?; 4243 + self.inner.ready().await.map_err(|e| { 4244 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4245 + })?; 4935 4246 let codec = tonic::codec::ProstCodec::default(); 4936 - let path = http::uri::PathAndQuery::from_static( 4937 - "/rockbox.v1alpha1.PlaylistService/Start", 4938 - ); 4247 + let path = 4248 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); 4939 4249 let mut req = request.into_request(); 4940 4250 req.extensions_mut() 4941 4251 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); ··· 4945 4255 &mut self, 4946 4256 request: impl tonic::IntoRequest<super::SyncRequest>, 4947 4257 ) -> std::result::Result<tonic::Response<super::SyncResponse>, tonic::Status> { 4948 - self.inner 4949 - .ready() 4950 - .await 4951 - .map_err(|e| { 4952 - tonic::Status::unknown( 4953 - format!("Service was not ready: {}", e.into()), 4954 - ) 4955 - })?; 4258 + self.inner.ready().await.map_err(|e| { 4259 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4260 + })?; 4956 4261 let codec = tonic::codec::ProstCodec::default(); 4957 - let path = http::uri::PathAndQuery::from_static( 4958 - "/rockbox.v1alpha1.PlaylistService/Sync", 4959 - ); 4262 + let path = 4263 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); 4960 4264 let mut req = request.into_request(); 4961 4265 req.extensions_mut() 4962 4266 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); ··· 4965 4269 pub async fn remove_all_tracks( 4966 4270 &mut self, 4967 4271 request: impl tonic::IntoRequest<super::RemoveAllTracksRequest>, 4968 - ) -> std::result::Result< 4969 - tonic::Response<super::RemoveAllTracksResponse>, 4970 - tonic::Status, 4971 - > { 4972 - self.inner 4973 - .ready() 4974 - .await 4975 - .map_err(|e| { 4976 - tonic::Status::unknown( 4977 - format!("Service was not ready: {}", e.into()), 4978 - ) 4979 - })?; 4272 + ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status> 4273 + { 4274 + self.inner.ready().await.map_err(|e| { 4275 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4276 + })?; 4980 4277 let codec = tonic::codec::ProstCodec::default(); 4981 4278 let path = http::uri::PathAndQuery::from_static( 4982 4279 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", 4983 4280 ); 4984 4281 let mut req = request.into_request(); 4985 - req.extensions_mut() 4986 - .insert( 4987 - GrpcMethod::new( 4988 - "rockbox.v1alpha1.PlaylistService", 4989 - "RemoveAllTracks", 4990 - ), 4991 - ); 4282 + req.extensions_mut().insert(GrpcMethod::new( 4283 + "rockbox.v1alpha1.PlaylistService", 4284 + "RemoveAllTracks", 4285 + )); 4992 4286 self.inner.unary(req, path, codec).await 4993 4287 } 4994 4288 pub async fn remove_tracks( 4995 4289 &mut self, 4996 4290 request: impl tonic::IntoRequest<super::RemoveTracksRequest>, 4997 - ) -> std::result::Result< 4998 - tonic::Response<super::RemoveTracksResponse>, 4999 - tonic::Status, 5000 - > { 5001 - self.inner 5002 - .ready() 5003 - .await 5004 - .map_err(|e| { 5005 - tonic::Status::unknown( 5006 - format!("Service was not ready: {}", e.into()), 5007 - ) 5008 - })?; 4291 + ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status> 4292 + { 4293 + self.inner.ready().await.map_err(|e| { 4294 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4295 + })?; 5009 4296 let codec = tonic::codec::ProstCodec::default(); 5010 4297 let path = http::uri::PathAndQuery::from_static( 5011 4298 "/rockbox.v1alpha1.PlaylistService/RemoveTracks", 5012 4299 ); 5013 4300 let mut req = request.into_request(); 5014 - req.extensions_mut() 5015 - .insert( 5016 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), 5017 - ); 4301 + req.extensions_mut().insert(GrpcMethod::new( 4302 + "rockbox.v1alpha1.PlaylistService", 4303 + "RemoveTracks", 4304 + )); 5018 4305 self.inner.unary(req, path, codec).await 5019 4306 } 5020 4307 pub async fn create_playlist( 5021 4308 &mut self, 5022 4309 request: impl tonic::IntoRequest<super::CreatePlaylistRequest>, 5023 - ) -> std::result::Result< 5024 - tonic::Response<super::CreatePlaylistResponse>, 5025 - tonic::Status, 5026 - > { 5027 - self.inner 5028 - .ready() 5029 - .await 5030 - .map_err(|e| { 5031 - tonic::Status::unknown( 5032 - format!("Service was not ready: {}", e.into()), 5033 - ) 5034 - })?; 4310 + ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status> 4311 + { 4312 + self.inner.ready().await.map_err(|e| { 4313 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4314 + })?; 5035 4315 let codec = tonic::codec::ProstCodec::default(); 5036 4316 let path = http::uri::PathAndQuery::from_static( 5037 4317 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", 5038 4318 ); 5039 4319 let mut req = request.into_request(); 5040 - req.extensions_mut() 5041 - .insert( 5042 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), 5043 - ); 4320 + req.extensions_mut().insert(GrpcMethod::new( 4321 + "rockbox.v1alpha1.PlaylistService", 4322 + "CreatePlaylist", 4323 + )); 5044 4324 self.inner.unary(req, path, codec).await 5045 4325 } 5046 4326 pub async fn insert_tracks( 5047 4327 &mut self, 5048 4328 request: impl tonic::IntoRequest<super::InsertTracksRequest>, 5049 - ) -> std::result::Result< 5050 - tonic::Response<super::InsertTracksResponse>, 5051 - tonic::Status, 5052 - > { 5053 - self.inner 5054 - .ready() 5055 - .await 5056 - .map_err(|e| { 5057 - tonic::Status::unknown( 5058 - format!("Service was not ready: {}", e.into()), 5059 - ) 5060 - })?; 4329 + ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status> 4330 + { 4331 + self.inner.ready().await.map_err(|e| { 4332 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4333 + })?; 5061 4334 let codec = tonic::codec::ProstCodec::default(); 5062 4335 let path = http::uri::PathAndQuery::from_static( 5063 4336 "/rockbox.v1alpha1.PlaylistService/InsertTracks", 5064 4337 ); 5065 4338 let mut req = request.into_request(); 5066 - req.extensions_mut() 5067 - .insert( 5068 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), 5069 - ); 4339 + req.extensions_mut().insert(GrpcMethod::new( 4340 + "rockbox.v1alpha1.PlaylistService", 4341 + "InsertTracks", 4342 + )); 5070 4343 self.inner.unary(req, path, codec).await 5071 4344 } 5072 4345 pub async fn insert_directory( 5073 4346 &mut self, 5074 4347 request: impl tonic::IntoRequest<super::InsertDirectoryRequest>, 5075 - ) -> std::result::Result< 5076 - tonic::Response<super::InsertDirectoryResponse>, 5077 - tonic::Status, 5078 - > { 5079 - self.inner 5080 - .ready() 5081 - .await 5082 - .map_err(|e| { 5083 - tonic::Status::unknown( 5084 - format!("Service was not ready: {}", e.into()), 5085 - ) 5086 - })?; 4348 + ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status> 4349 + { 4350 + self.inner.ready().await.map_err(|e| { 4351 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4352 + })?; 5087 4353 let codec = tonic::codec::ProstCodec::default(); 5088 4354 let path = http::uri::PathAndQuery::from_static( 5089 4355 "/rockbox.v1alpha1.PlaylistService/InsertDirectory", 5090 4356 ); 5091 4357 let mut req = request.into_request(); 5092 - req.extensions_mut() 5093 - .insert( 5094 - GrpcMethod::new( 5095 - "rockbox.v1alpha1.PlaylistService", 5096 - "InsertDirectory", 5097 - ), 5098 - ); 4358 + req.extensions_mut().insert(GrpcMethod::new( 4359 + "rockbox.v1alpha1.PlaylistService", 4360 + "InsertDirectory", 4361 + )); 5099 4362 self.inner.unary(req, path, codec).await 5100 4363 } 5101 4364 pub async fn insert_playlist( 5102 4365 &mut self, 5103 4366 request: impl tonic::IntoRequest<super::InsertPlaylistRequest>, 5104 - ) -> std::result::Result< 5105 - tonic::Response<super::InsertPlaylistResponse>, 5106 - tonic::Status, 5107 - > { 5108 - self.inner 5109 - .ready() 5110 - .await 5111 - .map_err(|e| { 5112 - tonic::Status::unknown( 5113 - format!("Service was not ready: {}", e.into()), 5114 - ) 5115 - })?; 4367 + ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status> 4368 + { 4369 + self.inner.ready().await.map_err(|e| { 4370 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4371 + })?; 5116 4372 let codec = tonic::codec::ProstCodec::default(); 5117 4373 let path = http::uri::PathAndQuery::from_static( 5118 4374 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", 5119 4375 ); 5120 4376 let mut req = request.into_request(); 5121 - req.extensions_mut() 5122 - .insert( 5123 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), 5124 - ); 4377 + req.extensions_mut().insert(GrpcMethod::new( 4378 + "rockbox.v1alpha1.PlaylistService", 4379 + "InsertPlaylist", 4380 + )); 5125 4381 self.inner.unary(req, path, codec).await 5126 4382 } 5127 4383 pub async fn insert_album( 5128 4384 &mut self, 5129 4385 request: impl tonic::IntoRequest<super::InsertAlbumRequest>, 5130 - ) -> std::result::Result< 5131 - tonic::Response<super::InsertAlbumResponse>, 5132 - tonic::Status, 5133 - > { 5134 - self.inner 5135 - .ready() 5136 - .await 5137 - .map_err(|e| { 5138 - tonic::Status::unknown( 5139 - format!("Service was not ready: {}", e.into()), 5140 - ) 5141 - })?; 4386 + ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status> 4387 + { 4388 + self.inner.ready().await.map_err(|e| { 4389 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4390 + })?; 5142 4391 let codec = tonic::codec::ProstCodec::default(); 5143 4392 let path = http::uri::PathAndQuery::from_static( 5144 4393 "/rockbox.v1alpha1.PlaylistService/InsertAlbum", 5145 4394 ); 5146 4395 let mut req = request.into_request(); 5147 - req.extensions_mut() 5148 - .insert( 5149 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), 5150 - ); 4396 + req.extensions_mut().insert(GrpcMethod::new( 4397 + "rockbox.v1alpha1.PlaylistService", 4398 + "InsertAlbum", 4399 + )); 5151 4400 self.inner.unary(req, path, codec).await 5152 4401 } 5153 4402 pub async fn insert_artist_tracks( 5154 4403 &mut self, 5155 4404 request: impl tonic::IntoRequest<super::InsertArtistTracksRequest>, 5156 - ) -> std::result::Result< 5157 - tonic::Response<super::InsertArtistTracksResponse>, 5158 - tonic::Status, 5159 - > { 5160 - self.inner 5161 - .ready() 5162 - .await 5163 - .map_err(|e| { 5164 - tonic::Status::unknown( 5165 - format!("Service was not ready: {}", e.into()), 5166 - ) 5167 - })?; 4405 + ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status> 4406 + { 4407 + self.inner.ready().await.map_err(|e| { 4408 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4409 + })?; 5168 4410 let codec = tonic::codec::ProstCodec::default(); 5169 4411 let path = http::uri::PathAndQuery::from_static( 5170 4412 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", 5171 4413 ); 5172 4414 let mut req = request.into_request(); 5173 - req.extensions_mut() 5174 - .insert( 5175 - GrpcMethod::new( 5176 - "rockbox.v1alpha1.PlaylistService", 5177 - "InsertArtistTracks", 5178 - ), 5179 - ); 4415 + req.extensions_mut().insert(GrpcMethod::new( 4416 + "rockbox.v1alpha1.PlaylistService", 4417 + "InsertArtistTracks", 4418 + )); 5180 4419 self.inner.unary(req, path, codec).await 5181 4420 } 5182 4421 pub async fn shuffle_playlist( 5183 4422 &mut self, 5184 4423 request: impl tonic::IntoRequest<super::ShufflePlaylistRequest>, 5185 - ) -> std::result::Result< 5186 - tonic::Response<super::ShufflePlaylistResponse>, 5187 - tonic::Status, 5188 - > { 5189 - self.inner 5190 - .ready() 5191 - .await 5192 - .map_err(|e| { 5193 - tonic::Status::unknown( 5194 - format!("Service was not ready: {}", e.into()), 5195 - ) 5196 - })?; 4424 + ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status> 4425 + { 4426 + self.inner.ready().await.map_err(|e| { 4427 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4428 + })?; 5197 4429 let codec = tonic::codec::ProstCodec::default(); 5198 4430 let path = http::uri::PathAndQuery::from_static( 5199 4431 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", 5200 4432 ); 5201 4433 let mut req = request.into_request(); 5202 - req.extensions_mut() 5203 - .insert( 5204 - GrpcMethod::new( 5205 - "rockbox.v1alpha1.PlaylistService", 5206 - "ShufflePlaylist", 5207 - ), 5208 - ); 4434 + req.extensions_mut().insert(GrpcMethod::new( 4435 + "rockbox.v1alpha1.PlaylistService", 4436 + "ShufflePlaylist", 4437 + )); 5209 4438 self.inner.unary(req, path, codec).await 5210 4439 } 5211 4440 } ··· 5217 4446 dead_code, 5218 4447 missing_docs, 5219 4448 clippy::wildcard_imports, 5220 - clippy::let_unit_value, 4449 + clippy::let_unit_value 5221 4450 )] 5222 4451 use tonic::codegen::*; 5223 4452 /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. ··· 5226 4455 async fn get_current( 5227 4456 &self, 5228 4457 request: tonic::Request<super::GetCurrentRequest>, 5229 - ) -> std::result::Result< 5230 - tonic::Response<super::GetCurrentResponse>, 5231 - tonic::Status, 5232 - >; 4458 + ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status>; 5233 4459 async fn get_resume_info( 5234 4460 &self, 5235 4461 request: tonic::Request<super::GetResumeInfoRequest>, 5236 - ) -> std::result::Result< 5237 - tonic::Response<super::GetResumeInfoResponse>, 5238 - tonic::Status, 5239 - >; 4462 + ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status>; 5240 4463 async fn get_track_info( 5241 4464 &self, 5242 4465 request: tonic::Request<super::GetTrackInfoRequest>, 5243 - ) -> std::result::Result< 5244 - tonic::Response<super::GetTrackInfoResponse>, 5245 - tonic::Status, 5246 - >; 4466 + ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status>; 5247 4467 async fn get_first_index( 5248 4468 &self, 5249 4469 request: tonic::Request<super::GetFirstIndexRequest>, 5250 - ) -> std::result::Result< 5251 - tonic::Response<super::GetFirstIndexResponse>, 5252 - tonic::Status, 5253 - >; 4470 + ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status>; 5254 4471 async fn get_display_index( 5255 4472 &self, 5256 4473 request: tonic::Request<super::GetDisplayIndexRequest>, 5257 - ) -> std::result::Result< 5258 - tonic::Response<super::GetDisplayIndexResponse>, 5259 - tonic::Status, 5260 - >; 4474 + ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status>; 5261 4475 async fn amount( 5262 4476 &self, 5263 4477 request: tonic::Request<super::AmountRequest>, ··· 5265 4479 async fn playlist_resume( 5266 4480 &self, 5267 4481 request: tonic::Request<super::PlaylistResumeRequest>, 5268 - ) -> std::result::Result< 5269 - tonic::Response<super::PlaylistResumeResponse>, 5270 - tonic::Status, 5271 - >; 4482 + ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status>; 5272 4483 async fn resume_track( 5273 4484 &self, 5274 4485 request: tonic::Request<super::ResumeTrackRequest>, 5275 - ) -> std::result::Result< 5276 - tonic::Response<super::ResumeTrackResponse>, 5277 - tonic::Status, 5278 - >; 4486 + ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status>; 5279 4487 async fn set_modified( 5280 4488 &self, 5281 4489 request: tonic::Request<super::SetModifiedRequest>, 5282 - ) -> std::result::Result< 5283 - tonic::Response<super::SetModifiedResponse>, 5284 - tonic::Status, 5285 - >; 4490 + ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status>; 5286 4491 async fn start( 5287 4492 &self, 5288 4493 request: tonic::Request<super::StartRequest>, ··· 5294 4499 async fn remove_all_tracks( 5295 4500 &self, 5296 4501 request: tonic::Request<super::RemoveAllTracksRequest>, 5297 - ) -> std::result::Result< 5298 - tonic::Response<super::RemoveAllTracksResponse>, 5299 - tonic::Status, 5300 - >; 4502 + ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status>; 5301 4503 async fn remove_tracks( 5302 4504 &self, 5303 4505 request: tonic::Request<super::RemoveTracksRequest>, 5304 - ) -> std::result::Result< 5305 - tonic::Response<super::RemoveTracksResponse>, 5306 - tonic::Status, 5307 - >; 4506 + ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status>; 5308 4507 async fn create_playlist( 5309 4508 &self, 5310 4509 request: tonic::Request<super::CreatePlaylistRequest>, 5311 - ) -> std::result::Result< 5312 - tonic::Response<super::CreatePlaylistResponse>, 5313 - tonic::Status, 5314 - >; 4510 + ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status>; 5315 4511 async fn insert_tracks( 5316 4512 &self, 5317 4513 request: tonic::Request<super::InsertTracksRequest>, 5318 - ) -> std::result::Result< 5319 - tonic::Response<super::InsertTracksResponse>, 5320 - tonic::Status, 5321 - >; 4514 + ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status>; 5322 4515 async fn insert_directory( 5323 4516 &self, 5324 4517 request: tonic::Request<super::InsertDirectoryRequest>, 5325 - ) -> std::result::Result< 5326 - tonic::Response<super::InsertDirectoryResponse>, 5327 - tonic::Status, 5328 - >; 4518 + ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status>; 5329 4519 async fn insert_playlist( 5330 4520 &self, 5331 4521 request: tonic::Request<super::InsertPlaylistRequest>, 5332 - ) -> std::result::Result< 5333 - tonic::Response<super::InsertPlaylistResponse>, 5334 - tonic::Status, 5335 - >; 4522 + ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status>; 5336 4523 async fn insert_album( 5337 4524 &self, 5338 4525 request: tonic::Request<super::InsertAlbumRequest>, 5339 - ) -> std::result::Result< 5340 - tonic::Response<super::InsertAlbumResponse>, 5341 - tonic::Status, 5342 - >; 4526 + ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status>; 5343 4527 async fn insert_artist_tracks( 5344 4528 &self, 5345 4529 request: tonic::Request<super::InsertArtistTracksRequest>, 5346 - ) -> std::result::Result< 5347 - tonic::Response<super::InsertArtistTracksResponse>, 5348 - tonic::Status, 5349 - >; 4530 + ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status>; 5350 4531 async fn shuffle_playlist( 5351 4532 &self, 5352 4533 request: tonic::Request<super::ShufflePlaylistRequest>, 5353 - ) -> std::result::Result< 5354 - tonic::Response<super::ShufflePlaylistResponse>, 5355 - tonic::Status, 5356 - >; 4534 + ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status>; 5357 4535 } 5358 4536 #[derive(Debug)] 5359 4537 pub struct PlaylistServiceServer<T> { ··· 5376 4554 max_encoding_message_size: None, 5377 4555 } 5378 4556 } 5379 - pub fn with_interceptor<F>( 5380 - inner: T, 5381 - interceptor: F, 5382 - ) -> InterceptedService<Self, F> 4557 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 5383 4558 where 5384 4559 F: tonic::service::Interceptor, 5385 4560 { ··· 5434 4609 "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { 5435 4610 #[allow(non_camel_case_types)] 5436 4611 struct GetCurrentSvc<T: PlaylistService>(pub Arc<T>); 5437 - impl< 5438 - T: PlaylistService, 5439 - > tonic::server::UnaryService<super::GetCurrentRequest> 5440 - for GetCurrentSvc<T> { 4612 + impl<T: PlaylistService> tonic::server::UnaryService<super::GetCurrentRequest> 4613 + for GetCurrentSvc<T> 4614 + { 5441 4615 type Response = super::GetCurrentResponse; 5442 - type Future = BoxFuture< 5443 - tonic::Response<Self::Response>, 5444 - tonic::Status, 5445 - >; 4616 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5446 4617 fn call( 5447 4618 &mut self, 5448 4619 request: tonic::Request<super::GetCurrentRequest>, ··· 5479 4650 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { 5480 4651 #[allow(non_camel_case_types)] 5481 4652 struct GetResumeInfoSvc<T: PlaylistService>(pub Arc<T>); 5482 - impl< 5483 - T: PlaylistService, 5484 - > tonic::server::UnaryService<super::GetResumeInfoRequest> 5485 - for GetResumeInfoSvc<T> { 4653 + impl<T: PlaylistService> 4654 + tonic::server::UnaryService<super::GetResumeInfoRequest> 4655 + for GetResumeInfoSvc<T> 4656 + { 5486 4657 type Response = super::GetResumeInfoResponse; 5487 - type Future = BoxFuture< 5488 - tonic::Response<Self::Response>, 5489 - tonic::Status, 5490 - >; 4658 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5491 4659 fn call( 5492 4660 &mut self, 5493 4661 request: tonic::Request<super::GetResumeInfoRequest>, 5494 4662 ) -> Self::Future { 5495 4663 let inner = Arc::clone(&self.0); 5496 4664 let fut = async move { 5497 - <T as PlaylistService>::get_resume_info(&inner, request) 5498 - .await 4665 + <T as PlaylistService>::get_resume_info(&inner, request).await 5499 4666 }; 5500 4667 Box::pin(fut) 5501 4668 } ··· 5525 4692 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { 5526 4693 #[allow(non_camel_case_types)] 5527 4694 struct GetTrackInfoSvc<T: PlaylistService>(pub Arc<T>); 5528 - impl< 5529 - T: PlaylistService, 5530 - > tonic::server::UnaryService<super::GetTrackInfoRequest> 5531 - for GetTrackInfoSvc<T> { 4695 + impl<T: PlaylistService> tonic::server::UnaryService<super::GetTrackInfoRequest> 4696 + for GetTrackInfoSvc<T> 4697 + { 5532 4698 type Response = super::GetTrackInfoResponse; 5533 - type Future = BoxFuture< 5534 - tonic::Response<Self::Response>, 5535 - tonic::Status, 5536 - >; 4699 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5537 4700 fn call( 5538 4701 &mut self, 5539 4702 request: tonic::Request<super::GetTrackInfoRequest>, 5540 4703 ) -> Self::Future { 5541 4704 let inner = Arc::clone(&self.0); 5542 4705 let fut = async move { 5543 - <T as PlaylistService>::get_track_info(&inner, request) 5544 - .await 4706 + <T as PlaylistService>::get_track_info(&inner, request).await 5545 4707 }; 5546 4708 Box::pin(fut) 5547 4709 } ··· 5571 4733 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { 5572 4734 #[allow(non_camel_case_types)] 5573 4735 struct GetFirstIndexSvc<T: PlaylistService>(pub Arc<T>); 5574 - impl< 5575 - T: PlaylistService, 5576 - > tonic::server::UnaryService<super::GetFirstIndexRequest> 5577 - for GetFirstIndexSvc<T> { 4736 + impl<T: PlaylistService> 4737 + tonic::server::UnaryService<super::GetFirstIndexRequest> 4738 + for GetFirstIndexSvc<T> 4739 + { 5578 4740 type Response = super::GetFirstIndexResponse; 5579 - type Future = BoxFuture< 5580 - tonic::Response<Self::Response>, 5581 - tonic::Status, 5582 - >; 4741 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5583 4742 fn call( 5584 4743 &mut self, 5585 4744 request: tonic::Request<super::GetFirstIndexRequest>, 5586 4745 ) -> Self::Future { 5587 4746 let inner = Arc::clone(&self.0); 5588 4747 let fut = async move { 5589 - <T as PlaylistService>::get_first_index(&inner, request) 5590 - .await 4748 + <T as PlaylistService>::get_first_index(&inner, request).await 5591 4749 }; 5592 4750 Box::pin(fut) 5593 4751 } ··· 5617 4775 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { 5618 4776 #[allow(non_camel_case_types)] 5619 4777 struct GetDisplayIndexSvc<T: PlaylistService>(pub Arc<T>); 5620 - impl< 5621 - T: PlaylistService, 5622 - > tonic::server::UnaryService<super::GetDisplayIndexRequest> 5623 - for GetDisplayIndexSvc<T> { 4778 + impl<T: PlaylistService> 4779 + tonic::server::UnaryService<super::GetDisplayIndexRequest> 4780 + for GetDisplayIndexSvc<T> 4781 + { 5624 4782 type Response = super::GetDisplayIndexResponse; 5625 - type Future = BoxFuture< 5626 - tonic::Response<Self::Response>, 5627 - tonic::Status, 5628 - >; 4783 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5629 4784 fn call( 5630 4785 &mut self, 5631 4786 request: tonic::Request<super::GetDisplayIndexRequest>, 5632 4787 ) -> Self::Future { 5633 4788 let inner = Arc::clone(&self.0); 5634 4789 let fut = async move { 5635 - <T as PlaylistService>::get_display_index(&inner, request) 5636 - .await 4790 + <T as PlaylistService>::get_display_index(&inner, request).await 5637 4791 }; 5638 4792 Box::pin(fut) 5639 4793 } ··· 5663 4817 "/rockbox.v1alpha1.PlaylistService/Amount" => { 5664 4818 #[allow(non_camel_case_types)] 5665 4819 struct AmountSvc<T: PlaylistService>(pub Arc<T>); 5666 - impl< 5667 - T: PlaylistService, 5668 - > tonic::server::UnaryService<super::AmountRequest> 5669 - for AmountSvc<T> { 4820 + impl<T: PlaylistService> tonic::server::UnaryService<super::AmountRequest> for AmountSvc<T> { 5670 4821 type Response = super::AmountResponse; 5671 - type Future = BoxFuture< 5672 - tonic::Response<Self::Response>, 5673 - tonic::Status, 5674 - >; 4822 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5675 4823 fn call( 5676 4824 &mut self, 5677 4825 request: tonic::Request<super::AmountRequest>, ··· 5708 4856 "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { 5709 4857 #[allow(non_camel_case_types)] 5710 4858 struct PlaylistResumeSvc<T: PlaylistService>(pub Arc<T>); 5711 - impl< 5712 - T: PlaylistService, 5713 - > tonic::server::UnaryService<super::PlaylistResumeRequest> 5714 - for PlaylistResumeSvc<T> { 4859 + impl<T: PlaylistService> 4860 + tonic::server::UnaryService<super::PlaylistResumeRequest> 4861 + for PlaylistResumeSvc<T> 4862 + { 5715 4863 type Response = super::PlaylistResumeResponse; 5716 - type Future = BoxFuture< 5717 - tonic::Response<Self::Response>, 5718 - tonic::Status, 5719 - >; 4864 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5720 4865 fn call( 5721 4866 &mut self, 5722 4867 request: tonic::Request<super::PlaylistResumeRequest>, 5723 4868 ) -> Self::Future { 5724 4869 let inner = Arc::clone(&self.0); 5725 4870 let fut = async move { 5726 - <T as PlaylistService>::playlist_resume(&inner, request) 5727 - .await 4871 + <T as PlaylistService>::playlist_resume(&inner, request).await 5728 4872 }; 5729 4873 Box::pin(fut) 5730 4874 } ··· 5754 4898 "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { 5755 4899 #[allow(non_camel_case_types)] 5756 4900 struct ResumeTrackSvc<T: PlaylistService>(pub Arc<T>); 5757 - impl< 5758 - T: PlaylistService, 5759 - > tonic::server::UnaryService<super::ResumeTrackRequest> 5760 - for ResumeTrackSvc<T> { 4901 + impl<T: PlaylistService> tonic::server::UnaryService<super::ResumeTrackRequest> 4902 + for ResumeTrackSvc<T> 4903 + { 5761 4904 type Response = super::ResumeTrackResponse; 5762 - type Future = BoxFuture< 5763 - tonic::Response<Self::Response>, 5764 - tonic::Status, 5765 - >; 4905 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5766 4906 fn call( 5767 4907 &mut self, 5768 4908 request: tonic::Request<super::ResumeTrackRequest>, ··· 5799 4939 "/rockbox.v1alpha1.PlaylistService/SetModified" => { 5800 4940 #[allow(non_camel_case_types)] 5801 4941 struct SetModifiedSvc<T: PlaylistService>(pub Arc<T>); 5802 - impl< 5803 - T: PlaylistService, 5804 - > tonic::server::UnaryService<super::SetModifiedRequest> 5805 - for SetModifiedSvc<T> { 4942 + impl<T: PlaylistService> tonic::server::UnaryService<super::SetModifiedRequest> 4943 + for SetModifiedSvc<T> 4944 + { 5806 4945 type Response = super::SetModifiedResponse; 5807 - type Future = BoxFuture< 5808 - tonic::Response<Self::Response>, 5809 - tonic::Status, 5810 - >; 4946 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5811 4947 fn call( 5812 4948 &mut self, 5813 4949 request: tonic::Request<super::SetModifiedRequest>, ··· 5844 4980 "/rockbox.v1alpha1.PlaylistService/Start" => { 5845 4981 #[allow(non_camel_case_types)] 5846 4982 struct StartSvc<T: PlaylistService>(pub Arc<T>); 5847 - impl< 5848 - T: PlaylistService, 5849 - > tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 4983 + impl<T: PlaylistService> tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 5850 4984 type Response = super::StartResponse; 5851 - type Future = BoxFuture< 5852 - tonic::Response<Self::Response>, 5853 - tonic::Status, 5854 - >; 4985 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5855 4986 fn call( 5856 4987 &mut self, 5857 4988 request: tonic::Request<super::StartRequest>, 5858 4989 ) -> Self::Future { 5859 4990 let inner = Arc::clone(&self.0); 5860 - let fut = async move { 5861 - <T as PlaylistService>::start(&inner, request).await 5862 - }; 4991 + let fut = 4992 + async move { <T as PlaylistService>::start(&inner, request).await }; 5863 4993 Box::pin(fut) 5864 4994 } 5865 4995 } ··· 5888 5018 "/rockbox.v1alpha1.PlaylistService/Sync" => { 5889 5019 #[allow(non_camel_case_types)] 5890 5020 struct SyncSvc<T: PlaylistService>(pub Arc<T>); 5891 - impl< 5892 - T: PlaylistService, 5893 - > tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 5021 + impl<T: PlaylistService> tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 5894 5022 type Response = super::SyncResponse; 5895 - type Future = BoxFuture< 5896 - tonic::Response<Self::Response>, 5897 - tonic::Status, 5898 - >; 5023 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5899 5024 fn call( 5900 5025 &mut self, 5901 5026 request: tonic::Request<super::SyncRequest>, 5902 5027 ) -> Self::Future { 5903 5028 let inner = Arc::clone(&self.0); 5904 - let fut = async move { 5905 - <T as PlaylistService>::sync(&inner, request).await 5906 - }; 5029 + let fut = 5030 + async move { <T as PlaylistService>::sync(&inner, request).await }; 5907 5031 Box::pin(fut) 5908 5032 } 5909 5033 } ··· 5932 5056 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { 5933 5057 #[allow(non_camel_case_types)] 5934 5058 struct RemoveAllTracksSvc<T: PlaylistService>(pub Arc<T>); 5935 - impl< 5936 - T: PlaylistService, 5937 - > tonic::server::UnaryService<super::RemoveAllTracksRequest> 5938 - for RemoveAllTracksSvc<T> { 5059 + impl<T: PlaylistService> 5060 + tonic::server::UnaryService<super::RemoveAllTracksRequest> 5061 + for RemoveAllTracksSvc<T> 5062 + { 5939 5063 type Response = super::RemoveAllTracksResponse; 5940 - type Future = BoxFuture< 5941 - tonic::Response<Self::Response>, 5942 - tonic::Status, 5943 - >; 5064 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5944 5065 fn call( 5945 5066 &mut self, 5946 5067 request: tonic::Request<super::RemoveAllTracksRequest>, 5947 5068 ) -> Self::Future { 5948 5069 let inner = Arc::clone(&self.0); 5949 5070 let fut = async move { 5950 - <T as PlaylistService>::remove_all_tracks(&inner, request) 5951 - .await 5071 + <T as PlaylistService>::remove_all_tracks(&inner, request).await 5952 5072 }; 5953 5073 Box::pin(fut) 5954 5074 } ··· 5978 5098 "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { 5979 5099 #[allow(non_camel_case_types)] 5980 5100 struct RemoveTracksSvc<T: PlaylistService>(pub Arc<T>); 5981 - impl< 5982 - T: PlaylistService, 5983 - > tonic::server::UnaryService<super::RemoveTracksRequest> 5984 - for RemoveTracksSvc<T> { 5101 + impl<T: PlaylistService> tonic::server::UnaryService<super::RemoveTracksRequest> 5102 + for RemoveTracksSvc<T> 5103 + { 5985 5104 type Response = super::RemoveTracksResponse; 5986 - type Future = BoxFuture< 5987 - tonic::Response<Self::Response>, 5988 - tonic::Status, 5989 - >; 5105 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5990 5106 fn call( 5991 5107 &mut self, 5992 5108 request: tonic::Request<super::RemoveTracksRequest>, ··· 6023 5139 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { 6024 5140 #[allow(non_camel_case_types)] 6025 5141 struct CreatePlaylistSvc<T: PlaylistService>(pub Arc<T>); 6026 - impl< 6027 - T: PlaylistService, 6028 - > tonic::server::UnaryService<super::CreatePlaylistRequest> 6029 - for CreatePlaylistSvc<T> { 5142 + impl<T: PlaylistService> 5143 + tonic::server::UnaryService<super::CreatePlaylistRequest> 5144 + for CreatePlaylistSvc<T> 5145 + { 6030 5146 type Response = super::CreatePlaylistResponse; 6031 - type Future = BoxFuture< 6032 - tonic::Response<Self::Response>, 6033 - tonic::Status, 6034 - >; 5147 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6035 5148 fn call( 6036 5149 &mut self, 6037 5150 request: tonic::Request<super::CreatePlaylistRequest>, 6038 5151 ) -> Self::Future { 6039 5152 let inner = Arc::clone(&self.0); 6040 5153 let fut = async move { 6041 - <T as PlaylistService>::create_playlist(&inner, request) 6042 - .await 5154 + <T as PlaylistService>::create_playlist(&inner, request).await 6043 5155 }; 6044 5156 Box::pin(fut) 6045 5157 } ··· 6069 5181 "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { 6070 5182 #[allow(non_camel_case_types)] 6071 5183 struct InsertTracksSvc<T: PlaylistService>(pub Arc<T>); 6072 - impl< 6073 - T: PlaylistService, 6074 - > tonic::server::UnaryService<super::InsertTracksRequest> 6075 - for InsertTracksSvc<T> { 5184 + impl<T: PlaylistService> tonic::server::UnaryService<super::InsertTracksRequest> 5185 + for InsertTracksSvc<T> 5186 + { 6076 5187 type Response = super::InsertTracksResponse; 6077 - type Future = BoxFuture< 6078 - tonic::Response<Self::Response>, 6079 - tonic::Status, 6080 - >; 5188 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6081 5189 fn call( 6082 5190 &mut self, 6083 5191 request: tonic::Request<super::InsertTracksRequest>, ··· 6114 5222 "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { 6115 5223 #[allow(non_camel_case_types)] 6116 5224 struct InsertDirectorySvc<T: PlaylistService>(pub Arc<T>); 6117 - impl< 6118 - T: PlaylistService, 6119 - > tonic::server::UnaryService<super::InsertDirectoryRequest> 6120 - for InsertDirectorySvc<T> { 5225 + impl<T: PlaylistService> 5226 + tonic::server::UnaryService<super::InsertDirectoryRequest> 5227 + for InsertDirectorySvc<T> 5228 + { 6121 5229 type Response = super::InsertDirectoryResponse; 6122 - type Future = BoxFuture< 6123 - tonic::Response<Self::Response>, 6124 - tonic::Status, 6125 - >; 5230 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6126 5231 fn call( 6127 5232 &mut self, 6128 5233 request: tonic::Request<super::InsertDirectoryRequest>, 6129 5234 ) -> Self::Future { 6130 5235 let inner = Arc::clone(&self.0); 6131 5236 let fut = async move { 6132 - <T as PlaylistService>::insert_directory(&inner, request) 6133 - .await 5237 + <T as PlaylistService>::insert_directory(&inner, request).await 6134 5238 }; 6135 5239 Box::pin(fut) 6136 5240 } ··· 6160 5264 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { 6161 5265 #[allow(non_camel_case_types)] 6162 5266 struct InsertPlaylistSvc<T: PlaylistService>(pub Arc<T>); 6163 - impl< 6164 - T: PlaylistService, 6165 - > tonic::server::UnaryService<super::InsertPlaylistRequest> 6166 - for InsertPlaylistSvc<T> { 5267 + impl<T: PlaylistService> 5268 + tonic::server::UnaryService<super::InsertPlaylistRequest> 5269 + for InsertPlaylistSvc<T> 5270 + { 6167 5271 type Response = super::InsertPlaylistResponse; 6168 - type Future = BoxFuture< 6169 - tonic::Response<Self::Response>, 6170 - tonic::Status, 6171 - >; 5272 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6172 5273 fn call( 6173 5274 &mut self, 6174 5275 request: tonic::Request<super::InsertPlaylistRequest>, 6175 5276 ) -> Self::Future { 6176 5277 let inner = Arc::clone(&self.0); 6177 5278 let fut = async move { 6178 - <T as PlaylistService>::insert_playlist(&inner, request) 6179 - .await 5279 + <T as PlaylistService>::insert_playlist(&inner, request).await 6180 5280 }; 6181 5281 Box::pin(fut) 6182 5282 } ··· 6206 5306 "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { 6207 5307 #[allow(non_camel_case_types)] 6208 5308 struct InsertAlbumSvc<T: PlaylistService>(pub Arc<T>); 6209 - impl< 6210 - T: PlaylistService, 6211 - > tonic::server::UnaryService<super::InsertAlbumRequest> 6212 - for InsertAlbumSvc<T> { 5309 + impl<T: PlaylistService> tonic::server::UnaryService<super::InsertAlbumRequest> 5310 + for InsertAlbumSvc<T> 5311 + { 6213 5312 type Response = super::InsertAlbumResponse; 6214 - type Future = BoxFuture< 6215 - tonic::Response<Self::Response>, 6216 - tonic::Status, 6217 - >; 5313 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6218 5314 fn call( 6219 5315 &mut self, 6220 5316 request: tonic::Request<super::InsertAlbumRequest>, ··· 6251 5347 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { 6252 5348 #[allow(non_camel_case_types)] 6253 5349 struct InsertArtistTracksSvc<T: PlaylistService>(pub Arc<T>); 6254 - impl< 6255 - T: PlaylistService, 6256 - > tonic::server::UnaryService<super::InsertArtistTracksRequest> 6257 - for InsertArtistTracksSvc<T> { 5350 + impl<T: PlaylistService> 5351 + tonic::server::UnaryService<super::InsertArtistTracksRequest> 5352 + for InsertArtistTracksSvc<T> 5353 + { 6258 5354 type Response = super::InsertArtistTracksResponse; 6259 - type Future = BoxFuture< 6260 - tonic::Response<Self::Response>, 6261 - tonic::Status, 6262 - >; 5355 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6263 5356 fn call( 6264 5357 &mut self, 6265 5358 request: tonic::Request<super::InsertArtistTracksRequest>, 6266 5359 ) -> Self::Future { 6267 5360 let inner = Arc::clone(&self.0); 6268 5361 let fut = async move { 6269 - <T as PlaylistService>::insert_artist_tracks( 6270 - &inner, 6271 - request, 6272 - ) 6273 - .await 5362 + <T as PlaylistService>::insert_artist_tracks(&inner, request).await 6274 5363 }; 6275 5364 Box::pin(fut) 6276 5365 } ··· 6300 5389 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { 6301 5390 #[allow(non_camel_case_types)] 6302 5391 struct ShufflePlaylistSvc<T: PlaylistService>(pub Arc<T>); 6303 - impl< 6304 - T: PlaylistService, 6305 - > tonic::server::UnaryService<super::ShufflePlaylistRequest> 6306 - for ShufflePlaylistSvc<T> { 5392 + impl<T: PlaylistService> 5393 + tonic::server::UnaryService<super::ShufflePlaylistRequest> 5394 + for ShufflePlaylistSvc<T> 5395 + { 6307 5396 type Response = super::ShufflePlaylistResponse; 6308 - type Future = BoxFuture< 6309 - tonic::Response<Self::Response>, 6310 - tonic::Status, 6311 - >; 5397 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6312 5398 fn call( 6313 5399 &mut self, 6314 5400 request: tonic::Request<super::ShufflePlaylistRequest>, 6315 5401 ) -> Self::Future { 6316 5402 let inner = Arc::clone(&self.0); 6317 5403 let fut = async move { 6318 - <T as PlaylistService>::shuffle_playlist(&inner, request) 6319 - .await 5404 + <T as PlaylistService>::shuffle_playlist(&inner, request).await 6320 5405 }; 6321 5406 Box::pin(fut) 6322 5407 } ··· 6343 5428 }; 6344 5429 Box::pin(fut) 6345 5430 } 6346 - _ => { 6347 - Box::pin(async move { 6348 - let mut response = http::Response::new(empty_body()); 6349 - let headers = response.headers_mut(); 6350 - headers 6351 - .insert( 6352 - tonic::Status::GRPC_STATUS, 6353 - (tonic::Code::Unimplemented as i32).into(), 6354 - ); 6355 - headers 6356 - .insert( 6357 - http::header::CONTENT_TYPE, 6358 - tonic::metadata::GRPC_CONTENT_TYPE, 6359 - ); 6360 - Ok(response) 6361 - }) 6362 - } 5431 + _ => Box::pin(async move { 5432 + let mut response = http::Response::new(empty_body()); 5433 + let headers = response.headers_mut(); 5434 + headers.insert( 5435 + tonic::Status::GRPC_STATUS, 5436 + (tonic::Code::Unimplemented as i32).into(), 5437 + ); 5438 + headers.insert( 5439 + http::header::CONTENT_TYPE, 5440 + tonic::metadata::GRPC_CONTENT_TYPE, 5441 + ); 5442 + Ok(response) 5443 + }), 6363 5444 } 6364 5445 } 6365 5446 } ··· 6869 5950 dead_code, 6870 5951 missing_docs, 6871 5952 clippy::wildcard_imports, 6872 - clippy::let_unit_value, 5953 + clippy::let_unit_value 6873 5954 )] 6874 - use tonic::codegen::*; 6875 5955 use tonic::codegen::http::Uri; 5956 + use tonic::codegen::*; 6876 5957 #[derive(Debug, Clone)] 6877 5958 pub struct SettingsServiceClient<T> { 6878 5959 inner: tonic::client::Grpc<T>, ··· 6916 5997 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 6917 5998 >, 6918 5999 >, 6919 - <T as tonic::codegen::Service< 6920 - http::Request<tonic::body::BoxBody>, 6921 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6000 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6001 + Into<StdError> + std::marker::Send + std::marker::Sync, 6922 6002 { 6923 6003 SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) 6924 6004 } ··· 6956 6036 pub async fn get_settings_list( 6957 6037 &mut self, 6958 6038 request: impl tonic::IntoRequest<super::GetSettingsListRequest>, 6959 - ) -> std::result::Result< 6960 - tonic::Response<super::GetSettingsListResponse>, 6961 - tonic::Status, 6962 - > { 6963 - self.inner 6964 - .ready() 6965 - .await 6966 - .map_err(|e| { 6967 - tonic::Status::unknown( 6968 - format!("Service was not ready: {}", e.into()), 6969 - ) 6970 - })?; 6039 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status> 6040 + { 6041 + self.inner.ready().await.map_err(|e| { 6042 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6043 + })?; 6971 6044 let codec = tonic::codec::ProstCodec::default(); 6972 6045 let path = http::uri::PathAndQuery::from_static( 6973 6046 "/rockbox.v1alpha1.SettingsService/GetSettingsList", 6974 6047 ); 6975 6048 let mut req = request.into_request(); 6976 - req.extensions_mut() 6977 - .insert( 6978 - GrpcMethod::new( 6979 - "rockbox.v1alpha1.SettingsService", 6980 - "GetSettingsList", 6981 - ), 6982 - ); 6049 + req.extensions_mut().insert(GrpcMethod::new( 6050 + "rockbox.v1alpha1.SettingsService", 6051 + "GetSettingsList", 6052 + )); 6983 6053 self.inner.unary(req, path, codec).await 6984 6054 } 6985 6055 pub async fn get_global_settings( 6986 6056 &mut self, 6987 6057 request: impl tonic::IntoRequest<super::GetGlobalSettingsRequest>, 6988 - ) -> std::result::Result< 6989 - tonic::Response<super::GetGlobalSettingsResponse>, 6990 - tonic::Status, 6991 - > { 6992 - self.inner 6993 - .ready() 6994 - .await 6995 - .map_err(|e| { 6996 - tonic::Status::unknown( 6997 - format!("Service was not ready: {}", e.into()), 6998 - ) 6999 - })?; 6058 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status> 6059 + { 6060 + self.inner.ready().await.map_err(|e| { 6061 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6062 + })?; 7000 6063 let codec = tonic::codec::ProstCodec::default(); 7001 6064 let path = http::uri::PathAndQuery::from_static( 7002 6065 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", 7003 6066 ); 7004 6067 let mut req = request.into_request(); 7005 - req.extensions_mut() 7006 - .insert( 7007 - GrpcMethod::new( 7008 - "rockbox.v1alpha1.SettingsService", 7009 - "GetGlobalSettings", 7010 - ), 7011 - ); 6068 + req.extensions_mut().insert(GrpcMethod::new( 6069 + "rockbox.v1alpha1.SettingsService", 6070 + "GetGlobalSettings", 6071 + )); 7012 6072 self.inner.unary(req, path, codec).await 7013 6073 } 7014 6074 pub async fn save_settings( 7015 6075 &mut self, 7016 6076 request: impl tonic::IntoRequest<super::SaveSettingsRequest>, 7017 - ) -> std::result::Result< 7018 - tonic::Response<super::SaveSettingsResponse>, 7019 - tonic::Status, 7020 - > { 7021 - self.inner 7022 - .ready() 7023 - .await 7024 - .map_err(|e| { 7025 - tonic::Status::unknown( 7026 - format!("Service was not ready: {}", e.into()), 7027 - ) 7028 - })?; 6077 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status> 6078 + { 6079 + self.inner.ready().await.map_err(|e| { 6080 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6081 + })?; 7029 6082 let codec = tonic::codec::ProstCodec::default(); 7030 6083 let path = http::uri::PathAndQuery::from_static( 7031 6084 "/rockbox.v1alpha1.SettingsService/SaveSettings", 7032 6085 ); 7033 6086 let mut req = request.into_request(); 7034 - req.extensions_mut() 7035 - .insert( 7036 - GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), 7037 - ); 6087 + req.extensions_mut().insert(GrpcMethod::new( 6088 + "rockbox.v1alpha1.SettingsService", 6089 + "SaveSettings", 6090 + )); 7038 6091 self.inner.unary(req, path, codec).await 7039 6092 } 7040 6093 } ··· 7046 6099 dead_code, 7047 6100 missing_docs, 7048 6101 clippy::wildcard_imports, 7049 - clippy::let_unit_value, 6102 + clippy::let_unit_value 7050 6103 )] 7051 6104 use tonic::codegen::*; 7052 6105 /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. ··· 7055 6108 async fn get_settings_list( 7056 6109 &self, 7057 6110 request: tonic::Request<super::GetSettingsListRequest>, 7058 - ) -> std::result::Result< 7059 - tonic::Response<super::GetSettingsListResponse>, 7060 - tonic::Status, 7061 - >; 6111 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status>; 7062 6112 async fn get_global_settings( 7063 6113 &self, 7064 6114 request: tonic::Request<super::GetGlobalSettingsRequest>, 7065 - ) -> std::result::Result< 7066 - tonic::Response<super::GetGlobalSettingsResponse>, 7067 - tonic::Status, 7068 - >; 6115 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status>; 7069 6116 async fn save_settings( 7070 6117 &self, 7071 6118 request: tonic::Request<super::SaveSettingsRequest>, 7072 - ) -> std::result::Result< 7073 - tonic::Response<super::SaveSettingsResponse>, 7074 - tonic::Status, 7075 - >; 6119 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status>; 7076 6120 } 7077 6121 #[derive(Debug)] 7078 6122 pub struct SettingsServiceServer<T> { ··· 7095 6139 max_encoding_message_size: None, 7096 6140 } 7097 6141 } 7098 - pub fn with_interceptor<F>( 7099 - inner: T, 7100 - interceptor: F, 7101 - ) -> InterceptedService<Self, F> 6142 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 7102 6143 where 7103 6144 F: tonic::service::Interceptor, 7104 6145 { ··· 7153 6194 "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { 7154 6195 #[allow(non_camel_case_types)] 7155 6196 struct GetSettingsListSvc<T: SettingsService>(pub Arc<T>); 7156 - impl< 7157 - T: SettingsService, 7158 - > tonic::server::UnaryService<super::GetSettingsListRequest> 7159 - for GetSettingsListSvc<T> { 6197 + impl<T: SettingsService> 6198 + tonic::server::UnaryService<super::GetSettingsListRequest> 6199 + for GetSettingsListSvc<T> 6200 + { 7160 6201 type Response = super::GetSettingsListResponse; 7161 - type Future = BoxFuture< 7162 - tonic::Response<Self::Response>, 7163 - tonic::Status, 7164 - >; 6202 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7165 6203 fn call( 7166 6204 &mut self, 7167 6205 request: tonic::Request<super::GetSettingsListRequest>, 7168 6206 ) -> Self::Future { 7169 6207 let inner = Arc::clone(&self.0); 7170 6208 let fut = async move { 7171 - <T as SettingsService>::get_settings_list(&inner, request) 7172 - .await 6209 + <T as SettingsService>::get_settings_list(&inner, request).await 7173 6210 }; 7174 6211 Box::pin(fut) 7175 6212 } ··· 7199 6236 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { 7200 6237 #[allow(non_camel_case_types)] 7201 6238 struct GetGlobalSettingsSvc<T: SettingsService>(pub Arc<T>); 7202 - impl< 7203 - T: SettingsService, 7204 - > tonic::server::UnaryService<super::GetGlobalSettingsRequest> 7205 - for GetGlobalSettingsSvc<T> { 6239 + impl<T: SettingsService> 6240 + tonic::server::UnaryService<super::GetGlobalSettingsRequest> 6241 + for GetGlobalSettingsSvc<T> 6242 + { 7206 6243 type Response = super::GetGlobalSettingsResponse; 7207 - type Future = BoxFuture< 7208 - tonic::Response<Self::Response>, 7209 - tonic::Status, 7210 - >; 6244 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7211 6245 fn call( 7212 6246 &mut self, 7213 6247 request: tonic::Request<super::GetGlobalSettingsRequest>, 7214 6248 ) -> Self::Future { 7215 6249 let inner = Arc::clone(&self.0); 7216 6250 let fut = async move { 7217 - <T as SettingsService>::get_global_settings(&inner, request) 7218 - .await 6251 + <T as SettingsService>::get_global_settings(&inner, request).await 7219 6252 }; 7220 6253 Box::pin(fut) 7221 6254 } ··· 7245 6278 "/rockbox.v1alpha1.SettingsService/SaveSettings" => { 7246 6279 #[allow(non_camel_case_types)] 7247 6280 struct SaveSettingsSvc<T: SettingsService>(pub Arc<T>); 7248 - impl< 7249 - T: SettingsService, 7250 - > tonic::server::UnaryService<super::SaveSettingsRequest> 7251 - for SaveSettingsSvc<T> { 6281 + impl<T: SettingsService> tonic::server::UnaryService<super::SaveSettingsRequest> 6282 + for SaveSettingsSvc<T> 6283 + { 7252 6284 type Response = super::SaveSettingsResponse; 7253 - type Future = BoxFuture< 7254 - tonic::Response<Self::Response>, 7255 - tonic::Status, 7256 - >; 6285 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7257 6286 fn call( 7258 6287 &mut self, 7259 6288 request: tonic::Request<super::SaveSettingsRequest>, ··· 7287 6316 }; 7288 6317 Box::pin(fut) 7289 6318 } 7290 - _ => { 7291 - Box::pin(async move { 7292 - let mut response = http::Response::new(empty_body()); 7293 - let headers = response.headers_mut(); 7294 - headers 7295 - .insert( 7296 - tonic::Status::GRPC_STATUS, 7297 - (tonic::Code::Unimplemented as i32).into(), 7298 - ); 7299 - headers 7300 - .insert( 7301 - http::header::CONTENT_TYPE, 7302 - tonic::metadata::GRPC_CONTENT_TYPE, 7303 - ); 7304 - Ok(response) 7305 - }) 7306 - } 6319 + _ => Box::pin(async move { 6320 + let mut response = http::Response::new(empty_body()); 6321 + let headers = response.headers_mut(); 6322 + headers.insert( 6323 + tonic::Status::GRPC_STATUS, 6324 + (tonic::Code::Unimplemented as i32).into(), 6325 + ); 6326 + headers.insert( 6327 + http::header::CONTENT_TYPE, 6328 + tonic::metadata::GRPC_CONTENT_TYPE, 6329 + ); 6330 + Ok(response) 6331 + }), 7307 6332 } 7308 6333 } 7309 6334 } ··· 7461 6486 dead_code, 7462 6487 missing_docs, 7463 6488 clippy::wildcard_imports, 7464 - clippy::let_unit_value, 6489 + clippy::let_unit_value 7465 6490 )] 7466 - use tonic::codegen::*; 7467 6491 use tonic::codegen::http::Uri; 6492 + use tonic::codegen::*; 7468 6493 #[derive(Debug, Clone)] 7469 6494 pub struct SoundServiceClient<T> { 7470 6495 inner: tonic::client::Grpc<T>, ··· 7508 6533 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 7509 6534 >, 7510 6535 >, 7511 - <T as tonic::codegen::Service< 7512 - http::Request<tonic::body::BoxBody>, 7513 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6536 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6537 + Into<StdError> + std::marker::Send + std::marker::Sync, 7514 6538 { 7515 6539 SoundServiceClient::new(InterceptedService::new(inner, interceptor)) 7516 6540 } ··· 7548 6572 pub async fn adjust_volume( 7549 6573 &mut self, 7550 6574 request: impl tonic::IntoRequest<super::AdjustVolumeRequest>, 7551 - ) -> std::result::Result< 7552 - tonic::Response<super::AdjustVolumeResponse>, 7553 - tonic::Status, 7554 - > { 7555 - self.inner 7556 - .ready() 7557 - .await 7558 - .map_err(|e| { 7559 - tonic::Status::unknown( 7560 - format!("Service was not ready: {}", e.into()), 7561 - ) 7562 - })?; 6575 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status> 6576 + { 6577 + self.inner.ready().await.map_err(|e| { 6578 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6579 + })?; 7563 6580 let codec = tonic::codec::ProstCodec::default(); 7564 - let path = http::uri::PathAndQuery::from_static( 7565 - "/rockbox.v1alpha1.SoundService/AdjustVolume", 7566 - ); 6581 + let path = 6582 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); 7567 6583 let mut req = request.into_request(); 7568 - req.extensions_mut() 7569 - .insert( 7570 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), 7571 - ); 6584 + req.extensions_mut().insert(GrpcMethod::new( 6585 + "rockbox.v1alpha1.SoundService", 6586 + "AdjustVolume", 6587 + )); 7572 6588 self.inner.unary(req, path, codec).await 7573 6589 } 7574 6590 pub async fn sound_set( 7575 6591 &mut self, 7576 6592 request: impl tonic::IntoRequest<super::SoundSetRequest>, 7577 - ) -> std::result::Result< 7578 - tonic::Response<super::SoundSetResponse>, 7579 - tonic::Status, 7580 - > { 7581 - self.inner 7582 - .ready() 7583 - .await 7584 - .map_err(|e| { 7585 - tonic::Status::unknown( 7586 - format!("Service was not ready: {}", e.into()), 7587 - ) 7588 - })?; 6593 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status> { 6594 + self.inner.ready().await.map_err(|e| { 6595 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6596 + })?; 7589 6597 let codec = tonic::codec::ProstCodec::default(); 7590 - let path = http::uri::PathAndQuery::from_static( 7591 - "/rockbox.v1alpha1.SoundService/SoundSet", 7592 - ); 6598 + let path = 6599 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); 7593 6600 let mut req = request.into_request(); 7594 6601 req.extensions_mut() 7595 6602 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); ··· 7598 6605 pub async fn sound_current( 7599 6606 &mut self, 7600 6607 request: impl tonic::IntoRequest<super::SoundCurrentRequest>, 7601 - ) -> std::result::Result< 7602 - tonic::Response<super::SoundCurrentResponse>, 7603 - tonic::Status, 7604 - > { 7605 - self.inner 7606 - .ready() 7607 - .await 7608 - .map_err(|e| { 7609 - tonic::Status::unknown( 7610 - format!("Service was not ready: {}", e.into()), 7611 - ) 7612 - })?; 6608 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status> 6609 + { 6610 + self.inner.ready().await.map_err(|e| { 6611 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6612 + })?; 7613 6613 let codec = tonic::codec::ProstCodec::default(); 7614 - let path = http::uri::PathAndQuery::from_static( 7615 - "/rockbox.v1alpha1.SoundService/SoundCurrent", 7616 - ); 6614 + let path = 6615 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); 7617 6616 let mut req = request.into_request(); 7618 - req.extensions_mut() 7619 - .insert( 7620 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), 7621 - ); 6617 + req.extensions_mut().insert(GrpcMethod::new( 6618 + "rockbox.v1alpha1.SoundService", 6619 + "SoundCurrent", 6620 + )); 7622 6621 self.inner.unary(req, path, codec).await 7623 6622 } 7624 6623 pub async fn sound_default( 7625 6624 &mut self, 7626 6625 request: impl tonic::IntoRequest<super::SoundDefaultRequest>, 7627 - ) -> std::result::Result< 7628 - tonic::Response<super::SoundDefaultResponse>, 7629 - tonic::Status, 7630 - > { 7631 - self.inner 7632 - .ready() 7633 - .await 7634 - .map_err(|e| { 7635 - tonic::Status::unknown( 7636 - format!("Service was not ready: {}", e.into()), 7637 - ) 7638 - })?; 6626 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status> 6627 + { 6628 + self.inner.ready().await.map_err(|e| { 6629 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6630 + })?; 7639 6631 let codec = tonic::codec::ProstCodec::default(); 7640 - let path = http::uri::PathAndQuery::from_static( 7641 - "/rockbox.v1alpha1.SoundService/SoundDefault", 7642 - ); 6632 + let path = 6633 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); 7643 6634 let mut req = request.into_request(); 7644 - req.extensions_mut() 7645 - .insert( 7646 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), 7647 - ); 6635 + req.extensions_mut().insert(GrpcMethod::new( 6636 + "rockbox.v1alpha1.SoundService", 6637 + "SoundDefault", 6638 + )); 7648 6639 self.inner.unary(req, path, codec).await 7649 6640 } 7650 6641 pub async fn sound_min( 7651 6642 &mut self, 7652 6643 request: impl tonic::IntoRequest<super::SoundMinRequest>, 7653 - ) -> std::result::Result< 7654 - tonic::Response<super::SoundMinResponse>, 7655 - tonic::Status, 7656 - > { 7657 - self.inner 7658 - .ready() 7659 - .await 7660 - .map_err(|e| { 7661 - tonic::Status::unknown( 7662 - format!("Service was not ready: {}", e.into()), 7663 - ) 7664 - })?; 6644 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status> { 6645 + self.inner.ready().await.map_err(|e| { 6646 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6647 + })?; 7665 6648 let codec = tonic::codec::ProstCodec::default(); 7666 - let path = http::uri::PathAndQuery::from_static( 7667 - "/rockbox.v1alpha1.SoundService/SoundMin", 7668 - ); 6649 + let path = 6650 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); 7669 6651 let mut req = request.into_request(); 7670 6652 req.extensions_mut() 7671 6653 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); ··· 7674 6656 pub async fn sound_max( 7675 6657 &mut self, 7676 6658 request: impl tonic::IntoRequest<super::SoundMaxRequest>, 7677 - ) -> std::result::Result< 7678 - tonic::Response<super::SoundMaxResponse>, 7679 - tonic::Status, 7680 - > { 7681 - self.inner 7682 - .ready() 7683 - .await 7684 - .map_err(|e| { 7685 - tonic::Status::unknown( 7686 - format!("Service was not ready: {}", e.into()), 7687 - ) 7688 - })?; 6659 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status> { 6660 + self.inner.ready().await.map_err(|e| { 6661 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6662 + })?; 7689 6663 let codec = tonic::codec::ProstCodec::default(); 7690 - let path = http::uri::PathAndQuery::from_static( 7691 - "/rockbox.v1alpha1.SoundService/SoundMax", 7692 - ); 6664 + let path = 6665 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); 7693 6666 let mut req = request.into_request(); 7694 6667 req.extensions_mut() 7695 6668 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); ··· 7698 6671 pub async fn sound_unit( 7699 6672 &mut self, 7700 6673 request: impl tonic::IntoRequest<super::SoundUnitRequest>, 7701 - ) -> std::result::Result< 7702 - tonic::Response<super::SoundUnitResponse>, 7703 - tonic::Status, 7704 - > { 7705 - self.inner 7706 - .ready() 7707 - .await 7708 - .map_err(|e| { 7709 - tonic::Status::unknown( 7710 - format!("Service was not ready: {}", e.into()), 7711 - ) 7712 - })?; 6674 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status> { 6675 + self.inner.ready().await.map_err(|e| { 6676 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6677 + })?; 7713 6678 let codec = tonic::codec::ProstCodec::default(); 7714 - let path = http::uri::PathAndQuery::from_static( 7715 - "/rockbox.v1alpha1.SoundService/SoundUnit", 7716 - ); 6679 + let path = 6680 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); 7717 6681 let mut req = request.into_request(); 7718 - req.extensions_mut() 7719 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); 6682 + req.extensions_mut().insert(GrpcMethod::new( 6683 + "rockbox.v1alpha1.SoundService", 6684 + "SoundUnit", 6685 + )); 7720 6686 self.inner.unary(req, path, codec).await 7721 6687 } 7722 6688 pub async fn sound_val2_phys( 7723 6689 &mut self, 7724 6690 request: impl tonic::IntoRequest<super::SoundVal2PhysRequest>, 7725 - ) -> std::result::Result< 7726 - tonic::Response<super::SoundVal2PhysResponse>, 7727 - tonic::Status, 7728 - > { 7729 - self.inner 7730 - .ready() 7731 - .await 7732 - .map_err(|e| { 7733 - tonic::Status::unknown( 7734 - format!("Service was not ready: {}", e.into()), 7735 - ) 7736 - })?; 6691 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status> 6692 + { 6693 + self.inner.ready().await.map_err(|e| { 6694 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6695 + })?; 7737 6696 let codec = tonic::codec::ProstCodec::default(); 7738 6697 let path = http::uri::PathAndQuery::from_static( 7739 6698 "/rockbox.v1alpha1.SoundService/SoundVal2Phys", 7740 6699 ); 7741 6700 let mut req = request.into_request(); 7742 - req.extensions_mut() 7743 - .insert( 7744 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), 7745 - ); 6701 + req.extensions_mut().insert(GrpcMethod::new( 6702 + "rockbox.v1alpha1.SoundService", 6703 + "SoundVal2Phys", 6704 + )); 7746 6705 self.inner.unary(req, path, codec).await 7747 6706 } 7748 6707 pub async fn get_pitch( 7749 6708 &mut self, 7750 6709 request: impl tonic::IntoRequest<super::GetPitchRequest>, 7751 - ) -> std::result::Result< 7752 - tonic::Response<super::GetPitchResponse>, 7753 - tonic::Status, 7754 - > { 7755 - self.inner 7756 - .ready() 7757 - .await 7758 - .map_err(|e| { 7759 - tonic::Status::unknown( 7760 - format!("Service was not ready: {}", e.into()), 7761 - ) 7762 - })?; 6710 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status> { 6711 + self.inner.ready().await.map_err(|e| { 6712 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6713 + })?; 7763 6714 let codec = tonic::codec::ProstCodec::default(); 7764 - let path = http::uri::PathAndQuery::from_static( 7765 - "/rockbox.v1alpha1.SoundService/GetPitch", 7766 - ); 6715 + let path = 6716 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); 7767 6717 let mut req = request.into_request(); 7768 6718 req.extensions_mut() 7769 6719 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); ··· 7772 6722 pub async fn set_pitch( 7773 6723 &mut self, 7774 6724 request: impl tonic::IntoRequest<super::SetPitchRequest>, 7775 - ) -> std::result::Result< 7776 - tonic::Response<super::SetPitchResponse>, 7777 - tonic::Status, 7778 - > { 7779 - self.inner 7780 - .ready() 7781 - .await 7782 - .map_err(|e| { 7783 - tonic::Status::unknown( 7784 - format!("Service was not ready: {}", e.into()), 7785 - ) 7786 - })?; 6725 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status> { 6726 + self.inner.ready().await.map_err(|e| { 6727 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6728 + })?; 7787 6729 let codec = tonic::codec::ProstCodec::default(); 7788 - let path = http::uri::PathAndQuery::from_static( 7789 - "/rockbox.v1alpha1.SoundService/SetPitch", 7790 - ); 6730 + let path = 6731 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); 7791 6732 let mut req = request.into_request(); 7792 6733 req.extensions_mut() 7793 6734 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); ··· 7796 6737 pub async fn beep_play( 7797 6738 &mut self, 7798 6739 request: impl tonic::IntoRequest<super::BeepPlayRequest>, 7799 - ) -> std::result::Result< 7800 - tonic::Response<super::BeepPlayResponse>, 7801 - tonic::Status, 7802 - > { 7803 - self.inner 7804 - .ready() 7805 - .await 7806 - .map_err(|e| { 7807 - tonic::Status::unknown( 7808 - format!("Service was not ready: {}", e.into()), 7809 - ) 7810 - })?; 6740 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status> { 6741 + self.inner.ready().await.map_err(|e| { 6742 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6743 + })?; 7811 6744 let codec = tonic::codec::ProstCodec::default(); 7812 - let path = http::uri::PathAndQuery::from_static( 7813 - "/rockbox.v1alpha1.SoundService/BeepPlay", 7814 - ); 6745 + let path = 6746 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); 7815 6747 let mut req = request.into_request(); 7816 6748 req.extensions_mut() 7817 6749 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); ··· 7820 6752 pub async fn pcmbuf_fade( 7821 6753 &mut self, 7822 6754 request: impl tonic::IntoRequest<super::PcmbufFadeRequest>, 7823 - ) -> std::result::Result< 7824 - tonic::Response<super::PcmbufFadeResponse>, 7825 - tonic::Status, 7826 - > { 7827 - self.inner 7828 - .ready() 7829 - .await 7830 - .map_err(|e| { 7831 - tonic::Status::unknown( 7832 - format!("Service was not ready: {}", e.into()), 7833 - ) 7834 - })?; 6755 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status> 6756 + { 6757 + self.inner.ready().await.map_err(|e| { 6758 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6759 + })?; 7835 6760 let codec = tonic::codec::ProstCodec::default(); 7836 - let path = http::uri::PathAndQuery::from_static( 7837 - "/rockbox.v1alpha1.SoundService/PcmbufFade", 7838 - ); 6761 + let path = 6762 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); 7839 6763 let mut req = request.into_request(); 7840 - req.extensions_mut() 7841 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); 6764 + req.extensions_mut().insert(GrpcMethod::new( 6765 + "rockbox.v1alpha1.SoundService", 6766 + "PcmbufFade", 6767 + )); 7842 6768 self.inner.unary(req, path, codec).await 7843 6769 } 7844 6770 pub async fn pcmbuf_set_low_latency( 7845 6771 &mut self, 7846 6772 request: impl tonic::IntoRequest<super::PcmbufSetLowLatencyRequest>, 7847 - ) -> std::result::Result< 7848 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 7849 - tonic::Status, 7850 - > { 7851 - self.inner 7852 - .ready() 7853 - .await 7854 - .map_err(|e| { 7855 - tonic::Status::unknown( 7856 - format!("Service was not ready: {}", e.into()), 7857 - ) 7858 - })?; 6773 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status> 6774 + { 6775 + self.inner.ready().await.map_err(|e| { 6776 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6777 + })?; 7859 6778 let codec = tonic::codec::ProstCodec::default(); 7860 6779 let path = http::uri::PathAndQuery::from_static( 7861 6780 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", 7862 6781 ); 7863 6782 let mut req = request.into_request(); 7864 - req.extensions_mut() 7865 - .insert( 7866 - GrpcMethod::new( 7867 - "rockbox.v1alpha1.SoundService", 7868 - "PcmbufSetLowLatency", 7869 - ), 7870 - ); 6783 + req.extensions_mut().insert(GrpcMethod::new( 6784 + "rockbox.v1alpha1.SoundService", 6785 + "PcmbufSetLowLatency", 6786 + )); 7871 6787 self.inner.unary(req, path, codec).await 7872 6788 } 7873 6789 pub async fn system_sound_play( 7874 6790 &mut self, 7875 6791 request: impl tonic::IntoRequest<super::SystemSoundPlayRequest>, 7876 - ) -> std::result::Result< 7877 - tonic::Response<super::SystemSoundPlayResponse>, 7878 - tonic::Status, 7879 - > { 7880 - self.inner 7881 - .ready() 7882 - .await 7883 - .map_err(|e| { 7884 - tonic::Status::unknown( 7885 - format!("Service was not ready: {}", e.into()), 7886 - ) 7887 - })?; 6792 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status> 6793 + { 6794 + self.inner.ready().await.map_err(|e| { 6795 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6796 + })?; 7888 6797 let codec = tonic::codec::ProstCodec::default(); 7889 6798 let path = http::uri::PathAndQuery::from_static( 7890 6799 "/rockbox.v1alpha1.SoundService/SystemSoundPlay", 7891 6800 ); 7892 6801 let mut req = request.into_request(); 7893 - req.extensions_mut() 7894 - .insert( 7895 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), 7896 - ); 6802 + req.extensions_mut().insert(GrpcMethod::new( 6803 + "rockbox.v1alpha1.SoundService", 6804 + "SystemSoundPlay", 6805 + )); 7897 6806 self.inner.unary(req, path, codec).await 7898 6807 } 7899 6808 pub async fn keyclick_click( 7900 6809 &mut self, 7901 6810 request: impl tonic::IntoRequest<super::KeyclickClickRequest>, 7902 - ) -> std::result::Result< 7903 - tonic::Response<super::KeyclickClickResponse>, 7904 - tonic::Status, 7905 - > { 7906 - self.inner 7907 - .ready() 7908 - .await 7909 - .map_err(|e| { 7910 - tonic::Status::unknown( 7911 - format!("Service was not ready: {}", e.into()), 7912 - ) 7913 - })?; 6811 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status> 6812 + { 6813 + self.inner.ready().await.map_err(|e| { 6814 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6815 + })?; 7914 6816 let codec = tonic::codec::ProstCodec::default(); 7915 6817 let path = http::uri::PathAndQuery::from_static( 7916 6818 "/rockbox.v1alpha1.SoundService/KeyclickClick", 7917 6819 ); 7918 6820 let mut req = request.into_request(); 7919 - req.extensions_mut() 7920 - .insert( 7921 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), 7922 - ); 6821 + req.extensions_mut().insert(GrpcMethod::new( 6822 + "rockbox.v1alpha1.SoundService", 6823 + "KeyclickClick", 6824 + )); 7923 6825 self.inner.unary(req, path, codec).await 7924 6826 } 7925 6827 } ··· 7931 6833 dead_code, 7932 6834 missing_docs, 7933 6835 clippy::wildcard_imports, 7934 - clippy::let_unit_value, 6836 + clippy::let_unit_value 7935 6837 )] 7936 6838 use tonic::codegen::*; 7937 6839 /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. ··· 7940 6842 async fn adjust_volume( 7941 6843 &self, 7942 6844 request: tonic::Request<super::AdjustVolumeRequest>, 7943 - ) -> std::result::Result< 7944 - tonic::Response<super::AdjustVolumeResponse>, 7945 - tonic::Status, 7946 - >; 6845 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status>; 7947 6846 async fn sound_set( 7948 6847 &self, 7949 6848 request: tonic::Request<super::SoundSetRequest>, 7950 - ) -> std::result::Result< 7951 - tonic::Response<super::SoundSetResponse>, 7952 - tonic::Status, 7953 - >; 6849 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status>; 7954 6850 async fn sound_current( 7955 6851 &self, 7956 6852 request: tonic::Request<super::SoundCurrentRequest>, 7957 - ) -> std::result::Result< 7958 - tonic::Response<super::SoundCurrentResponse>, 7959 - tonic::Status, 7960 - >; 6853 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status>; 7961 6854 async fn sound_default( 7962 6855 &self, 7963 6856 request: tonic::Request<super::SoundDefaultRequest>, 7964 - ) -> std::result::Result< 7965 - tonic::Response<super::SoundDefaultResponse>, 7966 - tonic::Status, 7967 - >; 6857 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status>; 7968 6858 async fn sound_min( 7969 6859 &self, 7970 6860 request: tonic::Request<super::SoundMinRequest>, 7971 - ) -> std::result::Result< 7972 - tonic::Response<super::SoundMinResponse>, 7973 - tonic::Status, 7974 - >; 6861 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status>; 7975 6862 async fn sound_max( 7976 6863 &self, 7977 6864 request: tonic::Request<super::SoundMaxRequest>, 7978 - ) -> std::result::Result< 7979 - tonic::Response<super::SoundMaxResponse>, 7980 - tonic::Status, 7981 - >; 6865 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status>; 7982 6866 async fn sound_unit( 7983 6867 &self, 7984 6868 request: tonic::Request<super::SoundUnitRequest>, 7985 - ) -> std::result::Result< 7986 - tonic::Response<super::SoundUnitResponse>, 7987 - tonic::Status, 7988 - >; 6869 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status>; 7989 6870 async fn sound_val2_phys( 7990 6871 &self, 7991 6872 request: tonic::Request<super::SoundVal2PhysRequest>, 7992 - ) -> std::result::Result< 7993 - tonic::Response<super::SoundVal2PhysResponse>, 7994 - tonic::Status, 7995 - >; 6873 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status>; 7996 6874 async fn get_pitch( 7997 6875 &self, 7998 6876 request: tonic::Request<super::GetPitchRequest>, 7999 - ) -> std::result::Result< 8000 - tonic::Response<super::GetPitchResponse>, 8001 - tonic::Status, 8002 - >; 6877 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status>; 8003 6878 async fn set_pitch( 8004 6879 &self, 8005 6880 request: tonic::Request<super::SetPitchRequest>, 8006 - ) -> std::result::Result< 8007 - tonic::Response<super::SetPitchResponse>, 8008 - tonic::Status, 8009 - >; 6881 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status>; 8010 6882 async fn beep_play( 8011 6883 &self, 8012 6884 request: tonic::Request<super::BeepPlayRequest>, 8013 - ) -> std::result::Result< 8014 - tonic::Response<super::BeepPlayResponse>, 8015 - tonic::Status, 8016 - >; 6885 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status>; 8017 6886 async fn pcmbuf_fade( 8018 6887 &self, 8019 6888 request: tonic::Request<super::PcmbufFadeRequest>, 8020 - ) -> std::result::Result< 8021 - tonic::Response<super::PcmbufFadeResponse>, 8022 - tonic::Status, 8023 - >; 6889 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status>; 8024 6890 async fn pcmbuf_set_low_latency( 8025 6891 &self, 8026 6892 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8027 - ) -> std::result::Result< 8028 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 8029 - tonic::Status, 8030 - >; 6893 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status>; 8031 6894 async fn system_sound_play( 8032 6895 &self, 8033 6896 request: tonic::Request<super::SystemSoundPlayRequest>, 8034 - ) -> std::result::Result< 8035 - tonic::Response<super::SystemSoundPlayResponse>, 8036 - tonic::Status, 8037 - >; 6897 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status>; 8038 6898 async fn keyclick_click( 8039 6899 &self, 8040 6900 request: tonic::Request<super::KeyclickClickRequest>, 8041 - ) -> std::result::Result< 8042 - tonic::Response<super::KeyclickClickResponse>, 8043 - tonic::Status, 8044 - >; 6901 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status>; 8045 6902 } 8046 6903 #[derive(Debug)] 8047 6904 pub struct SoundServiceServer<T> { ··· 8064 6921 max_encoding_message_size: None, 8065 6922 } 8066 6923 } 8067 - pub fn with_interceptor<F>( 8068 - inner: T, 8069 - interceptor: F, 8070 - ) -> InterceptedService<Self, F> 6924 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 8071 6925 where 8072 6926 F: tonic::service::Interceptor, 8073 6927 { ··· 8122 6976 "/rockbox.v1alpha1.SoundService/AdjustVolume" => { 8123 6977 #[allow(non_camel_case_types)] 8124 6978 struct AdjustVolumeSvc<T: SoundService>(pub Arc<T>); 8125 - impl< 8126 - T: SoundService, 8127 - > tonic::server::UnaryService<super::AdjustVolumeRequest> 8128 - for AdjustVolumeSvc<T> { 6979 + impl<T: SoundService> tonic::server::UnaryService<super::AdjustVolumeRequest> 6980 + for AdjustVolumeSvc<T> 6981 + { 8129 6982 type Response = super::AdjustVolumeResponse; 8130 - type Future = BoxFuture< 8131 - tonic::Response<Self::Response>, 8132 - tonic::Status, 8133 - >; 6983 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8134 6984 fn call( 8135 6985 &mut self, 8136 6986 request: tonic::Request<super::AdjustVolumeRequest>, ··· 8167 7017 "/rockbox.v1alpha1.SoundService/SoundSet" => { 8168 7018 #[allow(non_camel_case_types)] 8169 7019 struct SoundSetSvc<T: SoundService>(pub Arc<T>); 8170 - impl< 8171 - T: SoundService, 8172 - > tonic::server::UnaryService<super::SoundSetRequest> 8173 - for SoundSetSvc<T> { 7020 + impl<T: SoundService> tonic::server::UnaryService<super::SoundSetRequest> for SoundSetSvc<T> { 8174 7021 type Response = super::SoundSetResponse; 8175 - type Future = BoxFuture< 8176 - tonic::Response<Self::Response>, 8177 - tonic::Status, 8178 - >; 7022 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8179 7023 fn call( 8180 7024 &mut self, 8181 7025 request: tonic::Request<super::SoundSetRequest>, ··· 8212 7056 "/rockbox.v1alpha1.SoundService/SoundCurrent" => { 8213 7057 #[allow(non_camel_case_types)] 8214 7058 struct SoundCurrentSvc<T: SoundService>(pub Arc<T>); 8215 - impl< 8216 - T: SoundService, 8217 - > tonic::server::UnaryService<super::SoundCurrentRequest> 8218 - for SoundCurrentSvc<T> { 7059 + impl<T: SoundService> tonic::server::UnaryService<super::SoundCurrentRequest> 7060 + for SoundCurrentSvc<T> 7061 + { 8219 7062 type Response = super::SoundCurrentResponse; 8220 - type Future = BoxFuture< 8221 - tonic::Response<Self::Response>, 8222 - tonic::Status, 8223 - >; 7063 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8224 7064 fn call( 8225 7065 &mut self, 8226 7066 request: tonic::Request<super::SoundCurrentRequest>, ··· 8257 7097 "/rockbox.v1alpha1.SoundService/SoundDefault" => { 8258 7098 #[allow(non_camel_case_types)] 8259 7099 struct SoundDefaultSvc<T: SoundService>(pub Arc<T>); 8260 - impl< 8261 - T: SoundService, 8262 - > tonic::server::UnaryService<super::SoundDefaultRequest> 8263 - for SoundDefaultSvc<T> { 7100 + impl<T: SoundService> tonic::server::UnaryService<super::SoundDefaultRequest> 7101 + for SoundDefaultSvc<T> 7102 + { 8264 7103 type Response = super::SoundDefaultResponse; 8265 - type Future = BoxFuture< 8266 - tonic::Response<Self::Response>, 8267 - tonic::Status, 8268 - >; 7104 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8269 7105 fn call( 8270 7106 &mut self, 8271 7107 request: tonic::Request<super::SoundDefaultRequest>, ··· 8302 7138 "/rockbox.v1alpha1.SoundService/SoundMin" => { 8303 7139 #[allow(non_camel_case_types)] 8304 7140 struct SoundMinSvc<T: SoundService>(pub Arc<T>); 8305 - impl< 8306 - T: SoundService, 8307 - > tonic::server::UnaryService<super::SoundMinRequest> 8308 - for SoundMinSvc<T> { 7141 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMinRequest> for SoundMinSvc<T> { 8309 7142 type Response = super::SoundMinResponse; 8310 - type Future = BoxFuture< 8311 - tonic::Response<Self::Response>, 8312 - tonic::Status, 8313 - >; 7143 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8314 7144 fn call( 8315 7145 &mut self, 8316 7146 request: tonic::Request<super::SoundMinRequest>, ··· 8347 7177 "/rockbox.v1alpha1.SoundService/SoundMax" => { 8348 7178 #[allow(non_camel_case_types)] 8349 7179 struct SoundMaxSvc<T: SoundService>(pub Arc<T>); 8350 - impl< 8351 - T: SoundService, 8352 - > tonic::server::UnaryService<super::SoundMaxRequest> 8353 - for SoundMaxSvc<T> { 7180 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMaxRequest> for SoundMaxSvc<T> { 8354 7181 type Response = super::SoundMaxResponse; 8355 - type Future = BoxFuture< 8356 - tonic::Response<Self::Response>, 8357 - tonic::Status, 8358 - >; 7182 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8359 7183 fn call( 8360 7184 &mut self, 8361 7185 request: tonic::Request<super::SoundMaxRequest>, ··· 8392 7216 "/rockbox.v1alpha1.SoundService/SoundUnit" => { 8393 7217 #[allow(non_camel_case_types)] 8394 7218 struct SoundUnitSvc<T: SoundService>(pub Arc<T>); 8395 - impl< 8396 - T: SoundService, 8397 - > tonic::server::UnaryService<super::SoundUnitRequest> 8398 - for SoundUnitSvc<T> { 7219 + impl<T: SoundService> tonic::server::UnaryService<super::SoundUnitRequest> for SoundUnitSvc<T> { 8399 7220 type Response = super::SoundUnitResponse; 8400 - type Future = BoxFuture< 8401 - tonic::Response<Self::Response>, 8402 - tonic::Status, 8403 - >; 7221 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8404 7222 fn call( 8405 7223 &mut self, 8406 7224 request: tonic::Request<super::SoundUnitRequest>, ··· 8437 7255 "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { 8438 7256 #[allow(non_camel_case_types)] 8439 7257 struct SoundVal2PhysSvc<T: SoundService>(pub Arc<T>); 8440 - impl< 8441 - T: SoundService, 8442 - > tonic::server::UnaryService<super::SoundVal2PhysRequest> 8443 - for SoundVal2PhysSvc<T> { 7258 + impl<T: SoundService> tonic::server::UnaryService<super::SoundVal2PhysRequest> 7259 + for SoundVal2PhysSvc<T> 7260 + { 8444 7261 type Response = super::SoundVal2PhysResponse; 8445 - type Future = BoxFuture< 8446 - tonic::Response<Self::Response>, 8447 - tonic::Status, 8448 - >; 7262 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8449 7263 fn call( 8450 7264 &mut self, 8451 7265 request: tonic::Request<super::SoundVal2PhysRequest>, ··· 8482 7296 "/rockbox.v1alpha1.SoundService/GetPitch" => { 8483 7297 #[allow(non_camel_case_types)] 8484 7298 struct GetPitchSvc<T: SoundService>(pub Arc<T>); 8485 - impl< 8486 - T: SoundService, 8487 - > tonic::server::UnaryService<super::GetPitchRequest> 8488 - for GetPitchSvc<T> { 7299 + impl<T: SoundService> tonic::server::UnaryService<super::GetPitchRequest> for GetPitchSvc<T> { 8489 7300 type Response = super::GetPitchResponse; 8490 - type Future = BoxFuture< 8491 - tonic::Response<Self::Response>, 8492 - tonic::Status, 8493 - >; 7301 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8494 7302 fn call( 8495 7303 &mut self, 8496 7304 request: tonic::Request<super::GetPitchRequest>, ··· 8527 7335 "/rockbox.v1alpha1.SoundService/SetPitch" => { 8528 7336 #[allow(non_camel_case_types)] 8529 7337 struct SetPitchSvc<T: SoundService>(pub Arc<T>); 8530 - impl< 8531 - T: SoundService, 8532 - > tonic::server::UnaryService<super::SetPitchRequest> 8533 - for SetPitchSvc<T> { 7338 + impl<T: SoundService> tonic::server::UnaryService<super::SetPitchRequest> for SetPitchSvc<T> { 8534 7339 type Response = super::SetPitchResponse; 8535 - type Future = BoxFuture< 8536 - tonic::Response<Self::Response>, 8537 - tonic::Status, 8538 - >; 7340 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8539 7341 fn call( 8540 7342 &mut self, 8541 7343 request: tonic::Request<super::SetPitchRequest>, ··· 8572 7374 "/rockbox.v1alpha1.SoundService/BeepPlay" => { 8573 7375 #[allow(non_camel_case_types)] 8574 7376 struct BeepPlaySvc<T: SoundService>(pub Arc<T>); 8575 - impl< 8576 - T: SoundService, 8577 - > tonic::server::UnaryService<super::BeepPlayRequest> 8578 - for BeepPlaySvc<T> { 7377 + impl<T: SoundService> tonic::server::UnaryService<super::BeepPlayRequest> for BeepPlaySvc<T> { 8579 7378 type Response = super::BeepPlayResponse; 8580 - type Future = BoxFuture< 8581 - tonic::Response<Self::Response>, 8582 - tonic::Status, 8583 - >; 7379 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8584 7380 fn call( 8585 7381 &mut self, 8586 7382 request: tonic::Request<super::BeepPlayRequest>, ··· 8617 7413 "/rockbox.v1alpha1.SoundService/PcmbufFade" => { 8618 7414 #[allow(non_camel_case_types)] 8619 7415 struct PcmbufFadeSvc<T: SoundService>(pub Arc<T>); 8620 - impl< 8621 - T: SoundService, 8622 - > tonic::server::UnaryService<super::PcmbufFadeRequest> 8623 - for PcmbufFadeSvc<T> { 7416 + impl<T: SoundService> tonic::server::UnaryService<super::PcmbufFadeRequest> for PcmbufFadeSvc<T> { 8624 7417 type Response = super::PcmbufFadeResponse; 8625 - type Future = BoxFuture< 8626 - tonic::Response<Self::Response>, 8627 - tonic::Status, 8628 - >; 7418 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8629 7419 fn call( 8630 7420 &mut self, 8631 7421 request: tonic::Request<super::PcmbufFadeRequest>, ··· 8662 7452 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { 8663 7453 #[allow(non_camel_case_types)] 8664 7454 struct PcmbufSetLowLatencySvc<T: SoundService>(pub Arc<T>); 8665 - impl< 8666 - T: SoundService, 8667 - > tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 8668 - for PcmbufSetLowLatencySvc<T> { 7455 + impl<T: SoundService> 7456 + tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 7457 + for PcmbufSetLowLatencySvc<T> 7458 + { 8669 7459 type Response = super::PcmbufSetLowLatencyResponse; 8670 - type Future = BoxFuture< 8671 - tonic::Response<Self::Response>, 8672 - tonic::Status, 8673 - >; 7460 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8674 7461 fn call( 8675 7462 &mut self, 8676 7463 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8677 7464 ) -> Self::Future { 8678 7465 let inner = Arc::clone(&self.0); 8679 7466 let fut = async move { 8680 - <T as SoundService>::pcmbuf_set_low_latency(&inner, request) 8681 - .await 7467 + <T as SoundService>::pcmbuf_set_low_latency(&inner, request).await 8682 7468 }; 8683 7469 Box::pin(fut) 8684 7470 } ··· 8708 7494 "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { 8709 7495 #[allow(non_camel_case_types)] 8710 7496 struct SystemSoundPlaySvc<T: SoundService>(pub Arc<T>); 8711 - impl< 8712 - T: SoundService, 8713 - > tonic::server::UnaryService<super::SystemSoundPlayRequest> 8714 - for SystemSoundPlaySvc<T> { 7497 + impl<T: SoundService> tonic::server::UnaryService<super::SystemSoundPlayRequest> 7498 + for SystemSoundPlaySvc<T> 7499 + { 8715 7500 type Response = super::SystemSoundPlayResponse; 8716 - type Future = BoxFuture< 8717 - tonic::Response<Self::Response>, 8718 - tonic::Status, 8719 - >; 7501 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8720 7502 fn call( 8721 7503 &mut self, 8722 7504 request: tonic::Request<super::SystemSoundPlayRequest>, 8723 7505 ) -> Self::Future { 8724 7506 let inner = Arc::clone(&self.0); 8725 7507 let fut = async move { 8726 - <T as SoundService>::system_sound_play(&inner, request) 8727 - .await 7508 + <T as SoundService>::system_sound_play(&inner, request).await 8728 7509 }; 8729 7510 Box::pin(fut) 8730 7511 } ··· 8754 7535 "/rockbox.v1alpha1.SoundService/KeyclickClick" => { 8755 7536 #[allow(non_camel_case_types)] 8756 7537 struct KeyclickClickSvc<T: SoundService>(pub Arc<T>); 8757 - impl< 8758 - T: SoundService, 8759 - > tonic::server::UnaryService<super::KeyclickClickRequest> 8760 - for KeyclickClickSvc<T> { 7538 + impl<T: SoundService> tonic::server::UnaryService<super::KeyclickClickRequest> 7539 + for KeyclickClickSvc<T> 7540 + { 8761 7541 type Response = super::KeyclickClickResponse; 8762 - type Future = BoxFuture< 8763 - tonic::Response<Self::Response>, 8764 - tonic::Status, 8765 - >; 7542 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8766 7543 fn call( 8767 7544 &mut self, 8768 7545 request: tonic::Request<super::KeyclickClickRequest>, ··· 8796 7573 }; 8797 7574 Box::pin(fut) 8798 7575 } 8799 - _ => { 8800 - Box::pin(async move { 8801 - let mut response = http::Response::new(empty_body()); 8802 - let headers = response.headers_mut(); 8803 - headers 8804 - .insert( 8805 - tonic::Status::GRPC_STATUS, 8806 - (tonic::Code::Unimplemented as i32).into(), 8807 - ); 8808 - headers 8809 - .insert( 8810 - http::header::CONTENT_TYPE, 8811 - tonic::metadata::GRPC_CONTENT_TYPE, 8812 - ); 8813 - Ok(response) 8814 - }) 8815 - } 7576 + _ => Box::pin(async move { 7577 + let mut response = http::Response::new(empty_body()); 7578 + let headers = response.headers_mut(); 7579 + headers.insert( 7580 + tonic::Status::GRPC_STATUS, 7581 + (tonic::Code::Unimplemented as i32).into(), 7582 + ); 7583 + headers.insert( 7584 + http::header::CONTENT_TYPE, 7585 + tonic::metadata::GRPC_CONTENT_TYPE, 7586 + ); 7587 + Ok(response) 7588 + }), 8816 7589 } 8817 7590 } 8818 7591 } ··· 8873 7646 dead_code, 8874 7647 missing_docs, 8875 7648 clippy::wildcard_imports, 8876 - clippy::let_unit_value, 7649 + clippy::let_unit_value 8877 7650 )] 7651 + use tonic::codegen::http::Uri; 8878 7652 use tonic::codegen::*; 8879 - use tonic::codegen::http::Uri; 8880 7653 #[derive(Debug, Clone)] 8881 7654 pub struct SystemServiceClient<T> { 8882 7655 inner: tonic::client::Grpc<T>, ··· 8920 7693 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 8921 7694 >, 8922 7695 >, 8923 - <T as tonic::codegen::Service< 8924 - http::Request<tonic::body::BoxBody>, 8925 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 7696 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 7697 + Into<StdError> + std::marker::Send + std::marker::Sync, 8926 7698 { 8927 7699 SystemServiceClient::new(InterceptedService::new(inner, interceptor)) 8928 7700 } ··· 8960 7732 pub async fn get_rockbox_version( 8961 7733 &mut self, 8962 7734 request: impl tonic::IntoRequest<super::GetRockboxVersionRequest>, 8963 - ) -> std::result::Result< 8964 - tonic::Response<super::GetRockboxVersionResponse>, 8965 - tonic::Status, 8966 - > { 8967 - self.inner 8968 - .ready() 8969 - .await 8970 - .map_err(|e| { 8971 - tonic::Status::unknown( 8972 - format!("Service was not ready: {}", e.into()), 8973 - ) 8974 - })?; 7735 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status> 7736 + { 7737 + self.inner.ready().await.map_err(|e| { 7738 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7739 + })?; 8975 7740 let codec = tonic::codec::ProstCodec::default(); 8976 7741 let path = http::uri::PathAndQuery::from_static( 8977 7742 "/rockbox.v1alpha1.SystemService/GetRockboxVersion", 8978 7743 ); 8979 7744 let mut req = request.into_request(); 8980 - req.extensions_mut() 8981 - .insert( 8982 - GrpcMethod::new( 8983 - "rockbox.v1alpha1.SystemService", 8984 - "GetRockboxVersion", 8985 - ), 8986 - ); 7745 + req.extensions_mut().insert(GrpcMethod::new( 7746 + "rockbox.v1alpha1.SystemService", 7747 + "GetRockboxVersion", 7748 + )); 8987 7749 self.inner.unary(req, path, codec).await 8988 7750 } 8989 7751 pub async fn get_global_status( 8990 7752 &mut self, 8991 7753 request: impl tonic::IntoRequest<super::GetGlobalStatusRequest>, 8992 - ) -> std::result::Result< 8993 - tonic::Response<super::GetGlobalStatusResponse>, 8994 - tonic::Status, 8995 - > { 8996 - self.inner 8997 - .ready() 8998 - .await 8999 - .map_err(|e| { 9000 - tonic::Status::unknown( 9001 - format!("Service was not ready: {}", e.into()), 9002 - ) 9003 - })?; 7754 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status> 7755 + { 7756 + self.inner.ready().await.map_err(|e| { 7757 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7758 + })?; 9004 7759 let codec = tonic::codec::ProstCodec::default(); 9005 7760 let path = http::uri::PathAndQuery::from_static( 9006 7761 "/rockbox.v1alpha1.SystemService/GetGlobalStatus", 9007 7762 ); 9008 7763 let mut req = request.into_request(); 9009 - req.extensions_mut() 9010 - .insert( 9011 - GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), 9012 - ); 7764 + req.extensions_mut().insert(GrpcMethod::new( 7765 + "rockbox.v1alpha1.SystemService", 7766 + "GetGlobalStatus", 7767 + )); 9013 7768 self.inner.unary(req, path, codec).await 9014 7769 } 9015 7770 } ··· 9021 7776 dead_code, 9022 7777 missing_docs, 9023 7778 clippy::wildcard_imports, 9024 - clippy::let_unit_value, 7779 + clippy::let_unit_value 9025 7780 )] 9026 7781 use tonic::codegen::*; 9027 7782 /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. ··· 9030 7785 async fn get_rockbox_version( 9031 7786 &self, 9032 7787 request: tonic::Request<super::GetRockboxVersionRequest>, 9033 - ) -> std::result::Result< 9034 - tonic::Response<super::GetRockboxVersionResponse>, 9035 - tonic::Status, 9036 - >; 7788 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status>; 9037 7789 async fn get_global_status( 9038 7790 &self, 9039 7791 request: tonic::Request<super::GetGlobalStatusRequest>, 9040 - ) -> std::result::Result< 9041 - tonic::Response<super::GetGlobalStatusResponse>, 9042 - tonic::Status, 9043 - >; 7792 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status>; 9044 7793 } 9045 7794 #[derive(Debug)] 9046 7795 pub struct SystemServiceServer<T> { ··· 9063 7812 max_encoding_message_size: None, 9064 7813 } 9065 7814 } 9066 - pub fn with_interceptor<F>( 9067 - inner: T, 9068 - interceptor: F, 9069 - ) -> InterceptedService<Self, F> 7815 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 9070 7816 where 9071 7817 F: tonic::service::Interceptor, 9072 7818 { ··· 9121 7867 "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { 9122 7868 #[allow(non_camel_case_types)] 9123 7869 struct GetRockboxVersionSvc<T: SystemService>(pub Arc<T>); 9124 - impl< 9125 - T: SystemService, 9126 - > tonic::server::UnaryService<super::GetRockboxVersionRequest> 9127 - for GetRockboxVersionSvc<T> { 7870 + impl<T: SystemService> 7871 + tonic::server::UnaryService<super::GetRockboxVersionRequest> 7872 + for GetRockboxVersionSvc<T> 7873 + { 9128 7874 type Response = super::GetRockboxVersionResponse; 9129 - type Future = BoxFuture< 9130 - tonic::Response<Self::Response>, 9131 - tonic::Status, 9132 - >; 7875 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9133 7876 fn call( 9134 7877 &mut self, 9135 7878 request: tonic::Request<super::GetRockboxVersionRequest>, 9136 7879 ) -> Self::Future { 9137 7880 let inner = Arc::clone(&self.0); 9138 7881 let fut = async move { 9139 - <T as SystemService>::get_rockbox_version(&inner, request) 9140 - .await 7882 + <T as SystemService>::get_rockbox_version(&inner, request).await 9141 7883 }; 9142 7884 Box::pin(fut) 9143 7885 } ··· 9167 7909 "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { 9168 7910 #[allow(non_camel_case_types)] 9169 7911 struct GetGlobalStatusSvc<T: SystemService>(pub Arc<T>); 9170 - impl< 9171 - T: SystemService, 9172 - > tonic::server::UnaryService<super::GetGlobalStatusRequest> 9173 - for GetGlobalStatusSvc<T> { 7912 + impl<T: SystemService> 7913 + tonic::server::UnaryService<super::GetGlobalStatusRequest> 7914 + for GetGlobalStatusSvc<T> 7915 + { 9174 7916 type Response = super::GetGlobalStatusResponse; 9175 - type Future = BoxFuture< 9176 - tonic::Response<Self::Response>, 9177 - tonic::Status, 9178 - >; 7917 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9179 7918 fn call( 9180 7919 &mut self, 9181 7920 request: tonic::Request<super::GetGlobalStatusRequest>, 9182 7921 ) -> Self::Future { 9183 7922 let inner = Arc::clone(&self.0); 9184 7923 let fut = async move { 9185 - <T as SystemService>::get_global_status(&inner, request) 9186 - .await 7924 + <T as SystemService>::get_global_status(&inner, request).await 9187 7925 }; 9188 7926 Box::pin(fut) 9189 7927 } ··· 9210 7948 }; 9211 7949 Box::pin(fut) 9212 7950 } 9213 - _ => { 9214 - Box::pin(async move { 9215 - let mut response = http::Response::new(empty_body()); 9216 - let headers = response.headers_mut(); 9217 - headers 9218 - .insert( 9219 - tonic::Status::GRPC_STATUS, 9220 - (tonic::Code::Unimplemented as i32).into(), 9221 - ); 9222 - headers 9223 - .insert( 9224 - http::header::CONTENT_TYPE, 9225 - tonic::metadata::GRPC_CONTENT_TYPE, 9226 - ); 9227 - Ok(response) 9228 - }) 9229 - } 7951 + _ => Box::pin(async move { 7952 + let mut response = http::Response::new(empty_body()); 7953 + let headers = response.headers_mut(); 7954 + headers.insert( 7955 + tonic::Status::GRPC_STATUS, 7956 + (tonic::Code::Unimplemented as i32).into(), 7957 + ); 7958 + headers.insert( 7959 + http::header::CONTENT_TYPE, 7960 + tonic::metadata::GRPC_CONTENT_TYPE, 7961 + ); 7962 + Ok(response) 7963 + }), 9230 7964 } 9231 7965 } 9232 7966 }
+2 -2
crates/cli/src/lib.rs
··· 5 5 use owo_colors::OwoColorize; 6 6 #[allow(unused_imports)] 7 7 use rockbox_airplay::_link_airplay as _; 8 + use rockbox_library::audio_scan::{save_audio_metadata, scan_audio_files}; 9 + use rockbox_library::{create_connection_pool, repo}; 8 10 #[allow(unused_imports)] 9 11 use rockbox_slim::_link_slim as _; 10 - use rockbox_library::audio_scan::{save_audio_metadata, scan_audio_files}; 11 - use rockbox_library::{create_connection_pool, repo}; 12 12 use rockbox_typesense::client::*; 13 13 use rockbox_typesense::types::*; 14 14 use std::io::{BufRead, BufReader};
+4 -1
crates/settings/src/lib.rs
··· 59 59 tracing::info!("audio output: builtin (SDL)"); 60 60 } 61 61 Some(other) => { 62 - tracing::warn!("audio output: unknown value {:?}, falling back to builtin", other); 62 + tracing::warn!( 63 + "audio output: unknown value {:?}, falling back to builtin", 64 + other 65 + ); 63 66 } 64 67 } 65 68
+10 -6
crates/slim/src/lib.rs
··· 73 73 /// Subscribe from the current write position (live stream, no old data). 74 74 pub(crate) fn subscribe(self: &Arc<Self>) -> BroadcastReceiver { 75 75 let next_seq = self.inner.lock().unwrap().next_seq; 76 - BroadcastReceiver { buf: Arc::clone(self), next_seq } 76 + BroadcastReceiver { 77 + buf: Arc::clone(self), 78 + next_seq, 79 + } 77 80 } 78 81 79 82 fn reset(&self) { ··· 108 111 if self.next_seq < front_seq { 109 112 tracing::debug!( 110 113 "slim/broadcast: receiver lagging, skipping {} → {}", 111 - self.next_seq, front_seq 114 + self.next_seq, 115 + front_seq 112 116 ); 113 117 self.next_seq = front_seq; 114 118 } ··· 143 147 }); 144 148 145 149 fn get_buffer() -> Arc<BroadcastBuffer> { 146 - BUFFER.get_or_init(|| Arc::new(BroadcastBuffer::new())).clone() 150 + BUFFER 151 + .get_or_init(|| Arc::new(BroadcastBuffer::new())) 152 + .clone() 147 153 } 148 154 149 155 // --------------------------------------------------------------------------- ··· 181 187 std::thread::spawn(move || slimproto::serve(slim_port, http_port)); 182 188 183 189 *started = true; 184 - tracing::info!( 185 - "squeezelite sink: Slim Protocol on :{slim_port}, HTTP audio on :{http_port}" 186 - ); 190 + tracing::info!("squeezelite sink: Slim Protocol on :{slim_port}, HTTP audio on :{http_port}"); 187 191 0 188 192 } 189 193
+18 -15
crates/slim/src/slimproto.rs
··· 26 26 } 27 27 28 28 fn handle_client(mut stream: TcpStream, http_port: u16) { 29 - let peer = stream.peer_addr().map(|a| a.to_string()).unwrap_or_default(); 29 + let peer = stream 30 + .peer_addr() 31 + .map(|a| a.to_string()) 32 + .unwrap_or_default(); 30 33 tracing::info!("slim: client connected from {peer}"); 31 34 32 35 match read_client_packet(&mut stream) { ··· 108 111 fn send_strm_start(stream: &mut TcpStream, http_port: u16) -> std::io::Result<()> { 109 112 let request = b"GET /stream.pcm HTTP/1.0\r\n\r\n"; 110 113 let mut payload = Vec::with_capacity(24 + request.len()); 111 - payload.push(b's'); // command: start 112 - payload.push(b'1'); // autostart 113 - payload.push(b'p'); // format: raw PCM 114 - payload.push(b'1'); // pcm_sample_size: 16-bit 115 - payload.push(b'3'); // pcm_sample_rate: 44100 Hz 116 - payload.push(b'2'); // pcm_channels: stereo 117 - payload.push(b'1'); // pcm_endianness: little-endian 118 - payload.push(255u8); // threshold: 255 KB 119 - payload.push(0u8); // spdif_enable 120 - payload.push(0u8); // transition_period 121 - payload.push(b'0'); // transition_type: none 122 - payload.push(0u8); // flags 123 - payload.push(0u8); // output_threshold 124 - payload.push(0u8); // slaves 114 + payload.push(b's'); // command: start 115 + payload.push(b'1'); // autostart 116 + payload.push(b'p'); // format: raw PCM 117 + payload.push(b'1'); // pcm_sample_size: 16-bit 118 + payload.push(b'3'); // pcm_sample_rate: 44100 Hz 119 + payload.push(b'2'); // pcm_channels: stereo 120 + payload.push(b'1'); // pcm_endianness: little-endian 121 + payload.push(255u8); // threshold: 255 KB 122 + payload.push(0u8); // spdif_enable 123 + payload.push(0u8); // transition_period 124 + payload.push(b'0'); // transition_type: none 125 + payload.push(0u8); // flags 126 + payload.push(0u8); // output_threshold 127 + payload.push(0u8); // slaves 125 128 payload.extend_from_slice(&0x00010000u32.to_be_bytes()); // replay_gain = 1.0 126 129 payload.extend_from_slice(&http_port.to_be_bytes()); 127 130 payload.extend_from_slice(&0u32.to_be_bytes()); // server_ip = 0 → use slimproto_ip