A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

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

Add macOS DMG build and startup error alert

+1299 -2510
+9
.github/workflows/macos-build.yml
··· 72 72 sudo cp zig/zig-out/bin/rockboxd /usr/local/bin/ 73 73 - name: Generate Package Installer 74 74 run: ./packaging/macos/build-pkg.sh 75 + - name: Build DMG 76 + run: | 77 + xcodebuild -scheme Rockbox -configuration Release archive -archivePath ./build/Rockbox.xcarchive 78 + xcodebuild -exportArchive -archivePath ./build/Rockbox.xcarchive -exportPath ./build -exportOptionsPlist ExportOptions.plist 79 + mkdir dmg_temp 80 + cp -r build/Rockbox.app dmg_temp 81 + hdiutil create -volname "Rockbox" -srcfolder dmg_temp -ov -format UDZO Rockbox-${{ steps.vars.outputs.version }}-${{ steps.vars.outputs.arch }}.dmg 82 + working-directory: macos 75 83 - name: Show artifacts 76 84 run: | 77 85 ls rockbox-*.pkg ··· 133 141 rockbox-assets-${{ steps.vars.outputs.version }}-${{ steps.vars.outputs.arch }}-darwin.tar.gz 134 142 rockbox-assets-${{ steps.vars.outputs.version }}-${{ steps.vars.outputs.arch }}-darwin.tar.gz.sha256 135 143 rockbox-${{ steps.vars.outputs.version }}-${{ steps.vars.outputs.arch }}.pkg 144 + Rockbox-${{ steps.vars.outputs.version }}-${{ steps.vars.outputs.arch }}.dmg 136 145 tag_name: ${{ steps.vars.outputs.version }} 137 146 env: 138 147 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+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 } ··· 6867 5948 dead_code, 6868 5949 missing_docs, 6869 5950 clippy::wildcard_imports, 6870 - clippy::let_unit_value, 5951 + clippy::let_unit_value 6871 5952 )] 6872 - use tonic::codegen::*; 6873 5953 use tonic::codegen::http::Uri; 5954 + use tonic::codegen::*; 6874 5955 #[derive(Debug, Clone)] 6875 5956 pub struct SettingsServiceClient<T> { 6876 5957 inner: tonic::client::Grpc<T>, ··· 6914 5995 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 6915 5996 >, 6916 5997 >, 6917 - <T as tonic::codegen::Service< 6918 - http::Request<tonic::body::BoxBody>, 6919 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 5998 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 5999 + Into<StdError> + std::marker::Send + std::marker::Sync, 6920 6000 { 6921 6001 SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) 6922 6002 } ··· 6954 6034 pub async fn get_settings_list( 6955 6035 &mut self, 6956 6036 request: impl tonic::IntoRequest<super::GetSettingsListRequest>, 6957 - ) -> std::result::Result< 6958 - tonic::Response<super::GetSettingsListResponse>, 6959 - tonic::Status, 6960 - > { 6961 - self.inner 6962 - .ready() 6963 - .await 6964 - .map_err(|e| { 6965 - tonic::Status::unknown( 6966 - format!("Service was not ready: {}", e.into()), 6967 - ) 6968 - })?; 6037 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status> 6038 + { 6039 + self.inner.ready().await.map_err(|e| { 6040 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6041 + })?; 6969 6042 let codec = tonic::codec::ProstCodec::default(); 6970 6043 let path = http::uri::PathAndQuery::from_static( 6971 6044 "/rockbox.v1alpha1.SettingsService/GetSettingsList", 6972 6045 ); 6973 6046 let mut req = request.into_request(); 6974 - req.extensions_mut() 6975 - .insert( 6976 - GrpcMethod::new( 6977 - "rockbox.v1alpha1.SettingsService", 6978 - "GetSettingsList", 6979 - ), 6980 - ); 6047 + req.extensions_mut().insert(GrpcMethod::new( 6048 + "rockbox.v1alpha1.SettingsService", 6049 + "GetSettingsList", 6050 + )); 6981 6051 self.inner.unary(req, path, codec).await 6982 6052 } 6983 6053 pub async fn get_global_settings( 6984 6054 &mut self, 6985 6055 request: impl tonic::IntoRequest<super::GetGlobalSettingsRequest>, 6986 - ) -> std::result::Result< 6987 - tonic::Response<super::GetGlobalSettingsResponse>, 6988 - tonic::Status, 6989 - > { 6990 - self.inner 6991 - .ready() 6992 - .await 6993 - .map_err(|e| { 6994 - tonic::Status::unknown( 6995 - format!("Service was not ready: {}", e.into()), 6996 - ) 6997 - })?; 6056 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status> 6057 + { 6058 + self.inner.ready().await.map_err(|e| { 6059 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6060 + })?; 6998 6061 let codec = tonic::codec::ProstCodec::default(); 6999 6062 let path = http::uri::PathAndQuery::from_static( 7000 6063 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", 7001 6064 ); 7002 6065 let mut req = request.into_request(); 7003 - req.extensions_mut() 7004 - .insert( 7005 - GrpcMethod::new( 7006 - "rockbox.v1alpha1.SettingsService", 7007 - "GetGlobalSettings", 7008 - ), 7009 - ); 6066 + req.extensions_mut().insert(GrpcMethod::new( 6067 + "rockbox.v1alpha1.SettingsService", 6068 + "GetGlobalSettings", 6069 + )); 7010 6070 self.inner.unary(req, path, codec).await 7011 6071 } 7012 6072 pub async fn save_settings( 7013 6073 &mut self, 7014 6074 request: impl tonic::IntoRequest<super::SaveSettingsRequest>, 7015 - ) -> std::result::Result< 7016 - tonic::Response<super::SaveSettingsResponse>, 7017 - tonic::Status, 7018 - > { 7019 - self.inner 7020 - .ready() 7021 - .await 7022 - .map_err(|e| { 7023 - tonic::Status::unknown( 7024 - format!("Service was not ready: {}", e.into()), 7025 - ) 7026 - })?; 6075 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status> 6076 + { 6077 + self.inner.ready().await.map_err(|e| { 6078 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6079 + })?; 7027 6080 let codec = tonic::codec::ProstCodec::default(); 7028 6081 let path = http::uri::PathAndQuery::from_static( 7029 6082 "/rockbox.v1alpha1.SettingsService/SaveSettings", 7030 6083 ); 7031 6084 let mut req = request.into_request(); 7032 - req.extensions_mut() 7033 - .insert( 7034 - GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), 7035 - ); 6085 + req.extensions_mut().insert(GrpcMethod::new( 6086 + "rockbox.v1alpha1.SettingsService", 6087 + "SaveSettings", 6088 + )); 7036 6089 self.inner.unary(req, path, codec).await 7037 6090 } 7038 6091 } ··· 7044 6097 dead_code, 7045 6098 missing_docs, 7046 6099 clippy::wildcard_imports, 7047 - clippy::let_unit_value, 6100 + clippy::let_unit_value 7048 6101 )] 7049 6102 use tonic::codegen::*; 7050 6103 /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. ··· 7053 6106 async fn get_settings_list( 7054 6107 &self, 7055 6108 request: tonic::Request<super::GetSettingsListRequest>, 7056 - ) -> std::result::Result< 7057 - tonic::Response<super::GetSettingsListResponse>, 7058 - tonic::Status, 7059 - >; 6109 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status>; 7060 6110 async fn get_global_settings( 7061 6111 &self, 7062 6112 request: tonic::Request<super::GetGlobalSettingsRequest>, 7063 - ) -> std::result::Result< 7064 - tonic::Response<super::GetGlobalSettingsResponse>, 7065 - tonic::Status, 7066 - >; 6113 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status>; 7067 6114 async fn save_settings( 7068 6115 &self, 7069 6116 request: tonic::Request<super::SaveSettingsRequest>, 7070 - ) -> std::result::Result< 7071 - tonic::Response<super::SaveSettingsResponse>, 7072 - tonic::Status, 7073 - >; 6117 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status>; 7074 6118 } 7075 6119 #[derive(Debug)] 7076 6120 pub struct SettingsServiceServer<T> { ··· 7093 6137 max_encoding_message_size: None, 7094 6138 } 7095 6139 } 7096 - pub fn with_interceptor<F>( 7097 - inner: T, 7098 - interceptor: F, 7099 - ) -> InterceptedService<Self, F> 6140 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 7100 6141 where 7101 6142 F: tonic::service::Interceptor, 7102 6143 { ··· 7151 6192 "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { 7152 6193 #[allow(non_camel_case_types)] 7153 6194 struct GetSettingsListSvc<T: SettingsService>(pub Arc<T>); 7154 - impl< 7155 - T: SettingsService, 7156 - > tonic::server::UnaryService<super::GetSettingsListRequest> 7157 - for GetSettingsListSvc<T> { 6195 + impl<T: SettingsService> 6196 + tonic::server::UnaryService<super::GetSettingsListRequest> 6197 + for GetSettingsListSvc<T> 6198 + { 7158 6199 type Response = super::GetSettingsListResponse; 7159 - type Future = BoxFuture< 7160 - tonic::Response<Self::Response>, 7161 - tonic::Status, 7162 - >; 6200 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7163 6201 fn call( 7164 6202 &mut self, 7165 6203 request: tonic::Request<super::GetSettingsListRequest>, 7166 6204 ) -> Self::Future { 7167 6205 let inner = Arc::clone(&self.0); 7168 6206 let fut = async move { 7169 - <T as SettingsService>::get_settings_list(&inner, request) 7170 - .await 6207 + <T as SettingsService>::get_settings_list(&inner, request).await 7171 6208 }; 7172 6209 Box::pin(fut) 7173 6210 } ··· 7197 6234 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { 7198 6235 #[allow(non_camel_case_types)] 7199 6236 struct GetGlobalSettingsSvc<T: SettingsService>(pub Arc<T>); 7200 - impl< 7201 - T: SettingsService, 7202 - > tonic::server::UnaryService<super::GetGlobalSettingsRequest> 7203 - for GetGlobalSettingsSvc<T> { 6237 + impl<T: SettingsService> 6238 + tonic::server::UnaryService<super::GetGlobalSettingsRequest> 6239 + for GetGlobalSettingsSvc<T> 6240 + { 7204 6241 type Response = super::GetGlobalSettingsResponse; 7205 - type Future = BoxFuture< 7206 - tonic::Response<Self::Response>, 7207 - tonic::Status, 7208 - >; 6242 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7209 6243 fn call( 7210 6244 &mut self, 7211 6245 request: tonic::Request<super::GetGlobalSettingsRequest>, 7212 6246 ) -> Self::Future { 7213 6247 let inner = Arc::clone(&self.0); 7214 6248 let fut = async move { 7215 - <T as SettingsService>::get_global_settings(&inner, request) 7216 - .await 6249 + <T as SettingsService>::get_global_settings(&inner, request).await 7217 6250 }; 7218 6251 Box::pin(fut) 7219 6252 } ··· 7243 6276 "/rockbox.v1alpha1.SettingsService/SaveSettings" => { 7244 6277 #[allow(non_camel_case_types)] 7245 6278 struct SaveSettingsSvc<T: SettingsService>(pub Arc<T>); 7246 - impl< 7247 - T: SettingsService, 7248 - > tonic::server::UnaryService<super::SaveSettingsRequest> 7249 - for SaveSettingsSvc<T> { 6279 + impl<T: SettingsService> tonic::server::UnaryService<super::SaveSettingsRequest> 6280 + for SaveSettingsSvc<T> 6281 + { 7250 6282 type Response = super::SaveSettingsResponse; 7251 - type Future = BoxFuture< 7252 - tonic::Response<Self::Response>, 7253 - tonic::Status, 7254 - >; 6283 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7255 6284 fn call( 7256 6285 &mut self, 7257 6286 request: tonic::Request<super::SaveSettingsRequest>, ··· 7285 6314 }; 7286 6315 Box::pin(fut) 7287 6316 } 7288 - _ => { 7289 - Box::pin(async move { 7290 - let mut response = http::Response::new(empty_body()); 7291 - let headers = response.headers_mut(); 7292 - headers 7293 - .insert( 7294 - tonic::Status::GRPC_STATUS, 7295 - (tonic::Code::Unimplemented as i32).into(), 7296 - ); 7297 - headers 7298 - .insert( 7299 - http::header::CONTENT_TYPE, 7300 - tonic::metadata::GRPC_CONTENT_TYPE, 7301 - ); 7302 - Ok(response) 7303 - }) 7304 - } 6317 + _ => Box::pin(async move { 6318 + let mut response = http::Response::new(empty_body()); 6319 + let headers = response.headers_mut(); 6320 + headers.insert( 6321 + tonic::Status::GRPC_STATUS, 6322 + (tonic::Code::Unimplemented as i32).into(), 6323 + ); 6324 + headers.insert( 6325 + http::header::CONTENT_TYPE, 6326 + tonic::metadata::GRPC_CONTENT_TYPE, 6327 + ); 6328 + Ok(response) 6329 + }), 7305 6330 } 7306 6331 } 7307 6332 } ··· 7459 6484 dead_code, 7460 6485 missing_docs, 7461 6486 clippy::wildcard_imports, 7462 - clippy::let_unit_value, 6487 + clippy::let_unit_value 7463 6488 )] 7464 - use tonic::codegen::*; 7465 6489 use tonic::codegen::http::Uri; 6490 + use tonic::codegen::*; 7466 6491 #[derive(Debug, Clone)] 7467 6492 pub struct SoundServiceClient<T> { 7468 6493 inner: tonic::client::Grpc<T>, ··· 7506 6531 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 7507 6532 >, 7508 6533 >, 7509 - <T as tonic::codegen::Service< 7510 - http::Request<tonic::body::BoxBody>, 7511 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6534 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6535 + Into<StdError> + std::marker::Send + std::marker::Sync, 7512 6536 { 7513 6537 SoundServiceClient::new(InterceptedService::new(inner, interceptor)) 7514 6538 } ··· 7546 6570 pub async fn adjust_volume( 7547 6571 &mut self, 7548 6572 request: impl tonic::IntoRequest<super::AdjustVolumeRequest>, 7549 - ) -> std::result::Result< 7550 - tonic::Response<super::AdjustVolumeResponse>, 7551 - tonic::Status, 7552 - > { 7553 - self.inner 7554 - .ready() 7555 - .await 7556 - .map_err(|e| { 7557 - tonic::Status::unknown( 7558 - format!("Service was not ready: {}", e.into()), 7559 - ) 7560 - })?; 6573 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status> 6574 + { 6575 + self.inner.ready().await.map_err(|e| { 6576 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6577 + })?; 7561 6578 let codec = tonic::codec::ProstCodec::default(); 7562 - let path = http::uri::PathAndQuery::from_static( 7563 - "/rockbox.v1alpha1.SoundService/AdjustVolume", 7564 - ); 6579 + let path = 6580 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); 7565 6581 let mut req = request.into_request(); 7566 - req.extensions_mut() 7567 - .insert( 7568 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), 7569 - ); 6582 + req.extensions_mut().insert(GrpcMethod::new( 6583 + "rockbox.v1alpha1.SoundService", 6584 + "AdjustVolume", 6585 + )); 7570 6586 self.inner.unary(req, path, codec).await 7571 6587 } 7572 6588 pub async fn sound_set( 7573 6589 &mut self, 7574 6590 request: impl tonic::IntoRequest<super::SoundSetRequest>, 7575 - ) -> std::result::Result< 7576 - tonic::Response<super::SoundSetResponse>, 7577 - tonic::Status, 7578 - > { 7579 - self.inner 7580 - .ready() 7581 - .await 7582 - .map_err(|e| { 7583 - tonic::Status::unknown( 7584 - format!("Service was not ready: {}", e.into()), 7585 - ) 7586 - })?; 6591 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status> { 6592 + self.inner.ready().await.map_err(|e| { 6593 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6594 + })?; 7587 6595 let codec = tonic::codec::ProstCodec::default(); 7588 - let path = http::uri::PathAndQuery::from_static( 7589 - "/rockbox.v1alpha1.SoundService/SoundSet", 7590 - ); 6596 + let path = 6597 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); 7591 6598 let mut req = request.into_request(); 7592 6599 req.extensions_mut() 7593 6600 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); ··· 7596 6603 pub async fn sound_current( 7597 6604 &mut self, 7598 6605 request: impl tonic::IntoRequest<super::SoundCurrentRequest>, 7599 - ) -> std::result::Result< 7600 - tonic::Response<super::SoundCurrentResponse>, 7601 - tonic::Status, 7602 - > { 7603 - self.inner 7604 - .ready() 7605 - .await 7606 - .map_err(|e| { 7607 - tonic::Status::unknown( 7608 - format!("Service was not ready: {}", e.into()), 7609 - ) 7610 - })?; 6606 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status> 6607 + { 6608 + self.inner.ready().await.map_err(|e| { 6609 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6610 + })?; 7611 6611 let codec = tonic::codec::ProstCodec::default(); 7612 - let path = http::uri::PathAndQuery::from_static( 7613 - "/rockbox.v1alpha1.SoundService/SoundCurrent", 7614 - ); 6612 + let path = 6613 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); 7615 6614 let mut req = request.into_request(); 7616 - req.extensions_mut() 7617 - .insert( 7618 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), 7619 - ); 6615 + req.extensions_mut().insert(GrpcMethod::new( 6616 + "rockbox.v1alpha1.SoundService", 6617 + "SoundCurrent", 6618 + )); 7620 6619 self.inner.unary(req, path, codec).await 7621 6620 } 7622 6621 pub async fn sound_default( 7623 6622 &mut self, 7624 6623 request: impl tonic::IntoRequest<super::SoundDefaultRequest>, 7625 - ) -> std::result::Result< 7626 - tonic::Response<super::SoundDefaultResponse>, 7627 - tonic::Status, 7628 - > { 7629 - self.inner 7630 - .ready() 7631 - .await 7632 - .map_err(|e| { 7633 - tonic::Status::unknown( 7634 - format!("Service was not ready: {}", e.into()), 7635 - ) 7636 - })?; 6624 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status> 6625 + { 6626 + self.inner.ready().await.map_err(|e| { 6627 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6628 + })?; 7637 6629 let codec = tonic::codec::ProstCodec::default(); 7638 - let path = http::uri::PathAndQuery::from_static( 7639 - "/rockbox.v1alpha1.SoundService/SoundDefault", 7640 - ); 6630 + let path = 6631 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); 7641 6632 let mut req = request.into_request(); 7642 - req.extensions_mut() 7643 - .insert( 7644 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), 7645 - ); 6633 + req.extensions_mut().insert(GrpcMethod::new( 6634 + "rockbox.v1alpha1.SoundService", 6635 + "SoundDefault", 6636 + )); 7646 6637 self.inner.unary(req, path, codec).await 7647 6638 } 7648 6639 pub async fn sound_min( 7649 6640 &mut self, 7650 6641 request: impl tonic::IntoRequest<super::SoundMinRequest>, 7651 - ) -> std::result::Result< 7652 - tonic::Response<super::SoundMinResponse>, 7653 - tonic::Status, 7654 - > { 7655 - self.inner 7656 - .ready() 7657 - .await 7658 - .map_err(|e| { 7659 - tonic::Status::unknown( 7660 - format!("Service was not ready: {}", e.into()), 7661 - ) 7662 - })?; 6642 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status> { 6643 + self.inner.ready().await.map_err(|e| { 6644 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6645 + })?; 7663 6646 let codec = tonic::codec::ProstCodec::default(); 7664 - let path = http::uri::PathAndQuery::from_static( 7665 - "/rockbox.v1alpha1.SoundService/SoundMin", 7666 - ); 6647 + let path = 6648 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); 7667 6649 let mut req = request.into_request(); 7668 6650 req.extensions_mut() 7669 6651 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); ··· 7672 6654 pub async fn sound_max( 7673 6655 &mut self, 7674 6656 request: impl tonic::IntoRequest<super::SoundMaxRequest>, 7675 - ) -> std::result::Result< 7676 - tonic::Response<super::SoundMaxResponse>, 7677 - tonic::Status, 7678 - > { 7679 - self.inner 7680 - .ready() 7681 - .await 7682 - .map_err(|e| { 7683 - tonic::Status::unknown( 7684 - format!("Service was not ready: {}", e.into()), 7685 - ) 7686 - })?; 6657 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status> { 6658 + self.inner.ready().await.map_err(|e| { 6659 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6660 + })?; 7687 6661 let codec = tonic::codec::ProstCodec::default(); 7688 - let path = http::uri::PathAndQuery::from_static( 7689 - "/rockbox.v1alpha1.SoundService/SoundMax", 7690 - ); 6662 + let path = 6663 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); 7691 6664 let mut req = request.into_request(); 7692 6665 req.extensions_mut() 7693 6666 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); ··· 7696 6669 pub async fn sound_unit( 7697 6670 &mut self, 7698 6671 request: impl tonic::IntoRequest<super::SoundUnitRequest>, 7699 - ) -> std::result::Result< 7700 - tonic::Response<super::SoundUnitResponse>, 7701 - tonic::Status, 7702 - > { 7703 - self.inner 7704 - .ready() 7705 - .await 7706 - .map_err(|e| { 7707 - tonic::Status::unknown( 7708 - format!("Service was not ready: {}", e.into()), 7709 - ) 7710 - })?; 6672 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status> { 6673 + self.inner.ready().await.map_err(|e| { 6674 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6675 + })?; 7711 6676 let codec = tonic::codec::ProstCodec::default(); 7712 - let path = http::uri::PathAndQuery::from_static( 7713 - "/rockbox.v1alpha1.SoundService/SoundUnit", 7714 - ); 6677 + let path = 6678 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); 7715 6679 let mut req = request.into_request(); 7716 - req.extensions_mut() 7717 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); 6680 + req.extensions_mut().insert(GrpcMethod::new( 6681 + "rockbox.v1alpha1.SoundService", 6682 + "SoundUnit", 6683 + )); 7718 6684 self.inner.unary(req, path, codec).await 7719 6685 } 7720 6686 pub async fn sound_val2_phys( 7721 6687 &mut self, 7722 6688 request: impl tonic::IntoRequest<super::SoundVal2PhysRequest>, 7723 - ) -> std::result::Result< 7724 - tonic::Response<super::SoundVal2PhysResponse>, 7725 - tonic::Status, 7726 - > { 7727 - self.inner 7728 - .ready() 7729 - .await 7730 - .map_err(|e| { 7731 - tonic::Status::unknown( 7732 - format!("Service was not ready: {}", e.into()), 7733 - ) 7734 - })?; 6689 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status> 6690 + { 6691 + self.inner.ready().await.map_err(|e| { 6692 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6693 + })?; 7735 6694 let codec = tonic::codec::ProstCodec::default(); 7736 6695 let path = http::uri::PathAndQuery::from_static( 7737 6696 "/rockbox.v1alpha1.SoundService/SoundVal2Phys", 7738 6697 ); 7739 6698 let mut req = request.into_request(); 7740 - req.extensions_mut() 7741 - .insert( 7742 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), 7743 - ); 6699 + req.extensions_mut().insert(GrpcMethod::new( 6700 + "rockbox.v1alpha1.SoundService", 6701 + "SoundVal2Phys", 6702 + )); 7744 6703 self.inner.unary(req, path, codec).await 7745 6704 } 7746 6705 pub async fn get_pitch( 7747 6706 &mut self, 7748 6707 request: impl tonic::IntoRequest<super::GetPitchRequest>, 7749 - ) -> std::result::Result< 7750 - tonic::Response<super::GetPitchResponse>, 7751 - tonic::Status, 7752 - > { 7753 - self.inner 7754 - .ready() 7755 - .await 7756 - .map_err(|e| { 7757 - tonic::Status::unknown( 7758 - format!("Service was not ready: {}", e.into()), 7759 - ) 7760 - })?; 6708 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status> { 6709 + self.inner.ready().await.map_err(|e| { 6710 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6711 + })?; 7761 6712 let codec = tonic::codec::ProstCodec::default(); 7762 - let path = http::uri::PathAndQuery::from_static( 7763 - "/rockbox.v1alpha1.SoundService/GetPitch", 7764 - ); 6713 + let path = 6714 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); 7765 6715 let mut req = request.into_request(); 7766 6716 req.extensions_mut() 7767 6717 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); ··· 7770 6720 pub async fn set_pitch( 7771 6721 &mut self, 7772 6722 request: impl tonic::IntoRequest<super::SetPitchRequest>, 7773 - ) -> std::result::Result< 7774 - tonic::Response<super::SetPitchResponse>, 7775 - tonic::Status, 7776 - > { 7777 - self.inner 7778 - .ready() 7779 - .await 7780 - .map_err(|e| { 7781 - tonic::Status::unknown( 7782 - format!("Service was not ready: {}", e.into()), 7783 - ) 7784 - })?; 6723 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status> { 6724 + self.inner.ready().await.map_err(|e| { 6725 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6726 + })?; 7785 6727 let codec = tonic::codec::ProstCodec::default(); 7786 - let path = http::uri::PathAndQuery::from_static( 7787 - "/rockbox.v1alpha1.SoundService/SetPitch", 7788 - ); 6728 + let path = 6729 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); 7789 6730 let mut req = request.into_request(); 7790 6731 req.extensions_mut() 7791 6732 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); ··· 7794 6735 pub async fn beep_play( 7795 6736 &mut self, 7796 6737 request: impl tonic::IntoRequest<super::BeepPlayRequest>, 7797 - ) -> std::result::Result< 7798 - tonic::Response<super::BeepPlayResponse>, 7799 - tonic::Status, 7800 - > { 7801 - self.inner 7802 - .ready() 7803 - .await 7804 - .map_err(|e| { 7805 - tonic::Status::unknown( 7806 - format!("Service was not ready: {}", e.into()), 7807 - ) 7808 - })?; 6738 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status> { 6739 + self.inner.ready().await.map_err(|e| { 6740 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6741 + })?; 7809 6742 let codec = tonic::codec::ProstCodec::default(); 7810 - let path = http::uri::PathAndQuery::from_static( 7811 - "/rockbox.v1alpha1.SoundService/BeepPlay", 7812 - ); 6743 + let path = 6744 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); 7813 6745 let mut req = request.into_request(); 7814 6746 req.extensions_mut() 7815 6747 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); ··· 7818 6750 pub async fn pcmbuf_fade( 7819 6751 &mut self, 7820 6752 request: impl tonic::IntoRequest<super::PcmbufFadeRequest>, 7821 - ) -> std::result::Result< 7822 - tonic::Response<super::PcmbufFadeResponse>, 7823 - tonic::Status, 7824 - > { 7825 - self.inner 7826 - .ready() 7827 - .await 7828 - .map_err(|e| { 7829 - tonic::Status::unknown( 7830 - format!("Service was not ready: {}", e.into()), 7831 - ) 7832 - })?; 6753 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status> 6754 + { 6755 + self.inner.ready().await.map_err(|e| { 6756 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6757 + })?; 7833 6758 let codec = tonic::codec::ProstCodec::default(); 7834 - let path = http::uri::PathAndQuery::from_static( 7835 - "/rockbox.v1alpha1.SoundService/PcmbufFade", 7836 - ); 6759 + let path = 6760 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); 7837 6761 let mut req = request.into_request(); 7838 - req.extensions_mut() 7839 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); 6762 + req.extensions_mut().insert(GrpcMethod::new( 6763 + "rockbox.v1alpha1.SoundService", 6764 + "PcmbufFade", 6765 + )); 7840 6766 self.inner.unary(req, path, codec).await 7841 6767 } 7842 6768 pub async fn pcmbuf_set_low_latency( 7843 6769 &mut self, 7844 6770 request: impl tonic::IntoRequest<super::PcmbufSetLowLatencyRequest>, 7845 - ) -> std::result::Result< 7846 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 7847 - tonic::Status, 7848 - > { 7849 - self.inner 7850 - .ready() 7851 - .await 7852 - .map_err(|e| { 7853 - tonic::Status::unknown( 7854 - format!("Service was not ready: {}", e.into()), 7855 - ) 7856 - })?; 6771 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status> 6772 + { 6773 + self.inner.ready().await.map_err(|e| { 6774 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6775 + })?; 7857 6776 let codec = tonic::codec::ProstCodec::default(); 7858 6777 let path = http::uri::PathAndQuery::from_static( 7859 6778 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", 7860 6779 ); 7861 6780 let mut req = request.into_request(); 7862 - req.extensions_mut() 7863 - .insert( 7864 - GrpcMethod::new( 7865 - "rockbox.v1alpha1.SoundService", 7866 - "PcmbufSetLowLatency", 7867 - ), 7868 - ); 6781 + req.extensions_mut().insert(GrpcMethod::new( 6782 + "rockbox.v1alpha1.SoundService", 6783 + "PcmbufSetLowLatency", 6784 + )); 7869 6785 self.inner.unary(req, path, codec).await 7870 6786 } 7871 6787 pub async fn system_sound_play( 7872 6788 &mut self, 7873 6789 request: impl tonic::IntoRequest<super::SystemSoundPlayRequest>, 7874 - ) -> std::result::Result< 7875 - tonic::Response<super::SystemSoundPlayResponse>, 7876 - tonic::Status, 7877 - > { 7878 - self.inner 7879 - .ready() 7880 - .await 7881 - .map_err(|e| { 7882 - tonic::Status::unknown( 7883 - format!("Service was not ready: {}", e.into()), 7884 - ) 7885 - })?; 6790 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status> 6791 + { 6792 + self.inner.ready().await.map_err(|e| { 6793 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6794 + })?; 7886 6795 let codec = tonic::codec::ProstCodec::default(); 7887 6796 let path = http::uri::PathAndQuery::from_static( 7888 6797 "/rockbox.v1alpha1.SoundService/SystemSoundPlay", 7889 6798 ); 7890 6799 let mut req = request.into_request(); 7891 - req.extensions_mut() 7892 - .insert( 7893 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), 7894 - ); 6800 + req.extensions_mut().insert(GrpcMethod::new( 6801 + "rockbox.v1alpha1.SoundService", 6802 + "SystemSoundPlay", 6803 + )); 7895 6804 self.inner.unary(req, path, codec).await 7896 6805 } 7897 6806 pub async fn keyclick_click( 7898 6807 &mut self, 7899 6808 request: impl tonic::IntoRequest<super::KeyclickClickRequest>, 7900 - ) -> std::result::Result< 7901 - tonic::Response<super::KeyclickClickResponse>, 7902 - tonic::Status, 7903 - > { 7904 - self.inner 7905 - .ready() 7906 - .await 7907 - .map_err(|e| { 7908 - tonic::Status::unknown( 7909 - format!("Service was not ready: {}", e.into()), 7910 - ) 7911 - })?; 6809 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status> 6810 + { 6811 + self.inner.ready().await.map_err(|e| { 6812 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6813 + })?; 7912 6814 let codec = tonic::codec::ProstCodec::default(); 7913 6815 let path = http::uri::PathAndQuery::from_static( 7914 6816 "/rockbox.v1alpha1.SoundService/KeyclickClick", 7915 6817 ); 7916 6818 let mut req = request.into_request(); 7917 - req.extensions_mut() 7918 - .insert( 7919 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), 7920 - ); 6819 + req.extensions_mut().insert(GrpcMethod::new( 6820 + "rockbox.v1alpha1.SoundService", 6821 + "KeyclickClick", 6822 + )); 7921 6823 self.inner.unary(req, path, codec).await 7922 6824 } 7923 6825 } ··· 7929 6831 dead_code, 7930 6832 missing_docs, 7931 6833 clippy::wildcard_imports, 7932 - clippy::let_unit_value, 6834 + clippy::let_unit_value 7933 6835 )] 7934 6836 use tonic::codegen::*; 7935 6837 /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. ··· 7938 6840 async fn adjust_volume( 7939 6841 &self, 7940 6842 request: tonic::Request<super::AdjustVolumeRequest>, 7941 - ) -> std::result::Result< 7942 - tonic::Response<super::AdjustVolumeResponse>, 7943 - tonic::Status, 7944 - >; 6843 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status>; 7945 6844 async fn sound_set( 7946 6845 &self, 7947 6846 request: tonic::Request<super::SoundSetRequest>, 7948 - ) -> std::result::Result< 7949 - tonic::Response<super::SoundSetResponse>, 7950 - tonic::Status, 7951 - >; 6847 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status>; 7952 6848 async fn sound_current( 7953 6849 &self, 7954 6850 request: tonic::Request<super::SoundCurrentRequest>, 7955 - ) -> std::result::Result< 7956 - tonic::Response<super::SoundCurrentResponse>, 7957 - tonic::Status, 7958 - >; 6851 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status>; 7959 6852 async fn sound_default( 7960 6853 &self, 7961 6854 request: tonic::Request<super::SoundDefaultRequest>, 7962 - ) -> std::result::Result< 7963 - tonic::Response<super::SoundDefaultResponse>, 7964 - tonic::Status, 7965 - >; 6855 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status>; 7966 6856 async fn sound_min( 7967 6857 &self, 7968 6858 request: tonic::Request<super::SoundMinRequest>, 7969 - ) -> std::result::Result< 7970 - tonic::Response<super::SoundMinResponse>, 7971 - tonic::Status, 7972 - >; 6859 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status>; 7973 6860 async fn sound_max( 7974 6861 &self, 7975 6862 request: tonic::Request<super::SoundMaxRequest>, 7976 - ) -> std::result::Result< 7977 - tonic::Response<super::SoundMaxResponse>, 7978 - tonic::Status, 7979 - >; 6863 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status>; 7980 6864 async fn sound_unit( 7981 6865 &self, 7982 6866 request: tonic::Request<super::SoundUnitRequest>, 7983 - ) -> std::result::Result< 7984 - tonic::Response<super::SoundUnitResponse>, 7985 - tonic::Status, 7986 - >; 6867 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status>; 7987 6868 async fn sound_val2_phys( 7988 6869 &self, 7989 6870 request: tonic::Request<super::SoundVal2PhysRequest>, 7990 - ) -> std::result::Result< 7991 - tonic::Response<super::SoundVal2PhysResponse>, 7992 - tonic::Status, 7993 - >; 6871 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status>; 7994 6872 async fn get_pitch( 7995 6873 &self, 7996 6874 request: tonic::Request<super::GetPitchRequest>, 7997 - ) -> std::result::Result< 7998 - tonic::Response<super::GetPitchResponse>, 7999 - tonic::Status, 8000 - >; 6875 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status>; 8001 6876 async fn set_pitch( 8002 6877 &self, 8003 6878 request: tonic::Request<super::SetPitchRequest>, 8004 - ) -> std::result::Result< 8005 - tonic::Response<super::SetPitchResponse>, 8006 - tonic::Status, 8007 - >; 6879 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status>; 8008 6880 async fn beep_play( 8009 6881 &self, 8010 6882 request: tonic::Request<super::BeepPlayRequest>, 8011 - ) -> std::result::Result< 8012 - tonic::Response<super::BeepPlayResponse>, 8013 - tonic::Status, 8014 - >; 6883 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status>; 8015 6884 async fn pcmbuf_fade( 8016 6885 &self, 8017 6886 request: tonic::Request<super::PcmbufFadeRequest>, 8018 - ) -> std::result::Result< 8019 - tonic::Response<super::PcmbufFadeResponse>, 8020 - tonic::Status, 8021 - >; 6887 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status>; 8022 6888 async fn pcmbuf_set_low_latency( 8023 6889 &self, 8024 6890 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8025 - ) -> std::result::Result< 8026 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 8027 - tonic::Status, 8028 - >; 6891 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status>; 8029 6892 async fn system_sound_play( 8030 6893 &self, 8031 6894 request: tonic::Request<super::SystemSoundPlayRequest>, 8032 - ) -> std::result::Result< 8033 - tonic::Response<super::SystemSoundPlayResponse>, 8034 - tonic::Status, 8035 - >; 6895 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status>; 8036 6896 async fn keyclick_click( 8037 6897 &self, 8038 6898 request: tonic::Request<super::KeyclickClickRequest>, 8039 - ) -> std::result::Result< 8040 - tonic::Response<super::KeyclickClickResponse>, 8041 - tonic::Status, 8042 - >; 6899 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status>; 8043 6900 } 8044 6901 #[derive(Debug)] 8045 6902 pub struct SoundServiceServer<T> { ··· 8062 6919 max_encoding_message_size: None, 8063 6920 } 8064 6921 } 8065 - pub fn with_interceptor<F>( 8066 - inner: T, 8067 - interceptor: F, 8068 - ) -> InterceptedService<Self, F> 6922 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 8069 6923 where 8070 6924 F: tonic::service::Interceptor, 8071 6925 { ··· 8120 6974 "/rockbox.v1alpha1.SoundService/AdjustVolume" => { 8121 6975 #[allow(non_camel_case_types)] 8122 6976 struct AdjustVolumeSvc<T: SoundService>(pub Arc<T>); 8123 - impl< 8124 - T: SoundService, 8125 - > tonic::server::UnaryService<super::AdjustVolumeRequest> 8126 - for AdjustVolumeSvc<T> { 6977 + impl<T: SoundService> tonic::server::UnaryService<super::AdjustVolumeRequest> 6978 + for AdjustVolumeSvc<T> 6979 + { 8127 6980 type Response = super::AdjustVolumeResponse; 8128 - type Future = BoxFuture< 8129 - tonic::Response<Self::Response>, 8130 - tonic::Status, 8131 - >; 6981 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8132 6982 fn call( 8133 6983 &mut self, 8134 6984 request: tonic::Request<super::AdjustVolumeRequest>, ··· 8165 7015 "/rockbox.v1alpha1.SoundService/SoundSet" => { 8166 7016 #[allow(non_camel_case_types)] 8167 7017 struct SoundSetSvc<T: SoundService>(pub Arc<T>); 8168 - impl< 8169 - T: SoundService, 8170 - > tonic::server::UnaryService<super::SoundSetRequest> 8171 - for SoundSetSvc<T> { 7018 + impl<T: SoundService> tonic::server::UnaryService<super::SoundSetRequest> for SoundSetSvc<T> { 8172 7019 type Response = super::SoundSetResponse; 8173 - type Future = BoxFuture< 8174 - tonic::Response<Self::Response>, 8175 - tonic::Status, 8176 - >; 7020 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8177 7021 fn call( 8178 7022 &mut self, 8179 7023 request: tonic::Request<super::SoundSetRequest>, ··· 8210 7054 "/rockbox.v1alpha1.SoundService/SoundCurrent" => { 8211 7055 #[allow(non_camel_case_types)] 8212 7056 struct SoundCurrentSvc<T: SoundService>(pub Arc<T>); 8213 - impl< 8214 - T: SoundService, 8215 - > tonic::server::UnaryService<super::SoundCurrentRequest> 8216 - for SoundCurrentSvc<T> { 7057 + impl<T: SoundService> tonic::server::UnaryService<super::SoundCurrentRequest> 7058 + for SoundCurrentSvc<T> 7059 + { 8217 7060 type Response = super::SoundCurrentResponse; 8218 - type Future = BoxFuture< 8219 - tonic::Response<Self::Response>, 8220 - tonic::Status, 8221 - >; 7061 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8222 7062 fn call( 8223 7063 &mut self, 8224 7064 request: tonic::Request<super::SoundCurrentRequest>, ··· 8255 7095 "/rockbox.v1alpha1.SoundService/SoundDefault" => { 8256 7096 #[allow(non_camel_case_types)] 8257 7097 struct SoundDefaultSvc<T: SoundService>(pub Arc<T>); 8258 - impl< 8259 - T: SoundService, 8260 - > tonic::server::UnaryService<super::SoundDefaultRequest> 8261 - for SoundDefaultSvc<T> { 7098 + impl<T: SoundService> tonic::server::UnaryService<super::SoundDefaultRequest> 7099 + for SoundDefaultSvc<T> 7100 + { 8262 7101 type Response = super::SoundDefaultResponse; 8263 - type Future = BoxFuture< 8264 - tonic::Response<Self::Response>, 8265 - tonic::Status, 8266 - >; 7102 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8267 7103 fn call( 8268 7104 &mut self, 8269 7105 request: tonic::Request<super::SoundDefaultRequest>, ··· 8300 7136 "/rockbox.v1alpha1.SoundService/SoundMin" => { 8301 7137 #[allow(non_camel_case_types)] 8302 7138 struct SoundMinSvc<T: SoundService>(pub Arc<T>); 8303 - impl< 8304 - T: SoundService, 8305 - > tonic::server::UnaryService<super::SoundMinRequest> 8306 - for SoundMinSvc<T> { 7139 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMinRequest> for SoundMinSvc<T> { 8307 7140 type Response = super::SoundMinResponse; 8308 - type Future = BoxFuture< 8309 - tonic::Response<Self::Response>, 8310 - tonic::Status, 8311 - >; 7141 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8312 7142 fn call( 8313 7143 &mut self, 8314 7144 request: tonic::Request<super::SoundMinRequest>, ··· 8345 7175 "/rockbox.v1alpha1.SoundService/SoundMax" => { 8346 7176 #[allow(non_camel_case_types)] 8347 7177 struct SoundMaxSvc<T: SoundService>(pub Arc<T>); 8348 - impl< 8349 - T: SoundService, 8350 - > tonic::server::UnaryService<super::SoundMaxRequest> 8351 - for SoundMaxSvc<T> { 7178 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMaxRequest> for SoundMaxSvc<T> { 8352 7179 type Response = super::SoundMaxResponse; 8353 - type Future = BoxFuture< 8354 - tonic::Response<Self::Response>, 8355 - tonic::Status, 8356 - >; 7180 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8357 7181 fn call( 8358 7182 &mut self, 8359 7183 request: tonic::Request<super::SoundMaxRequest>, ··· 8390 7214 "/rockbox.v1alpha1.SoundService/SoundUnit" => { 8391 7215 #[allow(non_camel_case_types)] 8392 7216 struct SoundUnitSvc<T: SoundService>(pub Arc<T>); 8393 - impl< 8394 - T: SoundService, 8395 - > tonic::server::UnaryService<super::SoundUnitRequest> 8396 - for SoundUnitSvc<T> { 7217 + impl<T: SoundService> tonic::server::UnaryService<super::SoundUnitRequest> for SoundUnitSvc<T> { 8397 7218 type Response = super::SoundUnitResponse; 8398 - type Future = BoxFuture< 8399 - tonic::Response<Self::Response>, 8400 - tonic::Status, 8401 - >; 7219 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8402 7220 fn call( 8403 7221 &mut self, 8404 7222 request: tonic::Request<super::SoundUnitRequest>, ··· 8435 7253 "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { 8436 7254 #[allow(non_camel_case_types)] 8437 7255 struct SoundVal2PhysSvc<T: SoundService>(pub Arc<T>); 8438 - impl< 8439 - T: SoundService, 8440 - > tonic::server::UnaryService<super::SoundVal2PhysRequest> 8441 - for SoundVal2PhysSvc<T> { 7256 + impl<T: SoundService> tonic::server::UnaryService<super::SoundVal2PhysRequest> 7257 + for SoundVal2PhysSvc<T> 7258 + { 8442 7259 type Response = super::SoundVal2PhysResponse; 8443 - type Future = BoxFuture< 8444 - tonic::Response<Self::Response>, 8445 - tonic::Status, 8446 - >; 7260 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8447 7261 fn call( 8448 7262 &mut self, 8449 7263 request: tonic::Request<super::SoundVal2PhysRequest>, ··· 8480 7294 "/rockbox.v1alpha1.SoundService/GetPitch" => { 8481 7295 #[allow(non_camel_case_types)] 8482 7296 struct GetPitchSvc<T: SoundService>(pub Arc<T>); 8483 - impl< 8484 - T: SoundService, 8485 - > tonic::server::UnaryService<super::GetPitchRequest> 8486 - for GetPitchSvc<T> { 7297 + impl<T: SoundService> tonic::server::UnaryService<super::GetPitchRequest> for GetPitchSvc<T> { 8487 7298 type Response = super::GetPitchResponse; 8488 - type Future = BoxFuture< 8489 - tonic::Response<Self::Response>, 8490 - tonic::Status, 8491 - >; 7299 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8492 7300 fn call( 8493 7301 &mut self, 8494 7302 request: tonic::Request<super::GetPitchRequest>, ··· 8525 7333 "/rockbox.v1alpha1.SoundService/SetPitch" => { 8526 7334 #[allow(non_camel_case_types)] 8527 7335 struct SetPitchSvc<T: SoundService>(pub Arc<T>); 8528 - impl< 8529 - T: SoundService, 8530 - > tonic::server::UnaryService<super::SetPitchRequest> 8531 - for SetPitchSvc<T> { 7336 + impl<T: SoundService> tonic::server::UnaryService<super::SetPitchRequest> for SetPitchSvc<T> { 8532 7337 type Response = super::SetPitchResponse; 8533 - type Future = BoxFuture< 8534 - tonic::Response<Self::Response>, 8535 - tonic::Status, 8536 - >; 7338 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8537 7339 fn call( 8538 7340 &mut self, 8539 7341 request: tonic::Request<super::SetPitchRequest>, ··· 8570 7372 "/rockbox.v1alpha1.SoundService/BeepPlay" => { 8571 7373 #[allow(non_camel_case_types)] 8572 7374 struct BeepPlaySvc<T: SoundService>(pub Arc<T>); 8573 - impl< 8574 - T: SoundService, 8575 - > tonic::server::UnaryService<super::BeepPlayRequest> 8576 - for BeepPlaySvc<T> { 7375 + impl<T: SoundService> tonic::server::UnaryService<super::BeepPlayRequest> for BeepPlaySvc<T> { 8577 7376 type Response = super::BeepPlayResponse; 8578 - type Future = BoxFuture< 8579 - tonic::Response<Self::Response>, 8580 - tonic::Status, 8581 - >; 7377 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8582 7378 fn call( 8583 7379 &mut self, 8584 7380 request: tonic::Request<super::BeepPlayRequest>, ··· 8615 7411 "/rockbox.v1alpha1.SoundService/PcmbufFade" => { 8616 7412 #[allow(non_camel_case_types)] 8617 7413 struct PcmbufFadeSvc<T: SoundService>(pub Arc<T>); 8618 - impl< 8619 - T: SoundService, 8620 - > tonic::server::UnaryService<super::PcmbufFadeRequest> 8621 - for PcmbufFadeSvc<T> { 7414 + impl<T: SoundService> tonic::server::UnaryService<super::PcmbufFadeRequest> for PcmbufFadeSvc<T> { 8622 7415 type Response = super::PcmbufFadeResponse; 8623 - type Future = BoxFuture< 8624 - tonic::Response<Self::Response>, 8625 - tonic::Status, 8626 - >; 7416 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8627 7417 fn call( 8628 7418 &mut self, 8629 7419 request: tonic::Request<super::PcmbufFadeRequest>, ··· 8660 7450 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { 8661 7451 #[allow(non_camel_case_types)] 8662 7452 struct PcmbufSetLowLatencySvc<T: SoundService>(pub Arc<T>); 8663 - impl< 8664 - T: SoundService, 8665 - > tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 8666 - for PcmbufSetLowLatencySvc<T> { 7453 + impl<T: SoundService> 7454 + tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 7455 + for PcmbufSetLowLatencySvc<T> 7456 + { 8667 7457 type Response = super::PcmbufSetLowLatencyResponse; 8668 - type Future = BoxFuture< 8669 - tonic::Response<Self::Response>, 8670 - tonic::Status, 8671 - >; 7458 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8672 7459 fn call( 8673 7460 &mut self, 8674 7461 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8675 7462 ) -> Self::Future { 8676 7463 let inner = Arc::clone(&self.0); 8677 7464 let fut = async move { 8678 - <T as SoundService>::pcmbuf_set_low_latency(&inner, request) 8679 - .await 7465 + <T as SoundService>::pcmbuf_set_low_latency(&inner, request).await 8680 7466 }; 8681 7467 Box::pin(fut) 8682 7468 } ··· 8706 7492 "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { 8707 7493 #[allow(non_camel_case_types)] 8708 7494 struct SystemSoundPlaySvc<T: SoundService>(pub Arc<T>); 8709 - impl< 8710 - T: SoundService, 8711 - > tonic::server::UnaryService<super::SystemSoundPlayRequest> 8712 - for SystemSoundPlaySvc<T> { 7495 + impl<T: SoundService> tonic::server::UnaryService<super::SystemSoundPlayRequest> 7496 + for SystemSoundPlaySvc<T> 7497 + { 8713 7498 type Response = super::SystemSoundPlayResponse; 8714 - type Future = BoxFuture< 8715 - tonic::Response<Self::Response>, 8716 - tonic::Status, 8717 - >; 7499 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8718 7500 fn call( 8719 7501 &mut self, 8720 7502 request: tonic::Request<super::SystemSoundPlayRequest>, 8721 7503 ) -> Self::Future { 8722 7504 let inner = Arc::clone(&self.0); 8723 7505 let fut = async move { 8724 - <T as SoundService>::system_sound_play(&inner, request) 8725 - .await 7506 + <T as SoundService>::system_sound_play(&inner, request).await 8726 7507 }; 8727 7508 Box::pin(fut) 8728 7509 } ··· 8752 7533 "/rockbox.v1alpha1.SoundService/KeyclickClick" => { 8753 7534 #[allow(non_camel_case_types)] 8754 7535 struct KeyclickClickSvc<T: SoundService>(pub Arc<T>); 8755 - impl< 8756 - T: SoundService, 8757 - > tonic::server::UnaryService<super::KeyclickClickRequest> 8758 - for KeyclickClickSvc<T> { 7536 + impl<T: SoundService> tonic::server::UnaryService<super::KeyclickClickRequest> 7537 + for KeyclickClickSvc<T> 7538 + { 8759 7539 type Response = super::KeyclickClickResponse; 8760 - type Future = BoxFuture< 8761 - tonic::Response<Self::Response>, 8762 - tonic::Status, 8763 - >; 7540 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8764 7541 fn call( 8765 7542 &mut self, 8766 7543 request: tonic::Request<super::KeyclickClickRequest>, ··· 8794 7571 }; 8795 7572 Box::pin(fut) 8796 7573 } 8797 - _ => { 8798 - Box::pin(async move { 8799 - let mut response = http::Response::new(empty_body()); 8800 - let headers = response.headers_mut(); 8801 - headers 8802 - .insert( 8803 - tonic::Status::GRPC_STATUS, 8804 - (tonic::Code::Unimplemented as i32).into(), 8805 - ); 8806 - headers 8807 - .insert( 8808 - http::header::CONTENT_TYPE, 8809 - tonic::metadata::GRPC_CONTENT_TYPE, 8810 - ); 8811 - Ok(response) 8812 - }) 8813 - } 7574 + _ => Box::pin(async move { 7575 + let mut response = http::Response::new(empty_body()); 7576 + let headers = response.headers_mut(); 7577 + headers.insert( 7578 + tonic::Status::GRPC_STATUS, 7579 + (tonic::Code::Unimplemented as i32).into(), 7580 + ); 7581 + headers.insert( 7582 + http::header::CONTENT_TYPE, 7583 + tonic::metadata::GRPC_CONTENT_TYPE, 7584 + ); 7585 + Ok(response) 7586 + }), 8814 7587 } 8815 7588 } 8816 7589 } ··· 8871 7644 dead_code, 8872 7645 missing_docs, 8873 7646 clippy::wildcard_imports, 8874 - clippy::let_unit_value, 7647 + clippy::let_unit_value 8875 7648 )] 7649 + use tonic::codegen::http::Uri; 8876 7650 use tonic::codegen::*; 8877 - use tonic::codegen::http::Uri; 8878 7651 #[derive(Debug, Clone)] 8879 7652 pub struct SystemServiceClient<T> { 8880 7653 inner: tonic::client::Grpc<T>, ··· 8918 7691 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 8919 7692 >, 8920 7693 >, 8921 - <T as tonic::codegen::Service< 8922 - http::Request<tonic::body::BoxBody>, 8923 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 7694 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 7695 + Into<StdError> + std::marker::Send + std::marker::Sync, 8924 7696 { 8925 7697 SystemServiceClient::new(InterceptedService::new(inner, interceptor)) 8926 7698 } ··· 8958 7730 pub async fn get_rockbox_version( 8959 7731 &mut self, 8960 7732 request: impl tonic::IntoRequest<super::GetRockboxVersionRequest>, 8961 - ) -> std::result::Result< 8962 - tonic::Response<super::GetRockboxVersionResponse>, 8963 - tonic::Status, 8964 - > { 8965 - self.inner 8966 - .ready() 8967 - .await 8968 - .map_err(|e| { 8969 - tonic::Status::unknown( 8970 - format!("Service was not ready: {}", e.into()), 8971 - ) 8972 - })?; 7733 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status> 7734 + { 7735 + self.inner.ready().await.map_err(|e| { 7736 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7737 + })?; 8973 7738 let codec = tonic::codec::ProstCodec::default(); 8974 7739 let path = http::uri::PathAndQuery::from_static( 8975 7740 "/rockbox.v1alpha1.SystemService/GetRockboxVersion", 8976 7741 ); 8977 7742 let mut req = request.into_request(); 8978 - req.extensions_mut() 8979 - .insert( 8980 - GrpcMethod::new( 8981 - "rockbox.v1alpha1.SystemService", 8982 - "GetRockboxVersion", 8983 - ), 8984 - ); 7743 + req.extensions_mut().insert(GrpcMethod::new( 7744 + "rockbox.v1alpha1.SystemService", 7745 + "GetRockboxVersion", 7746 + )); 8985 7747 self.inner.unary(req, path, codec).await 8986 7748 } 8987 7749 pub async fn get_global_status( 8988 7750 &mut self, 8989 7751 request: impl tonic::IntoRequest<super::GetGlobalStatusRequest>, 8990 - ) -> std::result::Result< 8991 - tonic::Response<super::GetGlobalStatusResponse>, 8992 - tonic::Status, 8993 - > { 8994 - self.inner 8995 - .ready() 8996 - .await 8997 - .map_err(|e| { 8998 - tonic::Status::unknown( 8999 - format!("Service was not ready: {}", e.into()), 9000 - ) 9001 - })?; 7752 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status> 7753 + { 7754 + self.inner.ready().await.map_err(|e| { 7755 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7756 + })?; 9002 7757 let codec = tonic::codec::ProstCodec::default(); 9003 7758 let path = http::uri::PathAndQuery::from_static( 9004 7759 "/rockbox.v1alpha1.SystemService/GetGlobalStatus", 9005 7760 ); 9006 7761 let mut req = request.into_request(); 9007 - req.extensions_mut() 9008 - .insert( 9009 - GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), 9010 - ); 7762 + req.extensions_mut().insert(GrpcMethod::new( 7763 + "rockbox.v1alpha1.SystemService", 7764 + "GetGlobalStatus", 7765 + )); 9011 7766 self.inner.unary(req, path, codec).await 9012 7767 } 9013 7768 } ··· 9019 7774 dead_code, 9020 7775 missing_docs, 9021 7776 clippy::wildcard_imports, 9022 - clippy::let_unit_value, 7777 + clippy::let_unit_value 9023 7778 )] 9024 7779 use tonic::codegen::*; 9025 7780 /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. ··· 9028 7783 async fn get_rockbox_version( 9029 7784 &self, 9030 7785 request: tonic::Request<super::GetRockboxVersionRequest>, 9031 - ) -> std::result::Result< 9032 - tonic::Response<super::GetRockboxVersionResponse>, 9033 - tonic::Status, 9034 - >; 7786 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status>; 9035 7787 async fn get_global_status( 9036 7788 &self, 9037 7789 request: tonic::Request<super::GetGlobalStatusRequest>, 9038 - ) -> std::result::Result< 9039 - tonic::Response<super::GetGlobalStatusResponse>, 9040 - tonic::Status, 9041 - >; 7790 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status>; 9042 7791 } 9043 7792 #[derive(Debug)] 9044 7793 pub struct SystemServiceServer<T> { ··· 9061 7810 max_encoding_message_size: None, 9062 7811 } 9063 7812 } 9064 - pub fn with_interceptor<F>( 9065 - inner: T, 9066 - interceptor: F, 9067 - ) -> InterceptedService<Self, F> 7813 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 9068 7814 where 9069 7815 F: tonic::service::Interceptor, 9070 7816 { ··· 9119 7865 "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { 9120 7866 #[allow(non_camel_case_types)] 9121 7867 struct GetRockboxVersionSvc<T: SystemService>(pub Arc<T>); 9122 - impl< 9123 - T: SystemService, 9124 - > tonic::server::UnaryService<super::GetRockboxVersionRequest> 9125 - for GetRockboxVersionSvc<T> { 7868 + impl<T: SystemService> 7869 + tonic::server::UnaryService<super::GetRockboxVersionRequest> 7870 + for GetRockboxVersionSvc<T> 7871 + { 9126 7872 type Response = super::GetRockboxVersionResponse; 9127 - type Future = BoxFuture< 9128 - tonic::Response<Self::Response>, 9129 - tonic::Status, 9130 - >; 7873 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9131 7874 fn call( 9132 7875 &mut self, 9133 7876 request: tonic::Request<super::GetRockboxVersionRequest>, 9134 7877 ) -> Self::Future { 9135 7878 let inner = Arc::clone(&self.0); 9136 7879 let fut = async move { 9137 - <T as SystemService>::get_rockbox_version(&inner, request) 9138 - .await 7880 + <T as SystemService>::get_rockbox_version(&inner, request).await 9139 7881 }; 9140 7882 Box::pin(fut) 9141 7883 } ··· 9165 7907 "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { 9166 7908 #[allow(non_camel_case_types)] 9167 7909 struct GetGlobalStatusSvc<T: SystemService>(pub Arc<T>); 9168 - impl< 9169 - T: SystemService, 9170 - > tonic::server::UnaryService<super::GetGlobalStatusRequest> 9171 - for GetGlobalStatusSvc<T> { 7910 + impl<T: SystemService> 7911 + tonic::server::UnaryService<super::GetGlobalStatusRequest> 7912 + for GetGlobalStatusSvc<T> 7913 + { 9172 7914 type Response = super::GetGlobalStatusResponse; 9173 - type Future = BoxFuture< 9174 - tonic::Response<Self::Response>, 9175 - tonic::Status, 9176 - >; 7915 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9177 7916 fn call( 9178 7917 &mut self, 9179 7918 request: tonic::Request<super::GetGlobalStatusRequest>, 9180 7919 ) -> Self::Future { 9181 7920 let inner = Arc::clone(&self.0); 9182 7921 let fut = async move { 9183 - <T as SystemService>::get_global_status(&inner, request) 9184 - .await 7922 + <T as SystemService>::get_global_status(&inner, request).await 9185 7923 }; 9186 7924 Box::pin(fut) 9187 7925 } ··· 9208 7946 }; 9209 7947 Box::pin(fut) 9210 7948 } 9211 - _ => { 9212 - Box::pin(async move { 9213 - let mut response = http::Response::new(empty_body()); 9214 - let headers = response.headers_mut(); 9215 - headers 9216 - .insert( 9217 - tonic::Status::GRPC_STATUS, 9218 - (tonic::Code::Unimplemented as i32).into(), 9219 - ); 9220 - headers 9221 - .insert( 9222 - http::header::CONTENT_TYPE, 9223 - tonic::metadata::GRPC_CONTENT_TYPE, 9224 - ); 9225 - Ok(response) 9226 - }) 9227 - } 7949 + _ => Box::pin(async move { 7950 + let mut response = http::Response::new(empty_body()); 7951 + let headers = response.headers_mut(); 7952 + headers.insert( 7953 + tonic::Status::GRPC_STATUS, 7954 + (tonic::Code::Unimplemented as i32).into(), 7955 + ); 7956 + headers.insert( 7957 + http::header::CONTENT_TYPE, 7958 + tonic::metadata::GRPC_CONTENT_TYPE, 7959 + ); 7960 + Ok(response) 7961 + }), 9228 7962 } 9229 7963 } 9230 7964 }
+3
macos/.gitignore
··· 1 + build 2 + dmg_temp 3 + *.dmg
+10
macos/ExportOptions.plist
··· 1 + <?xml version="1.0" encoding="UTF-8"?> 2 + <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 + <plist version="1.0"> 4 + <dict> 5 + <key>method</key> 6 + <string>mac-application</string> 7 + <key>signingStyle</key> 8 + <string>automatic</string> 9 + </dict> 10 + </plist>
macos/Rockbox.xcodeproj/project.xcworkspace/xcuserdata/tsirysandratraina.xcuserdatad/UserInterfaceState.xcuserstate

This is a binary file and will not be displayed.

+37 -4
macos/Rockbox/RockboxApp.swift
··· 4 4 // 5 5 // Created by Tsiry Sandratraina on 13/12/2025. 6 6 // 7 - 8 7 import SwiftUI 9 8 10 9 @main ··· 12 11 @StateObject private var player = PlayerState() 13 12 @StateObject private var navigation = NavigationManager() 14 13 @StateObject private var searchManager = SearchManager() 14 + @State private var startupFailed = false 15 + @State private var startupError: Error? 15 16 16 17 var body: some Scene { 17 18 WindowGroup { ··· 19 20 .environmentObject(player) 20 21 .environmentObject(navigation) 21 22 .environmentObject(searchManager) 22 - .task { 23 - player.startStreaming() 23 + .alert("Connection Failed", isPresented: $startupFailed) { 24 + Button("Retry") { 25 + retry() 26 + } 27 + .keyboardShortcut(.defaultAction) 28 + 29 + Button("Quit") { 30 + NSApplication.shared.terminate(nil) 31 + } 32 + .keyboardShortcut(.cancelAction) 33 + } message: { 34 + Text(startupError?.localizedDescription ?? "Failed to connect to the server. Please make sure the Rockbox server is running.") 24 35 } 25 36 .task { 26 - player.fetchSettings() 37 + await performStartup() 27 38 } 28 39 } 29 40 .windowStyle(.hiddenTitleBar) 41 + } 42 + 43 + private func performStartup() async { 44 + do { 45 + // Check if server is available first 46 + _ = try await fetchGlobalStatus() 47 + 48 + // If successful, start normal operations 49 + player.startStreaming() 50 + player.fetchSettings() 51 + 52 + } catch { 53 + // Show error and allow retry or quit 54 + startupError = error 55 + startupFailed = true 56 + } 57 + } 58 + 59 + private func retry() { 60 + Task { 61 + await performStartup() 62 + } 30 63 } 31 64 }