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

Configure Feed

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

run cargo fmt

+1224 -2470
+1224 -2470
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 } ··· 542 519 dead_code, 543 520 missing_docs, 544 521 clippy::wildcard_imports, 545 - clippy::let_unit_value, 522 + clippy::let_unit_value 546 523 )] 547 - use tonic::codegen::*; 548 524 use tonic::codegen::http::Uri; 525 + use tonic::codegen::*; 549 526 #[derive(Debug, Clone)] 550 527 pub struct LibraryServiceClient<T> { 551 528 inner: tonic::client::Grpc<T>, ··· 589 566 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 590 567 >, 591 568 >, 592 - <T as tonic::codegen::Service< 593 - http::Request<tonic::body::BoxBody>, 594 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 569 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 570 + Into<StdError> + std::marker::Send + std::marker::Sync, 595 571 { 596 572 LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) 597 573 } ··· 629 605 pub async fn get_albums( 630 606 &mut self, 631 607 request: impl tonic::IntoRequest<super::GetAlbumsRequest>, 632 - ) -> std::result::Result< 633 - tonic::Response<super::GetAlbumsResponse>, 634 - tonic::Status, 635 - > { 636 - self.inner 637 - .ready() 638 - .await 639 - .map_err(|e| { 640 - tonic::Status::unknown( 641 - format!("Service was not ready: {}", e.into()), 642 - ) 643 - })?; 608 + ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status> { 609 + self.inner.ready().await.map_err(|e| { 610 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 611 + })?; 644 612 let codec = tonic::codec::ProstCodec::default(); 645 - let path = http::uri::PathAndQuery::from_static( 646 - "/rockbox.v1alpha1.LibraryService/GetAlbums", 647 - ); 613 + let path = 614 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); 648 615 let mut req = request.into_request(); 649 - req.extensions_mut() 650 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); 616 + req.extensions_mut().insert(GrpcMethod::new( 617 + "rockbox.v1alpha1.LibraryService", 618 + "GetAlbums", 619 + )); 651 620 self.inner.unary(req, path, codec).await 652 621 } 653 622 pub async fn get_artists( 654 623 &mut self, 655 624 request: impl tonic::IntoRequest<super::GetArtistsRequest>, 656 - ) -> std::result::Result< 657 - tonic::Response<super::GetArtistsResponse>, 658 - tonic::Status, 659 - > { 660 - self.inner 661 - .ready() 662 - .await 663 - .map_err(|e| { 664 - tonic::Status::unknown( 665 - format!("Service was not ready: {}", e.into()), 666 - ) 667 - })?; 625 + ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status> 626 + { 627 + self.inner.ready().await.map_err(|e| { 628 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 629 + })?; 668 630 let codec = tonic::codec::ProstCodec::default(); 669 - let path = http::uri::PathAndQuery::from_static( 670 - "/rockbox.v1alpha1.LibraryService/GetArtists", 671 - ); 631 + let path = 632 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); 672 633 let mut req = request.into_request(); 673 - req.extensions_mut() 674 - .insert( 675 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), 676 - ); 634 + req.extensions_mut().insert(GrpcMethod::new( 635 + "rockbox.v1alpha1.LibraryService", 636 + "GetArtists", 637 + )); 677 638 self.inner.unary(req, path, codec).await 678 639 } 679 640 pub async fn get_tracks( 680 641 &mut self, 681 642 request: impl tonic::IntoRequest<super::GetTracksRequest>, 682 - ) -> std::result::Result< 683 - tonic::Response<super::GetTracksResponse>, 684 - tonic::Status, 685 - > { 686 - self.inner 687 - .ready() 688 - .await 689 - .map_err(|e| { 690 - tonic::Status::unknown( 691 - format!("Service was not ready: {}", e.into()), 692 - ) 693 - })?; 643 + ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status> { 644 + self.inner.ready().await.map_err(|e| { 645 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 646 + })?; 694 647 let codec = tonic::codec::ProstCodec::default(); 695 - let path = http::uri::PathAndQuery::from_static( 696 - "/rockbox.v1alpha1.LibraryService/GetTracks", 697 - ); 648 + let path = 649 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); 698 650 let mut req = request.into_request(); 699 - req.extensions_mut() 700 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); 651 + req.extensions_mut().insert(GrpcMethod::new( 652 + "rockbox.v1alpha1.LibraryService", 653 + "GetTracks", 654 + )); 701 655 self.inner.unary(req, path, codec).await 702 656 } 703 657 pub async fn get_album( 704 658 &mut self, 705 659 request: impl tonic::IntoRequest<super::GetAlbumRequest>, 706 - ) -> std::result::Result< 707 - tonic::Response<super::GetAlbumResponse>, 708 - tonic::Status, 709 - > { 710 - self.inner 711 - .ready() 712 - .await 713 - .map_err(|e| { 714 - tonic::Status::unknown( 715 - format!("Service was not ready: {}", e.into()), 716 - ) 717 - })?; 660 + ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status> { 661 + self.inner.ready().await.map_err(|e| { 662 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 663 + })?; 718 664 let codec = tonic::codec::ProstCodec::default(); 719 - let path = http::uri::PathAndQuery::from_static( 720 - "/rockbox.v1alpha1.LibraryService/GetAlbum", 721 - ); 665 + let path = 666 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); 722 667 let mut req = request.into_request(); 723 - req.extensions_mut() 724 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); 668 + req.extensions_mut().insert(GrpcMethod::new( 669 + "rockbox.v1alpha1.LibraryService", 670 + "GetAlbum", 671 + )); 725 672 self.inner.unary(req, path, codec).await 726 673 } 727 674 pub async fn get_artist( 728 675 &mut self, 729 676 request: impl tonic::IntoRequest<super::GetArtistRequest>, 730 - ) -> std::result::Result< 731 - tonic::Response<super::GetArtistResponse>, 732 - tonic::Status, 733 - > { 734 - self.inner 735 - .ready() 736 - .await 737 - .map_err(|e| { 738 - tonic::Status::unknown( 739 - format!("Service was not ready: {}", e.into()), 740 - ) 741 - })?; 677 + ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status> { 678 + self.inner.ready().await.map_err(|e| { 679 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 680 + })?; 742 681 let codec = tonic::codec::ProstCodec::default(); 743 - let path = http::uri::PathAndQuery::from_static( 744 - "/rockbox.v1alpha1.LibraryService/GetArtist", 745 - ); 682 + let path = 683 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); 746 684 let mut req = request.into_request(); 747 - req.extensions_mut() 748 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); 685 + req.extensions_mut().insert(GrpcMethod::new( 686 + "rockbox.v1alpha1.LibraryService", 687 + "GetArtist", 688 + )); 749 689 self.inner.unary(req, path, codec).await 750 690 } 751 691 pub async fn get_track( 752 692 &mut self, 753 693 request: impl tonic::IntoRequest<super::GetTrackRequest>, 754 - ) -> std::result::Result< 755 - tonic::Response<super::GetTrackResponse>, 756 - tonic::Status, 757 - > { 758 - self.inner 759 - .ready() 760 - .await 761 - .map_err(|e| { 762 - tonic::Status::unknown( 763 - format!("Service was not ready: {}", e.into()), 764 - ) 765 - })?; 694 + ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status> { 695 + self.inner.ready().await.map_err(|e| { 696 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 697 + })?; 766 698 let codec = tonic::codec::ProstCodec::default(); 767 - let path = http::uri::PathAndQuery::from_static( 768 - "/rockbox.v1alpha1.LibraryService/GetTrack", 769 - ); 699 + let path = 700 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); 770 701 let mut req = request.into_request(); 771 - req.extensions_mut() 772 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); 702 + req.extensions_mut().insert(GrpcMethod::new( 703 + "rockbox.v1alpha1.LibraryService", 704 + "GetTrack", 705 + )); 773 706 self.inner.unary(req, path, codec).await 774 707 } 775 708 pub async fn like_track( 776 709 &mut self, 777 710 request: impl tonic::IntoRequest<super::LikeTrackRequest>, 778 - ) -> std::result::Result< 779 - tonic::Response<super::LikeTrackResponse>, 780 - tonic::Status, 781 - > { 782 - self.inner 783 - .ready() 784 - .await 785 - .map_err(|e| { 786 - tonic::Status::unknown( 787 - format!("Service was not ready: {}", e.into()), 788 - ) 789 - })?; 711 + ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status> { 712 + self.inner.ready().await.map_err(|e| { 713 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 714 + })?; 790 715 let codec = tonic::codec::ProstCodec::default(); 791 - let path = http::uri::PathAndQuery::from_static( 792 - "/rockbox.v1alpha1.LibraryService/LikeTrack", 793 - ); 716 + let path = 717 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); 794 718 let mut req = request.into_request(); 795 - req.extensions_mut() 796 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); 719 + req.extensions_mut().insert(GrpcMethod::new( 720 + "rockbox.v1alpha1.LibraryService", 721 + "LikeTrack", 722 + )); 797 723 self.inner.unary(req, path, codec).await 798 724 } 799 725 pub async fn unlike_track( 800 726 &mut self, 801 727 request: impl tonic::IntoRequest<super::UnlikeTrackRequest>, 802 - ) -> std::result::Result< 803 - tonic::Response<super::UnlikeTrackResponse>, 804 - tonic::Status, 805 - > { 806 - self.inner 807 - .ready() 808 - .await 809 - .map_err(|e| { 810 - tonic::Status::unknown( 811 - format!("Service was not ready: {}", e.into()), 812 - ) 813 - })?; 728 + ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status> 729 + { 730 + self.inner.ready().await.map_err(|e| { 731 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 732 + })?; 814 733 let codec = tonic::codec::ProstCodec::default(); 815 734 let path = http::uri::PathAndQuery::from_static( 816 735 "/rockbox.v1alpha1.LibraryService/UnlikeTrack", 817 736 ); 818 737 let mut req = request.into_request(); 819 - req.extensions_mut() 820 - .insert( 821 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), 822 - ); 738 + req.extensions_mut().insert(GrpcMethod::new( 739 + "rockbox.v1alpha1.LibraryService", 740 + "UnlikeTrack", 741 + )); 823 742 self.inner.unary(req, path, codec).await 824 743 } 825 744 pub async fn like_album( 826 745 &mut self, 827 746 request: impl tonic::IntoRequest<super::LikeAlbumRequest>, 828 - ) -> std::result::Result< 829 - tonic::Response<super::LikeAlbumResponse>, 830 - tonic::Status, 831 - > { 832 - self.inner 833 - .ready() 834 - .await 835 - .map_err(|e| { 836 - tonic::Status::unknown( 837 - format!("Service was not ready: {}", e.into()), 838 - ) 839 - })?; 747 + ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status> { 748 + self.inner.ready().await.map_err(|e| { 749 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 750 + })?; 840 751 let codec = tonic::codec::ProstCodec::default(); 841 - let path = http::uri::PathAndQuery::from_static( 842 - "/rockbox.v1alpha1.LibraryService/LikeAlbum", 843 - ); 752 + let path = 753 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); 844 754 let mut req = request.into_request(); 845 - req.extensions_mut() 846 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); 755 + req.extensions_mut().insert(GrpcMethod::new( 756 + "rockbox.v1alpha1.LibraryService", 757 + "LikeAlbum", 758 + )); 847 759 self.inner.unary(req, path, codec).await 848 760 } 849 761 pub async fn unlike_album( 850 762 &mut self, 851 763 request: impl tonic::IntoRequest<super::UnlikeAlbumRequest>, 852 - ) -> std::result::Result< 853 - tonic::Response<super::UnlikeAlbumResponse>, 854 - tonic::Status, 855 - > { 856 - self.inner 857 - .ready() 858 - .await 859 - .map_err(|e| { 860 - tonic::Status::unknown( 861 - format!("Service was not ready: {}", e.into()), 862 - ) 863 - })?; 764 + ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status> 765 + { 766 + self.inner.ready().await.map_err(|e| { 767 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 768 + })?; 864 769 let codec = tonic::codec::ProstCodec::default(); 865 770 let path = http::uri::PathAndQuery::from_static( 866 771 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", 867 772 ); 868 773 let mut req = request.into_request(); 869 - req.extensions_mut() 870 - .insert( 871 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), 872 - ); 774 + req.extensions_mut().insert(GrpcMethod::new( 775 + "rockbox.v1alpha1.LibraryService", 776 + "UnlikeAlbum", 777 + )); 873 778 self.inner.unary(req, path, codec).await 874 779 } 875 780 pub async fn get_liked_tracks( 876 781 &mut self, 877 782 request: impl tonic::IntoRequest<super::GetLikedTracksRequest>, 878 - ) -> std::result::Result< 879 - tonic::Response<super::GetLikedTracksResponse>, 880 - tonic::Status, 881 - > { 882 - self.inner 883 - .ready() 884 - .await 885 - .map_err(|e| { 886 - tonic::Status::unknown( 887 - format!("Service was not ready: {}", e.into()), 888 - ) 889 - })?; 783 + ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status> 784 + { 785 + self.inner.ready().await.map_err(|e| { 786 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 787 + })?; 890 788 let codec = tonic::codec::ProstCodec::default(); 891 789 let path = http::uri::PathAndQuery::from_static( 892 790 "/rockbox.v1alpha1.LibraryService/GetLikedTracks", 893 791 ); 894 792 let mut req = request.into_request(); 895 - req.extensions_mut() 896 - .insert( 897 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), 898 - ); 793 + req.extensions_mut().insert(GrpcMethod::new( 794 + "rockbox.v1alpha1.LibraryService", 795 + "GetLikedTracks", 796 + )); 899 797 self.inner.unary(req, path, codec).await 900 798 } 901 799 pub async fn get_liked_albums( 902 800 &mut self, 903 801 request: impl tonic::IntoRequest<super::GetLikedAlbumsRequest>, 904 - ) -> std::result::Result< 905 - tonic::Response<super::GetLikedAlbumsResponse>, 906 - tonic::Status, 907 - > { 908 - self.inner 909 - .ready() 910 - .await 911 - .map_err(|e| { 912 - tonic::Status::unknown( 913 - format!("Service was not ready: {}", e.into()), 914 - ) 915 - })?; 802 + ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status> 803 + { 804 + self.inner.ready().await.map_err(|e| { 805 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 806 + })?; 916 807 let codec = tonic::codec::ProstCodec::default(); 917 808 let path = http::uri::PathAndQuery::from_static( 918 809 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", 919 810 ); 920 811 let mut req = request.into_request(); 921 - req.extensions_mut() 922 - .insert( 923 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), 924 - ); 812 + req.extensions_mut().insert(GrpcMethod::new( 813 + "rockbox.v1alpha1.LibraryService", 814 + "GetLikedAlbums", 815 + )); 925 816 self.inner.unary(req, path, codec).await 926 817 } 927 818 pub async fn scan_library( 928 819 &mut self, 929 820 request: impl tonic::IntoRequest<super::ScanLibraryRequest>, 930 - ) -> std::result::Result< 931 - tonic::Response<super::ScanLibraryResponse>, 932 - tonic::Status, 933 - > { 934 - self.inner 935 - .ready() 936 - .await 937 - .map_err(|e| { 938 - tonic::Status::unknown( 939 - format!("Service was not ready: {}", e.into()), 940 - ) 941 - })?; 821 + ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status> 822 + { 823 + self.inner.ready().await.map_err(|e| { 824 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 825 + })?; 942 826 let codec = tonic::codec::ProstCodec::default(); 943 827 let path = http::uri::PathAndQuery::from_static( 944 828 "/rockbox.v1alpha1.LibraryService/ScanLibrary", 945 829 ); 946 830 let mut req = request.into_request(); 947 - req.extensions_mut() 948 - .insert( 949 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), 950 - ); 831 + req.extensions_mut().insert(GrpcMethod::new( 832 + "rockbox.v1alpha1.LibraryService", 833 + "ScanLibrary", 834 + )); 951 835 self.inner.unary(req, path, codec).await 952 836 } 953 837 pub async fn search( 954 838 &mut self, 955 839 request: impl tonic::IntoRequest<super::SearchRequest>, 956 840 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> { 957 - self.inner 958 - .ready() 959 - .await 960 - .map_err(|e| { 961 - tonic::Status::unknown( 962 - format!("Service was not ready: {}", e.into()), 963 - ) 964 - })?; 841 + self.inner.ready().await.map_err(|e| { 842 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 843 + })?; 965 844 let codec = tonic::codec::ProstCodec::default(); 966 - let path = http::uri::PathAndQuery::from_static( 967 - "/rockbox.v1alpha1.LibraryService/Search", 968 - ); 845 + let path = 846 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); 969 847 let mut req = request.into_request(); 970 848 req.extensions_mut() 971 849 .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); ··· 980 858 dead_code, 981 859 missing_docs, 982 860 clippy::wildcard_imports, 983 - clippy::let_unit_value, 861 + clippy::let_unit_value 984 862 )] 985 863 use tonic::codegen::*; 986 864 /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. ··· 989 867 async fn get_albums( 990 868 &self, 991 869 request: tonic::Request<super::GetAlbumsRequest>, 992 - ) -> std::result::Result< 993 - tonic::Response<super::GetAlbumsResponse>, 994 - tonic::Status, 995 - >; 870 + ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status>; 996 871 async fn get_artists( 997 872 &self, 998 873 request: tonic::Request<super::GetArtistsRequest>, 999 - ) -> std::result::Result< 1000 - tonic::Response<super::GetArtistsResponse>, 1001 - tonic::Status, 1002 - >; 874 + ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status>; 1003 875 async fn get_tracks( 1004 876 &self, 1005 877 request: tonic::Request<super::GetTracksRequest>, 1006 - ) -> std::result::Result< 1007 - tonic::Response<super::GetTracksResponse>, 1008 - tonic::Status, 1009 - >; 878 + ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status>; 1010 879 async fn get_album( 1011 880 &self, 1012 881 request: tonic::Request<super::GetAlbumRequest>, 1013 - ) -> std::result::Result< 1014 - tonic::Response<super::GetAlbumResponse>, 1015 - tonic::Status, 1016 - >; 882 + ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status>; 1017 883 async fn get_artist( 1018 884 &self, 1019 885 request: tonic::Request<super::GetArtistRequest>, 1020 - ) -> std::result::Result< 1021 - tonic::Response<super::GetArtistResponse>, 1022 - tonic::Status, 1023 - >; 886 + ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status>; 1024 887 async fn get_track( 1025 888 &self, 1026 889 request: tonic::Request<super::GetTrackRequest>, 1027 - ) -> std::result::Result< 1028 - tonic::Response<super::GetTrackResponse>, 1029 - tonic::Status, 1030 - >; 890 + ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status>; 1031 891 async fn like_track( 1032 892 &self, 1033 893 request: tonic::Request<super::LikeTrackRequest>, 1034 - ) -> std::result::Result< 1035 - tonic::Response<super::LikeTrackResponse>, 1036 - tonic::Status, 1037 - >; 894 + ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status>; 1038 895 async fn unlike_track( 1039 896 &self, 1040 897 request: tonic::Request<super::UnlikeTrackRequest>, 1041 - ) -> std::result::Result< 1042 - tonic::Response<super::UnlikeTrackResponse>, 1043 - tonic::Status, 1044 - >; 898 + ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status>; 1045 899 async fn like_album( 1046 900 &self, 1047 901 request: tonic::Request<super::LikeAlbumRequest>, 1048 - ) -> std::result::Result< 1049 - tonic::Response<super::LikeAlbumResponse>, 1050 - tonic::Status, 1051 - >; 902 + ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status>; 1052 903 async fn unlike_album( 1053 904 &self, 1054 905 request: tonic::Request<super::UnlikeAlbumRequest>, 1055 - ) -> std::result::Result< 1056 - tonic::Response<super::UnlikeAlbumResponse>, 1057 - tonic::Status, 1058 - >; 906 + ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status>; 1059 907 async fn get_liked_tracks( 1060 908 &self, 1061 909 request: tonic::Request<super::GetLikedTracksRequest>, 1062 - ) -> std::result::Result< 1063 - tonic::Response<super::GetLikedTracksResponse>, 1064 - tonic::Status, 1065 - >; 910 + ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status>; 1066 911 async fn get_liked_albums( 1067 912 &self, 1068 913 request: tonic::Request<super::GetLikedAlbumsRequest>, 1069 - ) -> std::result::Result< 1070 - tonic::Response<super::GetLikedAlbumsResponse>, 1071 - tonic::Status, 1072 - >; 914 + ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status>; 1073 915 async fn scan_library( 1074 916 &self, 1075 917 request: tonic::Request<super::ScanLibraryRequest>, 1076 - ) -> std::result::Result< 1077 - tonic::Response<super::ScanLibraryResponse>, 1078 - tonic::Status, 1079 - >; 918 + ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status>; 1080 919 async fn search( 1081 920 &self, 1082 921 request: tonic::Request<super::SearchRequest>, ··· 1103 942 max_encoding_message_size: None, 1104 943 } 1105 944 } 1106 - pub fn with_interceptor<F>( 1107 - inner: T, 1108 - interceptor: F, 1109 - ) -> InterceptedService<Self, F> 945 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 1110 946 where 1111 947 F: tonic::service::Interceptor, 1112 948 { ··· 1161 997 "/rockbox.v1alpha1.LibraryService/GetAlbums" => { 1162 998 #[allow(non_camel_case_types)] 1163 999 struct GetAlbumsSvc<T: LibraryService>(pub Arc<T>); 1164 - impl< 1165 - T: LibraryService, 1166 - > tonic::server::UnaryService<super::GetAlbumsRequest> 1167 - for GetAlbumsSvc<T> { 1000 + impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumsRequest> for GetAlbumsSvc<T> { 1168 1001 type Response = super::GetAlbumsResponse; 1169 - type Future = BoxFuture< 1170 - tonic::Response<Self::Response>, 1171 - tonic::Status, 1172 - >; 1002 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1173 1003 fn call( 1174 1004 &mut self, 1175 1005 request: tonic::Request<super::GetAlbumsRequest>, ··· 1206 1036 "/rockbox.v1alpha1.LibraryService/GetArtists" => { 1207 1037 #[allow(non_camel_case_types)] 1208 1038 struct GetArtistsSvc<T: LibraryService>(pub Arc<T>); 1209 - impl< 1210 - T: LibraryService, 1211 - > tonic::server::UnaryService<super::GetArtistsRequest> 1212 - for GetArtistsSvc<T> { 1039 + impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistsRequest> for GetArtistsSvc<T> { 1213 1040 type Response = super::GetArtistsResponse; 1214 - type Future = BoxFuture< 1215 - tonic::Response<Self::Response>, 1216 - tonic::Status, 1217 - >; 1041 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1218 1042 fn call( 1219 1043 &mut self, 1220 1044 request: tonic::Request<super::GetArtistsRequest>, ··· 1251 1075 "/rockbox.v1alpha1.LibraryService/GetTracks" => { 1252 1076 #[allow(non_camel_case_types)] 1253 1077 struct GetTracksSvc<T: LibraryService>(pub Arc<T>); 1254 - impl< 1255 - T: LibraryService, 1256 - > tonic::server::UnaryService<super::GetTracksRequest> 1257 - for GetTracksSvc<T> { 1078 + impl<T: LibraryService> tonic::server::UnaryService<super::GetTracksRequest> for GetTracksSvc<T> { 1258 1079 type Response = super::GetTracksResponse; 1259 - type Future = BoxFuture< 1260 - tonic::Response<Self::Response>, 1261 - tonic::Status, 1262 - >; 1080 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1263 1081 fn call( 1264 1082 &mut self, 1265 1083 request: tonic::Request<super::GetTracksRequest>, ··· 1296 1114 "/rockbox.v1alpha1.LibraryService/GetAlbum" => { 1297 1115 #[allow(non_camel_case_types)] 1298 1116 struct GetAlbumSvc<T: LibraryService>(pub Arc<T>); 1299 - impl< 1300 - T: LibraryService, 1301 - > tonic::server::UnaryService<super::GetAlbumRequest> 1302 - for GetAlbumSvc<T> { 1117 + impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumRequest> for GetAlbumSvc<T> { 1303 1118 type Response = super::GetAlbumResponse; 1304 - type Future = BoxFuture< 1305 - tonic::Response<Self::Response>, 1306 - tonic::Status, 1307 - >; 1119 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1308 1120 fn call( 1309 1121 &mut self, 1310 1122 request: tonic::Request<super::GetAlbumRequest>, ··· 1341 1153 "/rockbox.v1alpha1.LibraryService/GetArtist" => { 1342 1154 #[allow(non_camel_case_types)] 1343 1155 struct GetArtistSvc<T: LibraryService>(pub Arc<T>); 1344 - impl< 1345 - T: LibraryService, 1346 - > tonic::server::UnaryService<super::GetArtistRequest> 1347 - for GetArtistSvc<T> { 1156 + impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistRequest> for GetArtistSvc<T> { 1348 1157 type Response = super::GetArtistResponse; 1349 - type Future = BoxFuture< 1350 - tonic::Response<Self::Response>, 1351 - tonic::Status, 1352 - >; 1158 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1353 1159 fn call( 1354 1160 &mut self, 1355 1161 request: tonic::Request<super::GetArtistRequest>, ··· 1386 1192 "/rockbox.v1alpha1.LibraryService/GetTrack" => { 1387 1193 #[allow(non_camel_case_types)] 1388 1194 struct GetTrackSvc<T: LibraryService>(pub Arc<T>); 1389 - impl< 1390 - T: LibraryService, 1391 - > tonic::server::UnaryService<super::GetTrackRequest> 1392 - for GetTrackSvc<T> { 1195 + impl<T: LibraryService> tonic::server::UnaryService<super::GetTrackRequest> for GetTrackSvc<T> { 1393 1196 type Response = super::GetTrackResponse; 1394 - type Future = BoxFuture< 1395 - tonic::Response<Self::Response>, 1396 - tonic::Status, 1397 - >; 1197 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1398 1198 fn call( 1399 1199 &mut self, 1400 1200 request: tonic::Request<super::GetTrackRequest>, ··· 1431 1231 "/rockbox.v1alpha1.LibraryService/LikeTrack" => { 1432 1232 #[allow(non_camel_case_types)] 1433 1233 struct LikeTrackSvc<T: LibraryService>(pub Arc<T>); 1434 - impl< 1435 - T: LibraryService, 1436 - > tonic::server::UnaryService<super::LikeTrackRequest> 1437 - for LikeTrackSvc<T> { 1234 + impl<T: LibraryService> tonic::server::UnaryService<super::LikeTrackRequest> for LikeTrackSvc<T> { 1438 1235 type Response = super::LikeTrackResponse; 1439 - type Future = BoxFuture< 1440 - tonic::Response<Self::Response>, 1441 - tonic::Status, 1442 - >; 1236 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1443 1237 fn call( 1444 1238 &mut self, 1445 1239 request: tonic::Request<super::LikeTrackRequest>, ··· 1476 1270 "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { 1477 1271 #[allow(non_camel_case_types)] 1478 1272 struct UnlikeTrackSvc<T: LibraryService>(pub Arc<T>); 1479 - impl< 1480 - T: LibraryService, 1481 - > tonic::server::UnaryService<super::UnlikeTrackRequest> 1482 - for UnlikeTrackSvc<T> { 1273 + impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeTrackRequest> 1274 + for UnlikeTrackSvc<T> 1275 + { 1483 1276 type Response = super::UnlikeTrackResponse; 1484 - type Future = BoxFuture< 1485 - tonic::Response<Self::Response>, 1486 - tonic::Status, 1487 - >; 1277 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1488 1278 fn call( 1489 1279 &mut self, 1490 1280 request: tonic::Request<super::UnlikeTrackRequest>, ··· 1521 1311 "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { 1522 1312 #[allow(non_camel_case_types)] 1523 1313 struct LikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1524 - impl< 1525 - T: LibraryService, 1526 - > tonic::server::UnaryService<super::LikeAlbumRequest> 1527 - for LikeAlbumSvc<T> { 1314 + impl<T: LibraryService> tonic::server::UnaryService<super::LikeAlbumRequest> for LikeAlbumSvc<T> { 1528 1315 type Response = super::LikeAlbumResponse; 1529 - type Future = BoxFuture< 1530 - tonic::Response<Self::Response>, 1531 - tonic::Status, 1532 - >; 1316 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1533 1317 fn call( 1534 1318 &mut self, 1535 1319 request: tonic::Request<super::LikeAlbumRequest>, ··· 1566 1350 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { 1567 1351 #[allow(non_camel_case_types)] 1568 1352 struct UnlikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1569 - impl< 1570 - T: LibraryService, 1571 - > tonic::server::UnaryService<super::UnlikeAlbumRequest> 1572 - for UnlikeAlbumSvc<T> { 1353 + impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeAlbumRequest> 1354 + for UnlikeAlbumSvc<T> 1355 + { 1573 1356 type Response = super::UnlikeAlbumResponse; 1574 - type Future = BoxFuture< 1575 - tonic::Response<Self::Response>, 1576 - tonic::Status, 1577 - >; 1357 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1578 1358 fn call( 1579 1359 &mut self, 1580 1360 request: tonic::Request<super::UnlikeAlbumRequest>, ··· 1611 1391 "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { 1612 1392 #[allow(non_camel_case_types)] 1613 1393 struct GetLikedTracksSvc<T: LibraryService>(pub Arc<T>); 1614 - impl< 1615 - T: LibraryService, 1616 - > tonic::server::UnaryService<super::GetLikedTracksRequest> 1617 - for GetLikedTracksSvc<T> { 1394 + impl<T: LibraryService> 1395 + tonic::server::UnaryService<super::GetLikedTracksRequest> 1396 + for GetLikedTracksSvc<T> 1397 + { 1618 1398 type Response = super::GetLikedTracksResponse; 1619 - type Future = BoxFuture< 1620 - tonic::Response<Self::Response>, 1621 - tonic::Status, 1622 - >; 1399 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1623 1400 fn call( 1624 1401 &mut self, 1625 1402 request: tonic::Request<super::GetLikedTracksRequest>, 1626 1403 ) -> Self::Future { 1627 1404 let inner = Arc::clone(&self.0); 1628 1405 let fut = async move { 1629 - <T as LibraryService>::get_liked_tracks(&inner, request) 1630 - .await 1406 + <T as LibraryService>::get_liked_tracks(&inner, request).await 1631 1407 }; 1632 1408 Box::pin(fut) 1633 1409 } ··· 1657 1433 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { 1658 1434 #[allow(non_camel_case_types)] 1659 1435 struct GetLikedAlbumsSvc<T: LibraryService>(pub Arc<T>); 1660 - impl< 1661 - T: LibraryService, 1662 - > tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1663 - for GetLikedAlbumsSvc<T> { 1436 + impl<T: LibraryService> 1437 + tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1438 + for GetLikedAlbumsSvc<T> 1439 + { 1664 1440 type Response = super::GetLikedAlbumsResponse; 1665 - type Future = BoxFuture< 1666 - tonic::Response<Self::Response>, 1667 - tonic::Status, 1668 - >; 1441 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1669 1442 fn call( 1670 1443 &mut self, 1671 1444 request: tonic::Request<super::GetLikedAlbumsRequest>, 1672 1445 ) -> Self::Future { 1673 1446 let inner = Arc::clone(&self.0); 1674 1447 let fut = async move { 1675 - <T as LibraryService>::get_liked_albums(&inner, request) 1676 - .await 1448 + <T as LibraryService>::get_liked_albums(&inner, request).await 1677 1449 }; 1678 1450 Box::pin(fut) 1679 1451 } ··· 1703 1475 "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { 1704 1476 #[allow(non_camel_case_types)] 1705 1477 struct ScanLibrarySvc<T: LibraryService>(pub Arc<T>); 1706 - impl< 1707 - T: LibraryService, 1708 - > tonic::server::UnaryService<super::ScanLibraryRequest> 1709 - for ScanLibrarySvc<T> { 1478 + impl<T: LibraryService> tonic::server::UnaryService<super::ScanLibraryRequest> 1479 + for ScanLibrarySvc<T> 1480 + { 1710 1481 type Response = super::ScanLibraryResponse; 1711 - type Future = BoxFuture< 1712 - tonic::Response<Self::Response>, 1713 - tonic::Status, 1714 - >; 1482 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1715 1483 fn call( 1716 1484 &mut self, 1717 1485 request: tonic::Request<super::ScanLibraryRequest>, ··· 1748 1516 "/rockbox.v1alpha1.LibraryService/Search" => { 1749 1517 #[allow(non_camel_case_types)] 1750 1518 struct SearchSvc<T: LibraryService>(pub Arc<T>); 1751 - impl< 1752 - T: LibraryService, 1753 - > tonic::server::UnaryService<super::SearchRequest> 1754 - for SearchSvc<T> { 1519 + impl<T: LibraryService> tonic::server::UnaryService<super::SearchRequest> for SearchSvc<T> { 1755 1520 type Response = super::SearchResponse; 1756 - type Future = BoxFuture< 1757 - tonic::Response<Self::Response>, 1758 - tonic::Status, 1759 - >; 1521 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1760 1522 fn call( 1761 1523 &mut self, 1762 1524 request: tonic::Request<super::SearchRequest>, 1763 1525 ) -> Self::Future { 1764 1526 let inner = Arc::clone(&self.0); 1765 - let fut = async move { 1766 - <T as LibraryService>::search(&inner, request).await 1767 - }; 1527 + let fut = 1528 + async move { <T as LibraryService>::search(&inner, request).await }; 1768 1529 Box::pin(fut) 1769 1530 } 1770 1531 } ··· 1790 1551 }; 1791 1552 Box::pin(fut) 1792 1553 } 1793 - _ => { 1794 - Box::pin(async move { 1795 - let mut response = http::Response::new(empty_body()); 1796 - let headers = response.headers_mut(); 1797 - headers 1798 - .insert( 1799 - tonic::Status::GRPC_STATUS, 1800 - (tonic::Code::Unimplemented as i32).into(), 1801 - ); 1802 - headers 1803 - .insert( 1804 - http::header::CONTENT_TYPE, 1805 - tonic::metadata::GRPC_CONTENT_TYPE, 1806 - ); 1807 - Ok(response) 1808 - }) 1809 - } 1554 + _ => Box::pin(async move { 1555 + let mut response = http::Response::new(empty_body()); 1556 + let headers = response.headers_mut(); 1557 + headers.insert( 1558 + tonic::Status::GRPC_STATUS, 1559 + (tonic::Code::Unimplemented as i32).into(), 1560 + ); 1561 + headers.insert( 1562 + http::header::CONTENT_TYPE, 1563 + tonic::metadata::GRPC_CONTENT_TYPE, 1564 + ); 1565 + Ok(response) 1566 + }), 1810 1567 } 1811 1568 } 1812 1569 } ··· 1835 1592 dead_code, 1836 1593 missing_docs, 1837 1594 clippy::wildcard_imports, 1838 - clippy::let_unit_value, 1595 + clippy::let_unit_value 1839 1596 )] 1840 - use tonic::codegen::*; 1841 1597 use tonic::codegen::http::Uri; 1598 + use tonic::codegen::*; 1842 1599 #[derive(Debug, Clone)] 1843 1600 pub struct MetadataServiceClient<T> { 1844 1601 inner: tonic::client::Grpc<T>, ··· 1882 1639 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 1883 1640 >, 1884 1641 >, 1885 - <T as tonic::codegen::Service< 1886 - http::Request<tonic::body::BoxBody>, 1887 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 1642 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 1643 + Into<StdError> + std::marker::Send + std::marker::Sync, 1888 1644 { 1889 1645 MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) 1890 1646 } ··· 1928 1684 dead_code, 1929 1685 missing_docs, 1930 1686 clippy::wildcard_imports, 1931 - clippy::let_unit_value, 1687 + clippy::let_unit_value 1932 1688 )] 1933 1689 use tonic::codegen::*; 1934 1690 /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. ··· 1955 1711 max_encoding_message_size: None, 1956 1712 } 1957 1713 } 1958 - pub fn with_interceptor<F>( 1959 - inner: T, 1960 - interceptor: F, 1961 - ) -> InterceptedService<Self, F> 1714 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 1962 1715 where 1963 1716 F: tonic::service::Interceptor, 1964 1717 { ··· 2010 1763 } 2011 1764 fn call(&mut self, req: http::Request<B>) -> Self::Future { 2012 1765 match req.uri().path() { 2013 - _ => { 2014 - Box::pin(async move { 2015 - let mut response = http::Response::new(empty_body()); 2016 - let headers = response.headers_mut(); 2017 - headers 2018 - .insert( 2019 - tonic::Status::GRPC_STATUS, 2020 - (tonic::Code::Unimplemented as i32).into(), 2021 - ); 2022 - headers 2023 - .insert( 2024 - http::header::CONTENT_TYPE, 2025 - tonic::metadata::GRPC_CONTENT_TYPE, 2026 - ); 2027 - Ok(response) 2028 - }) 2029 - } 1766 + _ => Box::pin(async move { 1767 + let mut response = http::Response::new(empty_body()); 1768 + let headers = response.headers_mut(); 1769 + headers.insert( 1770 + tonic::Status::GRPC_STATUS, 1771 + (tonic::Code::Unimplemented as i32).into(), 1772 + ); 1773 + headers.insert( 1774 + http::header::CONTENT_TYPE, 1775 + tonic::metadata::GRPC_CONTENT_TYPE, 1776 + ); 1777 + Ok(response) 1778 + }), 2030 1779 } 2031 1780 } 2032 1781 } ··· 2299 2048 dead_code, 2300 2049 missing_docs, 2301 2050 clippy::wildcard_imports, 2302 - clippy::let_unit_value, 2051 + clippy::let_unit_value 2303 2052 )] 2304 - use tonic::codegen::*; 2305 2053 use tonic::codegen::http::Uri; 2054 + use tonic::codegen::*; 2306 2055 #[derive(Debug, Clone)] 2307 2056 pub struct PlaybackServiceClient<T> { 2308 2057 inner: tonic::client::Grpc<T>, ··· 2346 2095 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 2347 2096 >, 2348 2097 >, 2349 - <T as tonic::codegen::Service< 2350 - http::Request<tonic::body::BoxBody>, 2351 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 2098 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 2099 + Into<StdError> + std::marker::Send + std::marker::Sync, 2352 2100 { 2353 2101 PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) 2354 2102 } ··· 2387 2135 &mut self, 2388 2136 request: impl tonic::IntoRequest<super::PlayRequest>, 2389 2137 ) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> { 2390 - self.inner 2391 - .ready() 2392 - .await 2393 - .map_err(|e| { 2394 - tonic::Status::unknown( 2395 - format!("Service was not ready: {}", e.into()), 2396 - ) 2397 - })?; 2138 + self.inner.ready().await.map_err(|e| { 2139 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2140 + })?; 2398 2141 let codec = tonic::codec::ProstCodec::default(); 2399 - let path = http::uri::PathAndQuery::from_static( 2400 - "/rockbox.v1alpha1.PlaybackService/Play", 2401 - ); 2142 + let path = 2143 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); 2402 2144 let mut req = request.into_request(); 2403 2145 req.extensions_mut() 2404 2146 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); ··· 2408 2150 &mut self, 2409 2151 request: impl tonic::IntoRequest<super::PauseRequest>, 2410 2152 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> { 2411 - self.inner 2412 - .ready() 2413 - .await 2414 - .map_err(|e| { 2415 - tonic::Status::unknown( 2416 - format!("Service was not ready: {}", e.into()), 2417 - ) 2418 - })?; 2153 + self.inner.ready().await.map_err(|e| { 2154 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2155 + })?; 2419 2156 let codec = tonic::codec::ProstCodec::default(); 2420 - let path = http::uri::PathAndQuery::from_static( 2421 - "/rockbox.v1alpha1.PlaybackService/Pause", 2422 - ); 2157 + let path = 2158 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); 2423 2159 let mut req = request.into_request(); 2424 2160 req.extensions_mut() 2425 2161 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); ··· 2428 2164 pub async fn play_or_pause( 2429 2165 &mut self, 2430 2166 request: impl tonic::IntoRequest<super::PlayOrPauseRequest>, 2431 - ) -> std::result::Result< 2432 - tonic::Response<super::PlayOrPauseResponse>, 2433 - tonic::Status, 2434 - > { 2435 - self.inner 2436 - .ready() 2437 - .await 2438 - .map_err(|e| { 2439 - tonic::Status::unknown( 2440 - format!("Service was not ready: {}", e.into()), 2441 - ) 2442 - })?; 2167 + ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status> 2168 + { 2169 + self.inner.ready().await.map_err(|e| { 2170 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2171 + })?; 2443 2172 let codec = tonic::codec::ProstCodec::default(); 2444 2173 let path = http::uri::PathAndQuery::from_static( 2445 2174 "/rockbox.v1alpha1.PlaybackService/PlayOrPause", 2446 2175 ); 2447 2176 let mut req = request.into_request(); 2448 - req.extensions_mut() 2449 - .insert( 2450 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), 2451 - ); 2177 + req.extensions_mut().insert(GrpcMethod::new( 2178 + "rockbox.v1alpha1.PlaybackService", 2179 + "PlayOrPause", 2180 + )); 2452 2181 self.inner.unary(req, path, codec).await 2453 2182 } 2454 2183 pub async fn resume( 2455 2184 &mut self, 2456 2185 request: impl tonic::IntoRequest<super::ResumeRequest>, 2457 2186 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> { 2458 - self.inner 2459 - .ready() 2460 - .await 2461 - .map_err(|e| { 2462 - tonic::Status::unknown( 2463 - format!("Service was not ready: {}", e.into()), 2464 - ) 2465 - })?; 2187 + self.inner.ready().await.map_err(|e| { 2188 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2189 + })?; 2466 2190 let codec = tonic::codec::ProstCodec::default(); 2467 - let path = http::uri::PathAndQuery::from_static( 2468 - "/rockbox.v1alpha1.PlaybackService/Resume", 2469 - ); 2191 + let path = 2192 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); 2470 2193 let mut req = request.into_request(); 2471 - req.extensions_mut() 2472 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); 2194 + req.extensions_mut().insert(GrpcMethod::new( 2195 + "rockbox.v1alpha1.PlaybackService", 2196 + "Resume", 2197 + )); 2473 2198 self.inner.unary(req, path, codec).await 2474 2199 } 2475 2200 pub async fn next( 2476 2201 &mut self, 2477 2202 request: impl tonic::IntoRequest<super::NextRequest>, 2478 2203 ) -> std::result::Result<tonic::Response<super::NextResponse>, tonic::Status> { 2479 - self.inner 2480 - .ready() 2481 - .await 2482 - .map_err(|e| { 2483 - tonic::Status::unknown( 2484 - format!("Service was not ready: {}", e.into()), 2485 - ) 2486 - })?; 2204 + self.inner.ready().await.map_err(|e| { 2205 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2206 + })?; 2487 2207 let codec = tonic::codec::ProstCodec::default(); 2488 - let path = http::uri::PathAndQuery::from_static( 2489 - "/rockbox.v1alpha1.PlaybackService/Next", 2490 - ); 2208 + let path = 2209 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); 2491 2210 let mut req = request.into_request(); 2492 2211 req.extensions_mut() 2493 2212 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); ··· 2496 2215 pub async fn previous( 2497 2216 &mut self, 2498 2217 request: impl tonic::IntoRequest<super::PreviousRequest>, 2499 - ) -> std::result::Result< 2500 - tonic::Response<super::PreviousResponse>, 2501 - tonic::Status, 2502 - > { 2503 - self.inner 2504 - .ready() 2505 - .await 2506 - .map_err(|e| { 2507 - tonic::Status::unknown( 2508 - format!("Service was not ready: {}", e.into()), 2509 - ) 2510 - })?; 2218 + ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status> { 2219 + self.inner.ready().await.map_err(|e| { 2220 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2221 + })?; 2511 2222 let codec = tonic::codec::ProstCodec::default(); 2512 - let path = http::uri::PathAndQuery::from_static( 2513 - "/rockbox.v1alpha1.PlaybackService/Previous", 2514 - ); 2223 + let path = 2224 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); 2515 2225 let mut req = request.into_request(); 2516 - req.extensions_mut() 2517 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); 2226 + req.extensions_mut().insert(GrpcMethod::new( 2227 + "rockbox.v1alpha1.PlaybackService", 2228 + "Previous", 2229 + )); 2518 2230 self.inner.unary(req, path, codec).await 2519 2231 } 2520 2232 pub async fn fast_forward_rewind( 2521 2233 &mut self, 2522 2234 request: impl tonic::IntoRequest<super::FastForwardRewindRequest>, 2523 - ) -> std::result::Result< 2524 - tonic::Response<super::FastForwardRewindResponse>, 2525 - tonic::Status, 2526 - > { 2527 - self.inner 2528 - .ready() 2529 - .await 2530 - .map_err(|e| { 2531 - tonic::Status::unknown( 2532 - format!("Service was not ready: {}", e.into()), 2533 - ) 2534 - })?; 2235 + ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status> 2236 + { 2237 + self.inner.ready().await.map_err(|e| { 2238 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2239 + })?; 2535 2240 let codec = tonic::codec::ProstCodec::default(); 2536 2241 let path = http::uri::PathAndQuery::from_static( 2537 2242 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", 2538 2243 ); 2539 2244 let mut req = request.into_request(); 2540 - req.extensions_mut() 2541 - .insert( 2542 - GrpcMethod::new( 2543 - "rockbox.v1alpha1.PlaybackService", 2544 - "FastForwardRewind", 2545 - ), 2546 - ); 2245 + req.extensions_mut().insert(GrpcMethod::new( 2246 + "rockbox.v1alpha1.PlaybackService", 2247 + "FastForwardRewind", 2248 + )); 2547 2249 self.inner.unary(req, path, codec).await 2548 2250 } 2549 2251 pub async fn status( 2550 2252 &mut self, 2551 2253 request: impl tonic::IntoRequest<super::StatusRequest>, 2552 2254 ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status> { 2553 - self.inner 2554 - .ready() 2555 - .await 2556 - .map_err(|e| { 2557 - tonic::Status::unknown( 2558 - format!("Service was not ready: {}", e.into()), 2559 - ) 2560 - })?; 2255 + self.inner.ready().await.map_err(|e| { 2256 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2257 + })?; 2561 2258 let codec = tonic::codec::ProstCodec::default(); 2562 - let path = http::uri::PathAndQuery::from_static( 2563 - "/rockbox.v1alpha1.PlaybackService/Status", 2564 - ); 2259 + let path = 2260 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); 2565 2261 let mut req = request.into_request(); 2566 - req.extensions_mut() 2567 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); 2262 + req.extensions_mut().insert(GrpcMethod::new( 2263 + "rockbox.v1alpha1.PlaybackService", 2264 + "Status", 2265 + )); 2568 2266 self.inner.unary(req, path, codec).await 2569 2267 } 2570 2268 pub async fn current_track( 2571 2269 &mut self, 2572 2270 request: impl tonic::IntoRequest<super::CurrentTrackRequest>, 2573 - ) -> std::result::Result< 2574 - tonic::Response<super::CurrentTrackResponse>, 2575 - tonic::Status, 2576 - > { 2577 - self.inner 2578 - .ready() 2579 - .await 2580 - .map_err(|e| { 2581 - tonic::Status::unknown( 2582 - format!("Service was not ready: {}", e.into()), 2583 - ) 2584 - })?; 2271 + ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status> 2272 + { 2273 + self.inner.ready().await.map_err(|e| { 2274 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2275 + })?; 2585 2276 let codec = tonic::codec::ProstCodec::default(); 2586 2277 let path = http::uri::PathAndQuery::from_static( 2587 2278 "/rockbox.v1alpha1.PlaybackService/CurrentTrack", 2588 2279 ); 2589 2280 let mut req = request.into_request(); 2590 - req.extensions_mut() 2591 - .insert( 2592 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), 2593 - ); 2281 + req.extensions_mut().insert(GrpcMethod::new( 2282 + "rockbox.v1alpha1.PlaybackService", 2283 + "CurrentTrack", 2284 + )); 2594 2285 self.inner.unary(req, path, codec).await 2595 2286 } 2596 2287 pub async fn next_track( 2597 2288 &mut self, 2598 2289 request: impl tonic::IntoRequest<super::NextTrackRequest>, 2599 - ) -> std::result::Result< 2600 - tonic::Response<super::NextTrackResponse>, 2601 - tonic::Status, 2602 - > { 2603 - self.inner 2604 - .ready() 2605 - .await 2606 - .map_err(|e| { 2607 - tonic::Status::unknown( 2608 - format!("Service was not ready: {}", e.into()), 2609 - ) 2610 - })?; 2290 + ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status> { 2291 + self.inner.ready().await.map_err(|e| { 2292 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2293 + })?; 2611 2294 let codec = tonic::codec::ProstCodec::default(); 2612 - let path = http::uri::PathAndQuery::from_static( 2613 - "/rockbox.v1alpha1.PlaybackService/NextTrack", 2614 - ); 2295 + let path = 2296 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); 2615 2297 let mut req = request.into_request(); 2616 - req.extensions_mut() 2617 - .insert( 2618 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), 2619 - ); 2298 + req.extensions_mut().insert(GrpcMethod::new( 2299 + "rockbox.v1alpha1.PlaybackService", 2300 + "NextTrack", 2301 + )); 2620 2302 self.inner.unary(req, path, codec).await 2621 2303 } 2622 2304 pub async fn flush_and_reload_tracks( 2623 2305 &mut self, 2624 2306 request: impl tonic::IntoRequest<super::FlushAndReloadTracksRequest>, 2625 - ) -> std::result::Result< 2626 - tonic::Response<super::FlushAndReloadTracksResponse>, 2627 - tonic::Status, 2628 - > { 2629 - self.inner 2630 - .ready() 2631 - .await 2632 - .map_err(|e| { 2633 - tonic::Status::unknown( 2634 - format!("Service was not ready: {}", e.into()), 2635 - ) 2636 - })?; 2307 + ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status> 2308 + { 2309 + self.inner.ready().await.map_err(|e| { 2310 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2311 + })?; 2637 2312 let codec = tonic::codec::ProstCodec::default(); 2638 2313 let path = http::uri::PathAndQuery::from_static( 2639 2314 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", 2640 2315 ); 2641 2316 let mut req = request.into_request(); 2642 - req.extensions_mut() 2643 - .insert( 2644 - GrpcMethod::new( 2645 - "rockbox.v1alpha1.PlaybackService", 2646 - "FlushAndReloadTracks", 2647 - ), 2648 - ); 2317 + req.extensions_mut().insert(GrpcMethod::new( 2318 + "rockbox.v1alpha1.PlaybackService", 2319 + "FlushAndReloadTracks", 2320 + )); 2649 2321 self.inner.unary(req, path, codec).await 2650 2322 } 2651 2323 pub async fn get_file_position( 2652 2324 &mut self, 2653 2325 request: impl tonic::IntoRequest<super::GetFilePositionRequest>, 2654 - ) -> std::result::Result< 2655 - tonic::Response<super::GetFilePositionResponse>, 2656 - tonic::Status, 2657 - > { 2658 - self.inner 2659 - .ready() 2660 - .await 2661 - .map_err(|e| { 2662 - tonic::Status::unknown( 2663 - format!("Service was not ready: {}", e.into()), 2664 - ) 2665 - })?; 2326 + ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status> 2327 + { 2328 + self.inner.ready().await.map_err(|e| { 2329 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2330 + })?; 2666 2331 let codec = tonic::codec::ProstCodec::default(); 2667 2332 let path = http::uri::PathAndQuery::from_static( 2668 2333 "/rockbox.v1alpha1.PlaybackService/GetFilePosition", 2669 2334 ); 2670 2335 let mut req = request.into_request(); 2671 - req.extensions_mut() 2672 - .insert( 2673 - GrpcMethod::new( 2674 - "rockbox.v1alpha1.PlaybackService", 2675 - "GetFilePosition", 2676 - ), 2677 - ); 2336 + req.extensions_mut().insert(GrpcMethod::new( 2337 + "rockbox.v1alpha1.PlaybackService", 2338 + "GetFilePosition", 2339 + )); 2678 2340 self.inner.unary(req, path, codec).await 2679 2341 } 2680 2342 pub async fn hard_stop( 2681 2343 &mut self, 2682 2344 request: impl tonic::IntoRequest<super::HardStopRequest>, 2683 - ) -> std::result::Result< 2684 - tonic::Response<super::HardStopResponse>, 2685 - tonic::Status, 2686 - > { 2687 - self.inner 2688 - .ready() 2689 - .await 2690 - .map_err(|e| { 2691 - tonic::Status::unknown( 2692 - format!("Service was not ready: {}", e.into()), 2693 - ) 2694 - })?; 2345 + ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status> { 2346 + self.inner.ready().await.map_err(|e| { 2347 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2348 + })?; 2695 2349 let codec = tonic::codec::ProstCodec::default(); 2696 - let path = http::uri::PathAndQuery::from_static( 2697 - "/rockbox.v1alpha1.PlaybackService/HardStop", 2698 - ); 2350 + let path = 2351 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); 2699 2352 let mut req = request.into_request(); 2700 - req.extensions_mut() 2701 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); 2353 + req.extensions_mut().insert(GrpcMethod::new( 2354 + "rockbox.v1alpha1.PlaybackService", 2355 + "HardStop", 2356 + )); 2702 2357 self.inner.unary(req, path, codec).await 2703 2358 } 2704 2359 pub async fn play_album( 2705 2360 &mut self, 2706 2361 request: impl tonic::IntoRequest<super::PlayAlbumRequest>, 2707 - ) -> std::result::Result< 2708 - tonic::Response<super::PlayAlbumResponse>, 2709 - tonic::Status, 2710 - > { 2711 - self.inner 2712 - .ready() 2713 - .await 2714 - .map_err(|e| { 2715 - tonic::Status::unknown( 2716 - format!("Service was not ready: {}", e.into()), 2717 - ) 2718 - })?; 2362 + ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status> { 2363 + self.inner.ready().await.map_err(|e| { 2364 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2365 + })?; 2719 2366 let codec = tonic::codec::ProstCodec::default(); 2720 - let path = http::uri::PathAndQuery::from_static( 2721 - "/rockbox.v1alpha1.PlaybackService/PlayAlbum", 2722 - ); 2367 + let path = 2368 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); 2723 2369 let mut req = request.into_request(); 2724 - req.extensions_mut() 2725 - .insert( 2726 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), 2727 - ); 2370 + req.extensions_mut().insert(GrpcMethod::new( 2371 + "rockbox.v1alpha1.PlaybackService", 2372 + "PlayAlbum", 2373 + )); 2728 2374 self.inner.unary(req, path, codec).await 2729 2375 } 2730 2376 pub async fn play_artist_tracks( 2731 2377 &mut self, 2732 2378 request: impl tonic::IntoRequest<super::PlayArtistTracksRequest>, 2733 - ) -> std::result::Result< 2734 - tonic::Response<super::PlayArtistTracksResponse>, 2735 - tonic::Status, 2736 - > { 2737 - self.inner 2738 - .ready() 2739 - .await 2740 - .map_err(|e| { 2741 - tonic::Status::unknown( 2742 - format!("Service was not ready: {}", e.into()), 2743 - ) 2744 - })?; 2379 + ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status> 2380 + { 2381 + self.inner.ready().await.map_err(|e| { 2382 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2383 + })?; 2745 2384 let codec = tonic::codec::ProstCodec::default(); 2746 2385 let path = http::uri::PathAndQuery::from_static( 2747 2386 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", 2748 2387 ); 2749 2388 let mut req = request.into_request(); 2750 - req.extensions_mut() 2751 - .insert( 2752 - GrpcMethod::new( 2753 - "rockbox.v1alpha1.PlaybackService", 2754 - "PlayArtistTracks", 2755 - ), 2756 - ); 2389 + req.extensions_mut().insert(GrpcMethod::new( 2390 + "rockbox.v1alpha1.PlaybackService", 2391 + "PlayArtistTracks", 2392 + )); 2757 2393 self.inner.unary(req, path, codec).await 2758 2394 } 2759 2395 pub async fn play_playlist( 2760 2396 &mut self, 2761 2397 request: impl tonic::IntoRequest<super::PlayPlaylistRequest>, 2762 - ) -> std::result::Result< 2763 - tonic::Response<super::PlayPlaylistResponse>, 2764 - tonic::Status, 2765 - > { 2766 - self.inner 2767 - .ready() 2768 - .await 2769 - .map_err(|e| { 2770 - tonic::Status::unknown( 2771 - format!("Service was not ready: {}", e.into()), 2772 - ) 2773 - })?; 2398 + ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status> 2399 + { 2400 + self.inner.ready().await.map_err(|e| { 2401 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2402 + })?; 2774 2403 let codec = tonic::codec::ProstCodec::default(); 2775 2404 let path = http::uri::PathAndQuery::from_static( 2776 2405 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", 2777 2406 ); 2778 2407 let mut req = request.into_request(); 2779 - req.extensions_mut() 2780 - .insert( 2781 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), 2782 - ); 2408 + req.extensions_mut().insert(GrpcMethod::new( 2409 + "rockbox.v1alpha1.PlaybackService", 2410 + "PlayPlaylist", 2411 + )); 2783 2412 self.inner.unary(req, path, codec).await 2784 2413 } 2785 2414 pub async fn play_directory( 2786 2415 &mut self, 2787 2416 request: impl tonic::IntoRequest<super::PlayDirectoryRequest>, 2788 - ) -> std::result::Result< 2789 - tonic::Response<super::PlayDirectoryResponse>, 2790 - tonic::Status, 2791 - > { 2792 - self.inner 2793 - .ready() 2794 - .await 2795 - .map_err(|e| { 2796 - tonic::Status::unknown( 2797 - format!("Service was not ready: {}", e.into()), 2798 - ) 2799 - })?; 2417 + ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status> 2418 + { 2419 + self.inner.ready().await.map_err(|e| { 2420 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2421 + })?; 2800 2422 let codec = tonic::codec::ProstCodec::default(); 2801 2423 let path = http::uri::PathAndQuery::from_static( 2802 2424 "/rockbox.v1alpha1.PlaybackService/PlayDirectory", 2803 2425 ); 2804 2426 let mut req = request.into_request(); 2805 - req.extensions_mut() 2806 - .insert( 2807 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), 2808 - ); 2427 + req.extensions_mut().insert(GrpcMethod::new( 2428 + "rockbox.v1alpha1.PlaybackService", 2429 + "PlayDirectory", 2430 + )); 2809 2431 self.inner.unary(req, path, codec).await 2810 2432 } 2811 2433 pub async fn play_track( 2812 2434 &mut self, 2813 2435 request: impl tonic::IntoRequest<super::PlayTrackRequest>, 2814 - ) -> std::result::Result< 2815 - tonic::Response<super::PlayTrackResponse>, 2816 - tonic::Status, 2817 - > { 2818 - self.inner 2819 - .ready() 2820 - .await 2821 - .map_err(|e| { 2822 - tonic::Status::unknown( 2823 - format!("Service was not ready: {}", e.into()), 2824 - ) 2825 - })?; 2436 + ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status> { 2437 + self.inner.ready().await.map_err(|e| { 2438 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2439 + })?; 2826 2440 let codec = tonic::codec::ProstCodec::default(); 2827 - let path = http::uri::PathAndQuery::from_static( 2828 - "/rockbox.v1alpha1.PlaybackService/PlayTrack", 2829 - ); 2441 + let path = 2442 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); 2830 2443 let mut req = request.into_request(); 2831 - req.extensions_mut() 2832 - .insert( 2833 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), 2834 - ); 2444 + req.extensions_mut().insert(GrpcMethod::new( 2445 + "rockbox.v1alpha1.PlaybackService", 2446 + "PlayTrack", 2447 + )); 2835 2448 self.inner.unary(req, path, codec).await 2836 2449 } 2837 2450 pub async fn play_liked_tracks( 2838 2451 &mut self, 2839 2452 request: impl tonic::IntoRequest<super::PlayLikedTracksRequest>, 2840 - ) -> std::result::Result< 2841 - tonic::Response<super::PlayLikedTracksResponse>, 2842 - tonic::Status, 2843 - > { 2844 - self.inner 2845 - .ready() 2846 - .await 2847 - .map_err(|e| { 2848 - tonic::Status::unknown( 2849 - format!("Service was not ready: {}", e.into()), 2850 - ) 2851 - })?; 2453 + ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status> 2454 + { 2455 + self.inner.ready().await.map_err(|e| { 2456 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2457 + })?; 2852 2458 let codec = tonic::codec::ProstCodec::default(); 2853 2459 let path = http::uri::PathAndQuery::from_static( 2854 2460 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", 2855 2461 ); 2856 2462 let mut req = request.into_request(); 2857 - req.extensions_mut() 2858 - .insert( 2859 - GrpcMethod::new( 2860 - "rockbox.v1alpha1.PlaybackService", 2861 - "PlayLikedTracks", 2862 - ), 2863 - ); 2463 + req.extensions_mut().insert(GrpcMethod::new( 2464 + "rockbox.v1alpha1.PlaybackService", 2465 + "PlayLikedTracks", 2466 + )); 2864 2467 self.inner.unary(req, path, codec).await 2865 2468 } 2866 2469 pub async fn play_all_tracks( 2867 2470 &mut self, 2868 2471 request: impl tonic::IntoRequest<super::PlayAllTracksRequest>, 2869 - ) -> std::result::Result< 2870 - tonic::Response<super::PlayAllTracksResponse>, 2871 - tonic::Status, 2872 - > { 2873 - self.inner 2874 - .ready() 2875 - .await 2876 - .map_err(|e| { 2877 - tonic::Status::unknown( 2878 - format!("Service was not ready: {}", e.into()), 2879 - ) 2880 - })?; 2472 + ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status> 2473 + { 2474 + self.inner.ready().await.map_err(|e| { 2475 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2476 + })?; 2881 2477 let codec = tonic::codec::ProstCodec::default(); 2882 2478 let path = http::uri::PathAndQuery::from_static( 2883 2479 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", 2884 2480 ); 2885 2481 let mut req = request.into_request(); 2886 - req.extensions_mut() 2887 - .insert( 2888 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), 2889 - ); 2482 + req.extensions_mut().insert(GrpcMethod::new( 2483 + "rockbox.v1alpha1.PlaybackService", 2484 + "PlayAllTracks", 2485 + )); 2890 2486 self.inner.unary(req, path, codec).await 2891 2487 } 2892 2488 pub async fn stream_current_track( ··· 2896 2492 tonic::Response<tonic::codec::Streaming<super::CurrentTrackResponse>>, 2897 2493 tonic::Status, 2898 2494 > { 2899 - self.inner 2900 - .ready() 2901 - .await 2902 - .map_err(|e| { 2903 - tonic::Status::unknown( 2904 - format!("Service was not ready: {}", e.into()), 2905 - ) 2906 - })?; 2495 + self.inner.ready().await.map_err(|e| { 2496 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2497 + })?; 2907 2498 let codec = tonic::codec::ProstCodec::default(); 2908 2499 let path = http::uri::PathAndQuery::from_static( 2909 2500 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", 2910 2501 ); 2911 2502 let mut req = request.into_request(); 2912 - req.extensions_mut() 2913 - .insert( 2914 - GrpcMethod::new( 2915 - "rockbox.v1alpha1.PlaybackService", 2916 - "StreamCurrentTrack", 2917 - ), 2918 - ); 2503 + req.extensions_mut().insert(GrpcMethod::new( 2504 + "rockbox.v1alpha1.PlaybackService", 2505 + "StreamCurrentTrack", 2506 + )); 2919 2507 self.inner.server_streaming(req, path, codec).await 2920 2508 } 2921 2509 pub async fn stream_status( ··· 2925 2513 tonic::Response<tonic::codec::Streaming<super::StatusResponse>>, 2926 2514 tonic::Status, 2927 2515 > { 2928 - self.inner 2929 - .ready() 2930 - .await 2931 - .map_err(|e| { 2932 - tonic::Status::unknown( 2933 - format!("Service was not ready: {}", e.into()), 2934 - ) 2935 - })?; 2516 + self.inner.ready().await.map_err(|e| { 2517 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2518 + })?; 2936 2519 let codec = tonic::codec::ProstCodec::default(); 2937 2520 let path = http::uri::PathAndQuery::from_static( 2938 2521 "/rockbox.v1alpha1.PlaybackService/StreamStatus", 2939 2522 ); 2940 2523 let mut req = request.into_request(); 2941 - req.extensions_mut() 2942 - .insert( 2943 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), 2944 - ); 2524 + req.extensions_mut().insert(GrpcMethod::new( 2525 + "rockbox.v1alpha1.PlaybackService", 2526 + "StreamStatus", 2527 + )); 2945 2528 self.inner.server_streaming(req, path, codec).await 2946 2529 } 2947 2530 pub async fn stream_playlist( ··· 2951 2534 tonic::Response<tonic::codec::Streaming<super::PlaylistResponse>>, 2952 2535 tonic::Status, 2953 2536 > { 2954 - self.inner 2955 - .ready() 2956 - .await 2957 - .map_err(|e| { 2958 - tonic::Status::unknown( 2959 - format!("Service was not ready: {}", e.into()), 2960 - ) 2961 - })?; 2537 + self.inner.ready().await.map_err(|e| { 2538 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2539 + })?; 2962 2540 let codec = tonic::codec::ProstCodec::default(); 2963 2541 let path = http::uri::PathAndQuery::from_static( 2964 2542 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", 2965 2543 ); 2966 2544 let mut req = request.into_request(); 2967 - req.extensions_mut() 2968 - .insert( 2969 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), 2970 - ); 2545 + req.extensions_mut().insert(GrpcMethod::new( 2546 + "rockbox.v1alpha1.PlaybackService", 2547 + "StreamPlaylist", 2548 + )); 2971 2549 self.inner.server_streaming(req, path, codec).await 2972 2550 } 2973 2551 } ··· 2979 2557 dead_code, 2980 2558 missing_docs, 2981 2559 clippy::wildcard_imports, 2982 - clippy::let_unit_value, 2560 + clippy::let_unit_value 2983 2561 )] 2984 2562 use tonic::codegen::*; 2985 2563 /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. ··· 2996 2574 async fn play_or_pause( 2997 2575 &self, 2998 2576 request: tonic::Request<super::PlayOrPauseRequest>, 2999 - ) -> std::result::Result< 3000 - tonic::Response<super::PlayOrPauseResponse>, 3001 - tonic::Status, 3002 - >; 2577 + ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status>; 3003 2578 async fn resume( 3004 2579 &self, 3005 2580 request: tonic::Request<super::ResumeRequest>, ··· 3011 2586 async fn previous( 3012 2587 &self, 3013 2588 request: tonic::Request<super::PreviousRequest>, 3014 - ) -> std::result::Result< 3015 - tonic::Response<super::PreviousResponse>, 3016 - tonic::Status, 3017 - >; 2589 + ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status>; 3018 2590 async fn fast_forward_rewind( 3019 2591 &self, 3020 2592 request: tonic::Request<super::FastForwardRewindRequest>, 3021 - ) -> std::result::Result< 3022 - tonic::Response<super::FastForwardRewindResponse>, 3023 - tonic::Status, 3024 - >; 2593 + ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status>; 3025 2594 async fn status( 3026 2595 &self, 3027 2596 request: tonic::Request<super::StatusRequest>, ··· 3029 2598 async fn current_track( 3030 2599 &self, 3031 2600 request: tonic::Request<super::CurrentTrackRequest>, 3032 - ) -> std::result::Result< 3033 - tonic::Response<super::CurrentTrackResponse>, 3034 - tonic::Status, 3035 - >; 2601 + ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status>; 3036 2602 async fn next_track( 3037 2603 &self, 3038 2604 request: tonic::Request<super::NextTrackRequest>, 3039 - ) -> std::result::Result< 3040 - tonic::Response<super::NextTrackResponse>, 3041 - tonic::Status, 3042 - >; 2605 + ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status>; 3043 2606 async fn flush_and_reload_tracks( 3044 2607 &self, 3045 2608 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3046 - ) -> std::result::Result< 3047 - tonic::Response<super::FlushAndReloadTracksResponse>, 3048 - tonic::Status, 3049 - >; 2609 + ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status>; 3050 2610 async fn get_file_position( 3051 2611 &self, 3052 2612 request: tonic::Request<super::GetFilePositionRequest>, 3053 - ) -> std::result::Result< 3054 - tonic::Response<super::GetFilePositionResponse>, 3055 - tonic::Status, 3056 - >; 2613 + ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status>; 3057 2614 async fn hard_stop( 3058 2615 &self, 3059 2616 request: tonic::Request<super::HardStopRequest>, 3060 - ) -> std::result::Result< 3061 - tonic::Response<super::HardStopResponse>, 3062 - tonic::Status, 3063 - >; 2617 + ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status>; 3064 2618 async fn play_album( 3065 2619 &self, 3066 2620 request: tonic::Request<super::PlayAlbumRequest>, 3067 - ) -> std::result::Result< 3068 - tonic::Response<super::PlayAlbumResponse>, 3069 - tonic::Status, 3070 - >; 2621 + ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status>; 3071 2622 async fn play_artist_tracks( 3072 2623 &self, 3073 2624 request: tonic::Request<super::PlayArtistTracksRequest>, 3074 - ) -> std::result::Result< 3075 - tonic::Response<super::PlayArtistTracksResponse>, 3076 - tonic::Status, 3077 - >; 2625 + ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status>; 3078 2626 async fn play_playlist( 3079 2627 &self, 3080 2628 request: tonic::Request<super::PlayPlaylistRequest>, 3081 - ) -> std::result::Result< 3082 - tonic::Response<super::PlayPlaylistResponse>, 3083 - tonic::Status, 3084 - >; 2629 + ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status>; 3085 2630 async fn play_directory( 3086 2631 &self, 3087 2632 request: tonic::Request<super::PlayDirectoryRequest>, 3088 - ) -> std::result::Result< 3089 - tonic::Response<super::PlayDirectoryResponse>, 3090 - tonic::Status, 3091 - >; 2633 + ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status>; 3092 2634 async fn play_track( 3093 2635 &self, 3094 2636 request: tonic::Request<super::PlayTrackRequest>, 3095 - ) -> std::result::Result< 3096 - tonic::Response<super::PlayTrackResponse>, 3097 - tonic::Status, 3098 - >; 2637 + ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status>; 3099 2638 async fn play_liked_tracks( 3100 2639 &self, 3101 2640 request: tonic::Request<super::PlayLikedTracksRequest>, 3102 - ) -> std::result::Result< 3103 - tonic::Response<super::PlayLikedTracksResponse>, 3104 - tonic::Status, 3105 - >; 2641 + ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status>; 3106 2642 async fn play_all_tracks( 3107 2643 &self, 3108 2644 request: tonic::Request<super::PlayAllTracksRequest>, 3109 - ) -> std::result::Result< 3110 - tonic::Response<super::PlayAllTracksResponse>, 3111 - tonic::Status, 3112 - >; 2645 + ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status>; 3113 2646 /// Server streaming response type for the StreamCurrentTrack method. 3114 2647 type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< 3115 2648 Item = std::result::Result<super::CurrentTrackResponse, tonic::Status>, 3116 - > 3117 - + std::marker::Send 2649 + > + std::marker::Send 3118 2650 + 'static; 3119 2651 async fn stream_current_track( 3120 2652 &self, 3121 2653 request: tonic::Request<super::StreamCurrentTrackRequest>, 3122 - ) -> std::result::Result< 3123 - tonic::Response<Self::StreamCurrentTrackStream>, 3124 - tonic::Status, 3125 - >; 2654 + ) -> std::result::Result<tonic::Response<Self::StreamCurrentTrackStream>, tonic::Status>; 3126 2655 /// Server streaming response type for the StreamStatus method. 3127 2656 type StreamStatusStream: tonic::codegen::tokio_stream::Stream< 3128 2657 Item = std::result::Result<super::StatusResponse, tonic::Status>, 3129 - > 3130 - + std::marker::Send 2658 + > + std::marker::Send 3131 2659 + 'static; 3132 2660 async fn stream_status( 3133 2661 &self, 3134 2662 request: tonic::Request<super::StreamStatusRequest>, 3135 - ) -> std::result::Result< 3136 - tonic::Response<Self::StreamStatusStream>, 3137 - tonic::Status, 3138 - >; 2663 + ) -> std::result::Result<tonic::Response<Self::StreamStatusStream>, tonic::Status>; 3139 2664 /// Server streaming response type for the StreamPlaylist method. 3140 2665 type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< 3141 2666 Item = std::result::Result<super::PlaylistResponse, tonic::Status>, 3142 - > 3143 - + std::marker::Send 2667 + > + std::marker::Send 3144 2668 + 'static; 3145 2669 async fn stream_playlist( 3146 2670 &self, 3147 2671 request: tonic::Request<super::StreamPlaylistRequest>, 3148 - ) -> std::result::Result< 3149 - tonic::Response<Self::StreamPlaylistStream>, 3150 - tonic::Status, 3151 - >; 2672 + ) -> std::result::Result<tonic::Response<Self::StreamPlaylistStream>, tonic::Status>; 3152 2673 } 3153 2674 #[derive(Debug)] 3154 2675 pub struct PlaybackServiceServer<T> { ··· 3171 2692 max_encoding_message_size: None, 3172 2693 } 3173 2694 } 3174 - pub fn with_interceptor<F>( 3175 - inner: T, 3176 - interceptor: F, 3177 - ) -> InterceptedService<Self, F> 2695 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 3178 2696 where 3179 2697 F: tonic::service::Interceptor, 3180 2698 { ··· 3229 2747 "/rockbox.v1alpha1.PlaybackService/Play" => { 3230 2748 #[allow(non_camel_case_types)] 3231 2749 struct PlaySvc<T: PlaybackService>(pub Arc<T>); 3232 - impl< 3233 - T: PlaybackService, 3234 - > tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 2750 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 3235 2751 type Response = super::PlayResponse; 3236 - type Future = BoxFuture< 3237 - tonic::Response<Self::Response>, 3238 - tonic::Status, 3239 - >; 2752 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3240 2753 fn call( 3241 2754 &mut self, 3242 2755 request: tonic::Request<super::PlayRequest>, 3243 2756 ) -> Self::Future { 3244 2757 let inner = Arc::clone(&self.0); 3245 - let fut = async move { 3246 - <T as PlaybackService>::play(&inner, request).await 3247 - }; 2758 + let fut = 2759 + async move { <T as PlaybackService>::play(&inner, request).await }; 3248 2760 Box::pin(fut) 3249 2761 } 3250 2762 } ··· 3273 2785 "/rockbox.v1alpha1.PlaybackService/Pause" => { 3274 2786 #[allow(non_camel_case_types)] 3275 2787 struct PauseSvc<T: PlaybackService>(pub Arc<T>); 3276 - impl< 3277 - T: PlaybackService, 3278 - > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 2788 + impl<T: PlaybackService> tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 3279 2789 type Response = super::PauseResponse; 3280 - type Future = BoxFuture< 3281 - tonic::Response<Self::Response>, 3282 - tonic::Status, 3283 - >; 2790 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3284 2791 fn call( 3285 2792 &mut self, 3286 2793 request: tonic::Request<super::PauseRequest>, 3287 2794 ) -> Self::Future { 3288 2795 let inner = Arc::clone(&self.0); 3289 - let fut = async move { 3290 - <T as PlaybackService>::pause(&inner, request).await 3291 - }; 2796 + let fut = 2797 + async move { <T as PlaybackService>::pause(&inner, request).await }; 3292 2798 Box::pin(fut) 3293 2799 } 3294 2800 } ··· 3317 2823 "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { 3318 2824 #[allow(non_camel_case_types)] 3319 2825 struct PlayOrPauseSvc<T: PlaybackService>(pub Arc<T>); 3320 - impl< 3321 - T: PlaybackService, 3322 - > tonic::server::UnaryService<super::PlayOrPauseRequest> 3323 - for PlayOrPauseSvc<T> { 2826 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayOrPauseRequest> 2827 + for PlayOrPauseSvc<T> 2828 + { 3324 2829 type Response = super::PlayOrPauseResponse; 3325 - type Future = BoxFuture< 3326 - tonic::Response<Self::Response>, 3327 - tonic::Status, 3328 - >; 2830 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3329 2831 fn call( 3330 2832 &mut self, 3331 2833 request: tonic::Request<super::PlayOrPauseRequest>, ··· 3362 2864 "/rockbox.v1alpha1.PlaybackService/Resume" => { 3363 2865 #[allow(non_camel_case_types)] 3364 2866 struct ResumeSvc<T: PlaybackService>(pub Arc<T>); 3365 - impl< 3366 - T: PlaybackService, 3367 - > tonic::server::UnaryService<super::ResumeRequest> 3368 - for ResumeSvc<T> { 2867 + impl<T: PlaybackService> tonic::server::UnaryService<super::ResumeRequest> for ResumeSvc<T> { 3369 2868 type Response = super::ResumeResponse; 3370 - type Future = BoxFuture< 3371 - tonic::Response<Self::Response>, 3372 - tonic::Status, 3373 - >; 2869 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3374 2870 fn call( 3375 2871 &mut self, 3376 2872 request: tonic::Request<super::ResumeRequest>, ··· 3407 2903 "/rockbox.v1alpha1.PlaybackService/Next" => { 3408 2904 #[allow(non_camel_case_types)] 3409 2905 struct NextSvc<T: PlaybackService>(pub Arc<T>); 3410 - impl< 3411 - T: PlaybackService, 3412 - > tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 2906 + impl<T: PlaybackService> tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 3413 2907 type Response = super::NextResponse; 3414 - type Future = BoxFuture< 3415 - tonic::Response<Self::Response>, 3416 - tonic::Status, 3417 - >; 2908 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3418 2909 fn call( 3419 2910 &mut self, 3420 2911 request: tonic::Request<super::NextRequest>, 3421 2912 ) -> Self::Future { 3422 2913 let inner = Arc::clone(&self.0); 3423 - let fut = async move { 3424 - <T as PlaybackService>::next(&inner, request).await 3425 - }; 2914 + let fut = 2915 + async move { <T as PlaybackService>::next(&inner, request).await }; 3426 2916 Box::pin(fut) 3427 2917 } 3428 2918 } ··· 3451 2941 "/rockbox.v1alpha1.PlaybackService/Previous" => { 3452 2942 #[allow(non_camel_case_types)] 3453 2943 struct PreviousSvc<T: PlaybackService>(pub Arc<T>); 3454 - impl< 3455 - T: PlaybackService, 3456 - > tonic::server::UnaryService<super::PreviousRequest> 3457 - for PreviousSvc<T> { 2944 + impl<T: PlaybackService> tonic::server::UnaryService<super::PreviousRequest> for PreviousSvc<T> { 3458 2945 type Response = super::PreviousResponse; 3459 - type Future = BoxFuture< 3460 - tonic::Response<Self::Response>, 3461 - tonic::Status, 3462 - >; 2946 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3463 2947 fn call( 3464 2948 &mut self, 3465 2949 request: tonic::Request<super::PreviousRequest>, ··· 3496 2980 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { 3497 2981 #[allow(non_camel_case_types)] 3498 2982 struct FastForwardRewindSvc<T: PlaybackService>(pub Arc<T>); 3499 - impl< 3500 - T: PlaybackService, 3501 - > tonic::server::UnaryService<super::FastForwardRewindRequest> 3502 - for FastForwardRewindSvc<T> { 2983 + impl<T: PlaybackService> 2984 + tonic::server::UnaryService<super::FastForwardRewindRequest> 2985 + for FastForwardRewindSvc<T> 2986 + { 3503 2987 type Response = super::FastForwardRewindResponse; 3504 - type Future = BoxFuture< 3505 - tonic::Response<Self::Response>, 3506 - tonic::Status, 3507 - >; 2988 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3508 2989 fn call( 3509 2990 &mut self, 3510 2991 request: tonic::Request<super::FastForwardRewindRequest>, 3511 2992 ) -> Self::Future { 3512 2993 let inner = Arc::clone(&self.0); 3513 2994 let fut = async move { 3514 - <T as PlaybackService>::fast_forward_rewind(&inner, request) 3515 - .await 2995 + <T as PlaybackService>::fast_forward_rewind(&inner, request).await 3516 2996 }; 3517 2997 Box::pin(fut) 3518 2998 } ··· 3542 3022 "/rockbox.v1alpha1.PlaybackService/Status" => { 3543 3023 #[allow(non_camel_case_types)] 3544 3024 struct StatusSvc<T: PlaybackService>(pub Arc<T>); 3545 - impl< 3546 - T: PlaybackService, 3547 - > tonic::server::UnaryService<super::StatusRequest> 3548 - for StatusSvc<T> { 3025 + impl<T: PlaybackService> tonic::server::UnaryService<super::StatusRequest> for StatusSvc<T> { 3549 3026 type Response = super::StatusResponse; 3550 - type Future = BoxFuture< 3551 - tonic::Response<Self::Response>, 3552 - tonic::Status, 3553 - >; 3027 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3554 3028 fn call( 3555 3029 &mut self, 3556 3030 request: tonic::Request<super::StatusRequest>, ··· 3587 3061 "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { 3588 3062 #[allow(non_camel_case_types)] 3589 3063 struct CurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 3590 - impl< 3591 - T: PlaybackService, 3592 - > tonic::server::UnaryService<super::CurrentTrackRequest> 3593 - for CurrentTrackSvc<T> { 3064 + impl<T: PlaybackService> tonic::server::UnaryService<super::CurrentTrackRequest> 3065 + for CurrentTrackSvc<T> 3066 + { 3594 3067 type Response = super::CurrentTrackResponse; 3595 - type Future = BoxFuture< 3596 - tonic::Response<Self::Response>, 3597 - tonic::Status, 3598 - >; 3068 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3599 3069 fn call( 3600 3070 &mut self, 3601 3071 request: tonic::Request<super::CurrentTrackRequest>, ··· 3632 3102 "/rockbox.v1alpha1.PlaybackService/NextTrack" => { 3633 3103 #[allow(non_camel_case_types)] 3634 3104 struct NextTrackSvc<T: PlaybackService>(pub Arc<T>); 3635 - impl< 3636 - T: PlaybackService, 3637 - > tonic::server::UnaryService<super::NextTrackRequest> 3638 - for NextTrackSvc<T> { 3105 + impl<T: PlaybackService> tonic::server::UnaryService<super::NextTrackRequest> for NextTrackSvc<T> { 3639 3106 type Response = super::NextTrackResponse; 3640 - type Future = BoxFuture< 3641 - tonic::Response<Self::Response>, 3642 - tonic::Status, 3643 - >; 3107 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3644 3108 fn call( 3645 3109 &mut self, 3646 3110 request: tonic::Request<super::NextTrackRequest>, ··· 3677 3141 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { 3678 3142 #[allow(non_camel_case_types)] 3679 3143 struct FlushAndReloadTracksSvc<T: PlaybackService>(pub Arc<T>); 3680 - impl< 3681 - T: PlaybackService, 3682 - > tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3683 - for FlushAndReloadTracksSvc<T> { 3144 + impl<T: PlaybackService> 3145 + tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3146 + for FlushAndReloadTracksSvc<T> 3147 + { 3684 3148 type Response = super::FlushAndReloadTracksResponse; 3685 - type Future = BoxFuture< 3686 - tonic::Response<Self::Response>, 3687 - tonic::Status, 3688 - >; 3149 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3689 3150 fn call( 3690 3151 &mut self, 3691 3152 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3692 3153 ) -> Self::Future { 3693 3154 let inner = Arc::clone(&self.0); 3694 3155 let fut = async move { 3695 - <T as PlaybackService>::flush_and_reload_tracks( 3696 - &inner, 3697 - request, 3698 - ) 3156 + <T as PlaybackService>::flush_and_reload_tracks(&inner, request) 3699 3157 .await 3700 3158 }; 3701 3159 Box::pin(fut) ··· 3726 3184 "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { 3727 3185 #[allow(non_camel_case_types)] 3728 3186 struct GetFilePositionSvc<T: PlaybackService>(pub Arc<T>); 3729 - impl< 3730 - T: PlaybackService, 3731 - > tonic::server::UnaryService<super::GetFilePositionRequest> 3732 - for GetFilePositionSvc<T> { 3187 + impl<T: PlaybackService> 3188 + tonic::server::UnaryService<super::GetFilePositionRequest> 3189 + for GetFilePositionSvc<T> 3190 + { 3733 3191 type Response = super::GetFilePositionResponse; 3734 - type Future = BoxFuture< 3735 - tonic::Response<Self::Response>, 3736 - tonic::Status, 3737 - >; 3192 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3738 3193 fn call( 3739 3194 &mut self, 3740 3195 request: tonic::Request<super::GetFilePositionRequest>, 3741 3196 ) -> Self::Future { 3742 3197 let inner = Arc::clone(&self.0); 3743 3198 let fut = async move { 3744 - <T as PlaybackService>::get_file_position(&inner, request) 3745 - .await 3199 + <T as PlaybackService>::get_file_position(&inner, request).await 3746 3200 }; 3747 3201 Box::pin(fut) 3748 3202 } ··· 3772 3226 "/rockbox.v1alpha1.PlaybackService/HardStop" => { 3773 3227 #[allow(non_camel_case_types)] 3774 3228 struct HardStopSvc<T: PlaybackService>(pub Arc<T>); 3775 - impl< 3776 - T: PlaybackService, 3777 - > tonic::server::UnaryService<super::HardStopRequest> 3778 - for HardStopSvc<T> { 3229 + impl<T: PlaybackService> tonic::server::UnaryService<super::HardStopRequest> for HardStopSvc<T> { 3779 3230 type Response = super::HardStopResponse; 3780 - type Future = BoxFuture< 3781 - tonic::Response<Self::Response>, 3782 - tonic::Status, 3783 - >; 3231 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3784 3232 fn call( 3785 3233 &mut self, 3786 3234 request: tonic::Request<super::HardStopRequest>, ··· 3817 3265 "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { 3818 3266 #[allow(non_camel_case_types)] 3819 3267 struct PlayAlbumSvc<T: PlaybackService>(pub Arc<T>); 3820 - impl< 3821 - T: PlaybackService, 3822 - > tonic::server::UnaryService<super::PlayAlbumRequest> 3823 - for PlayAlbumSvc<T> { 3268 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayAlbumRequest> for PlayAlbumSvc<T> { 3824 3269 type Response = super::PlayAlbumResponse; 3825 - type Future = BoxFuture< 3826 - tonic::Response<Self::Response>, 3827 - tonic::Status, 3828 - >; 3270 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3829 3271 fn call( 3830 3272 &mut self, 3831 3273 request: tonic::Request<super::PlayAlbumRequest>, ··· 3862 3304 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { 3863 3305 #[allow(non_camel_case_types)] 3864 3306 struct PlayArtistTracksSvc<T: PlaybackService>(pub Arc<T>); 3865 - impl< 3866 - T: PlaybackService, 3867 - > tonic::server::UnaryService<super::PlayArtistTracksRequest> 3868 - for PlayArtistTracksSvc<T> { 3307 + impl<T: PlaybackService> 3308 + tonic::server::UnaryService<super::PlayArtistTracksRequest> 3309 + for PlayArtistTracksSvc<T> 3310 + { 3869 3311 type Response = super::PlayArtistTracksResponse; 3870 - type Future = BoxFuture< 3871 - tonic::Response<Self::Response>, 3872 - tonic::Status, 3873 - >; 3312 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3874 3313 fn call( 3875 3314 &mut self, 3876 3315 request: tonic::Request<super::PlayArtistTracksRequest>, 3877 3316 ) -> Self::Future { 3878 3317 let inner = Arc::clone(&self.0); 3879 3318 let fut = async move { 3880 - <T as PlaybackService>::play_artist_tracks(&inner, request) 3881 - .await 3319 + <T as PlaybackService>::play_artist_tracks(&inner, request).await 3882 3320 }; 3883 3321 Box::pin(fut) 3884 3322 } ··· 3908 3346 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { 3909 3347 #[allow(non_camel_case_types)] 3910 3348 struct PlayPlaylistSvc<T: PlaybackService>(pub Arc<T>); 3911 - impl< 3912 - T: PlaybackService, 3913 - > tonic::server::UnaryService<super::PlayPlaylistRequest> 3914 - for PlayPlaylistSvc<T> { 3349 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayPlaylistRequest> 3350 + for PlayPlaylistSvc<T> 3351 + { 3915 3352 type Response = super::PlayPlaylistResponse; 3916 - type Future = BoxFuture< 3917 - tonic::Response<Self::Response>, 3918 - tonic::Status, 3919 - >; 3353 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3920 3354 fn call( 3921 3355 &mut self, 3922 3356 request: tonic::Request<super::PlayPlaylistRequest>, ··· 3953 3387 "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { 3954 3388 #[allow(non_camel_case_types)] 3955 3389 struct PlayDirectorySvc<T: PlaybackService>(pub Arc<T>); 3956 - impl< 3957 - T: PlaybackService, 3958 - > tonic::server::UnaryService<super::PlayDirectoryRequest> 3959 - for PlayDirectorySvc<T> { 3390 + impl<T: PlaybackService> 3391 + tonic::server::UnaryService<super::PlayDirectoryRequest> 3392 + for PlayDirectorySvc<T> 3393 + { 3960 3394 type Response = super::PlayDirectoryResponse; 3961 - type Future = BoxFuture< 3962 - tonic::Response<Self::Response>, 3963 - tonic::Status, 3964 - >; 3395 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3965 3396 fn call( 3966 3397 &mut self, 3967 3398 request: tonic::Request<super::PlayDirectoryRequest>, 3968 3399 ) -> Self::Future { 3969 3400 let inner = Arc::clone(&self.0); 3970 3401 let fut = async move { 3971 - <T as PlaybackService>::play_directory(&inner, request) 3972 - .await 3402 + <T as PlaybackService>::play_directory(&inner, request).await 3973 3403 }; 3974 3404 Box::pin(fut) 3975 3405 } ··· 3999 3429 "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { 4000 3430 #[allow(non_camel_case_types)] 4001 3431 struct PlayTrackSvc<T: PlaybackService>(pub Arc<T>); 4002 - impl< 4003 - T: PlaybackService, 4004 - > tonic::server::UnaryService<super::PlayTrackRequest> 4005 - for PlayTrackSvc<T> { 3432 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayTrackRequest> for PlayTrackSvc<T> { 4006 3433 type Response = super::PlayTrackResponse; 4007 - type Future = BoxFuture< 4008 - tonic::Response<Self::Response>, 4009 - tonic::Status, 4010 - >; 3434 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4011 3435 fn call( 4012 3436 &mut self, 4013 3437 request: tonic::Request<super::PlayTrackRequest>, ··· 4044 3468 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { 4045 3469 #[allow(non_camel_case_types)] 4046 3470 struct PlayLikedTracksSvc<T: PlaybackService>(pub Arc<T>); 4047 - impl< 4048 - T: PlaybackService, 4049 - > tonic::server::UnaryService<super::PlayLikedTracksRequest> 4050 - for PlayLikedTracksSvc<T> { 3471 + impl<T: PlaybackService> 3472 + tonic::server::UnaryService<super::PlayLikedTracksRequest> 3473 + for PlayLikedTracksSvc<T> 3474 + { 4051 3475 type Response = super::PlayLikedTracksResponse; 4052 - type Future = BoxFuture< 4053 - tonic::Response<Self::Response>, 4054 - tonic::Status, 4055 - >; 3476 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4056 3477 fn call( 4057 3478 &mut self, 4058 3479 request: tonic::Request<super::PlayLikedTracksRequest>, 4059 3480 ) -> Self::Future { 4060 3481 let inner = Arc::clone(&self.0); 4061 3482 let fut = async move { 4062 - <T as PlaybackService>::play_liked_tracks(&inner, request) 4063 - .await 3483 + <T as PlaybackService>::play_liked_tracks(&inner, request).await 4064 3484 }; 4065 3485 Box::pin(fut) 4066 3486 } ··· 4090 3510 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { 4091 3511 #[allow(non_camel_case_types)] 4092 3512 struct PlayAllTracksSvc<T: PlaybackService>(pub Arc<T>); 4093 - impl< 4094 - T: PlaybackService, 4095 - > tonic::server::UnaryService<super::PlayAllTracksRequest> 4096 - for PlayAllTracksSvc<T> { 3513 + impl<T: PlaybackService> 3514 + tonic::server::UnaryService<super::PlayAllTracksRequest> 3515 + for PlayAllTracksSvc<T> 3516 + { 4097 3517 type Response = super::PlayAllTracksResponse; 4098 - type Future = BoxFuture< 4099 - tonic::Response<Self::Response>, 4100 - tonic::Status, 4101 - >; 3518 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4102 3519 fn call( 4103 3520 &mut self, 4104 3521 request: tonic::Request<super::PlayAllTracksRequest>, 4105 3522 ) -> Self::Future { 4106 3523 let inner = Arc::clone(&self.0); 4107 3524 let fut = async move { 4108 - <T as PlaybackService>::play_all_tracks(&inner, request) 4109 - .await 3525 + <T as PlaybackService>::play_all_tracks(&inner, request).await 4110 3526 }; 4111 3527 Box::pin(fut) 4112 3528 } ··· 4136 3552 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { 4137 3553 #[allow(non_camel_case_types)] 4138 3554 struct StreamCurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 4139 - impl< 4140 - T: PlaybackService, 4141 - > tonic::server::ServerStreamingService< 4142 - super::StreamCurrentTrackRequest, 4143 - > for StreamCurrentTrackSvc<T> { 3555 + impl<T: PlaybackService> 3556 + tonic::server::ServerStreamingService<super::StreamCurrentTrackRequest> 3557 + for StreamCurrentTrackSvc<T> 3558 + { 4144 3559 type Response = super::CurrentTrackResponse; 4145 3560 type ResponseStream = T::StreamCurrentTrackStream; 4146 - type Future = BoxFuture< 4147 - tonic::Response<Self::ResponseStream>, 4148 - tonic::Status, 4149 - >; 3561 + type Future = 3562 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4150 3563 fn call( 4151 3564 &mut self, 4152 3565 request: tonic::Request<super::StreamCurrentTrackRequest>, 4153 3566 ) -> Self::Future { 4154 3567 let inner = Arc::clone(&self.0); 4155 3568 let fut = async move { 4156 - <T as PlaybackService>::stream_current_track( 4157 - &inner, 4158 - request, 4159 - ) 4160 - .await 3569 + <T as PlaybackService>::stream_current_track(&inner, request).await 4161 3570 }; 4162 3571 Box::pin(fut) 4163 3572 } ··· 4187 3596 "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { 4188 3597 #[allow(non_camel_case_types)] 4189 3598 struct StreamStatusSvc<T: PlaybackService>(pub Arc<T>); 4190 - impl< 4191 - T: PlaybackService, 4192 - > tonic::server::ServerStreamingService<super::StreamStatusRequest> 4193 - for StreamStatusSvc<T> { 3599 + impl<T: PlaybackService> 3600 + tonic::server::ServerStreamingService<super::StreamStatusRequest> 3601 + for StreamStatusSvc<T> 3602 + { 4194 3603 type Response = super::StatusResponse; 4195 3604 type ResponseStream = T::StreamStatusStream; 4196 - type Future = BoxFuture< 4197 - tonic::Response<Self::ResponseStream>, 4198 - tonic::Status, 4199 - >; 3605 + type Future = 3606 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4200 3607 fn call( 4201 3608 &mut self, 4202 3609 request: tonic::Request<super::StreamStatusRequest>, ··· 4233 3640 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { 4234 3641 #[allow(non_camel_case_types)] 4235 3642 struct StreamPlaylistSvc<T: PlaybackService>(pub Arc<T>); 4236 - impl< 4237 - T: PlaybackService, 4238 - > tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 4239 - for StreamPlaylistSvc<T> { 3643 + impl<T: PlaybackService> 3644 + tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 3645 + for StreamPlaylistSvc<T> 3646 + { 4240 3647 type Response = super::PlaylistResponse; 4241 3648 type ResponseStream = T::StreamPlaylistStream; 4242 - type Future = BoxFuture< 4243 - tonic::Response<Self::ResponseStream>, 4244 - tonic::Status, 4245 - >; 3649 + type Future = 3650 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4246 3651 fn call( 4247 3652 &mut self, 4248 3653 request: tonic::Request<super::StreamPlaylistRequest>, 4249 3654 ) -> Self::Future { 4250 3655 let inner = Arc::clone(&self.0); 4251 3656 let fut = async move { 4252 - <T as PlaybackService>::stream_playlist(&inner, request) 4253 - .await 3657 + <T as PlaybackService>::stream_playlist(&inner, request).await 4254 3658 }; 4255 3659 Box::pin(fut) 4256 3660 } ··· 4277 3681 }; 4278 3682 Box::pin(fut) 4279 3683 } 4280 - _ => { 4281 - Box::pin(async move { 4282 - let mut response = http::Response::new(empty_body()); 4283 - let headers = response.headers_mut(); 4284 - headers 4285 - .insert( 4286 - tonic::Status::GRPC_STATUS, 4287 - (tonic::Code::Unimplemented as i32).into(), 4288 - ); 4289 - headers 4290 - .insert( 4291 - http::header::CONTENT_TYPE, 4292 - tonic::metadata::GRPC_CONTENT_TYPE, 4293 - ); 4294 - Ok(response) 4295 - }) 4296 - } 3684 + _ => Box::pin(async move { 3685 + let mut response = http::Response::new(empty_body()); 3686 + let headers = response.headers_mut(); 3687 + headers.insert( 3688 + tonic::Status::GRPC_STATUS, 3689 + (tonic::Code::Unimplemented as i32).into(), 3690 + ); 3691 + headers.insert( 3692 + http::header::CONTENT_TYPE, 3693 + tonic::metadata::GRPC_CONTENT_TYPE, 3694 + ); 3695 + Ok(response) 3696 + }), 4297 3697 } 4298 3698 } 4299 3699 } ··· 4500 3900 dead_code, 4501 3901 missing_docs, 4502 3902 clippy::wildcard_imports, 4503 - clippy::let_unit_value, 3903 + clippy::let_unit_value 4504 3904 )] 4505 - use tonic::codegen::*; 4506 3905 use tonic::codegen::http::Uri; 3906 + use tonic::codegen::*; 4507 3907 #[derive(Debug, Clone)] 4508 3908 pub struct PlaylistServiceClient<T> { 4509 3909 inner: tonic::client::Grpc<T>, ··· 4547 3947 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 4548 3948 >, 4549 3949 >, 4550 - <T as tonic::codegen::Service< 4551 - http::Request<tonic::body::BoxBody>, 4552 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 3950 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 3951 + Into<StdError> + std::marker::Send + std::marker::Sync, 4553 3952 { 4554 3953 PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) 4555 3954 } ··· 4587 3986 pub async fn get_current( 4588 3987 &mut self, 4589 3988 request: impl tonic::IntoRequest<super::GetCurrentRequest>, 4590 - ) -> std::result::Result< 4591 - tonic::Response<super::GetCurrentResponse>, 4592 - tonic::Status, 4593 - > { 4594 - self.inner 4595 - .ready() 4596 - .await 4597 - .map_err(|e| { 4598 - tonic::Status::unknown( 4599 - format!("Service was not ready: {}", e.into()), 4600 - ) 4601 - })?; 3989 + ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status> 3990 + { 3991 + self.inner.ready().await.map_err(|e| { 3992 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 3993 + })?; 4602 3994 let codec = tonic::codec::ProstCodec::default(); 4603 3995 let path = http::uri::PathAndQuery::from_static( 4604 3996 "/rockbox.v1alpha1.PlaylistService/GetCurrent", 4605 3997 ); 4606 3998 let mut req = request.into_request(); 4607 - req.extensions_mut() 4608 - .insert( 4609 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), 4610 - ); 3999 + req.extensions_mut().insert(GrpcMethod::new( 4000 + "rockbox.v1alpha1.PlaylistService", 4001 + "GetCurrent", 4002 + )); 4611 4003 self.inner.unary(req, path, codec).await 4612 4004 } 4613 4005 pub async fn get_resume_info( 4614 4006 &mut self, 4615 4007 request: impl tonic::IntoRequest<super::GetResumeInfoRequest>, 4616 - ) -> std::result::Result< 4617 - tonic::Response<super::GetResumeInfoResponse>, 4618 - tonic::Status, 4619 - > { 4620 - self.inner 4621 - .ready() 4622 - .await 4623 - .map_err(|e| { 4624 - tonic::Status::unknown( 4625 - format!("Service was not ready: {}", e.into()), 4626 - ) 4627 - })?; 4008 + ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status> 4009 + { 4010 + self.inner.ready().await.map_err(|e| { 4011 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4012 + })?; 4628 4013 let codec = tonic::codec::ProstCodec::default(); 4629 4014 let path = http::uri::PathAndQuery::from_static( 4630 4015 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", 4631 4016 ); 4632 4017 let mut req = request.into_request(); 4633 - req.extensions_mut() 4634 - .insert( 4635 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), 4636 - ); 4018 + req.extensions_mut().insert(GrpcMethod::new( 4019 + "rockbox.v1alpha1.PlaylistService", 4020 + "GetResumeInfo", 4021 + )); 4637 4022 self.inner.unary(req, path, codec).await 4638 4023 } 4639 4024 pub async fn get_track_info( 4640 4025 &mut self, 4641 4026 request: impl tonic::IntoRequest<super::GetTrackInfoRequest>, 4642 - ) -> std::result::Result< 4643 - tonic::Response<super::GetTrackInfoResponse>, 4644 - tonic::Status, 4645 - > { 4646 - self.inner 4647 - .ready() 4648 - .await 4649 - .map_err(|e| { 4650 - tonic::Status::unknown( 4651 - format!("Service was not ready: {}", e.into()), 4652 - ) 4653 - })?; 4027 + ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status> 4028 + { 4029 + self.inner.ready().await.map_err(|e| { 4030 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4031 + })?; 4654 4032 let codec = tonic::codec::ProstCodec::default(); 4655 4033 let path = http::uri::PathAndQuery::from_static( 4656 4034 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", 4657 4035 ); 4658 4036 let mut req = request.into_request(); 4659 - req.extensions_mut() 4660 - .insert( 4661 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), 4662 - ); 4037 + req.extensions_mut().insert(GrpcMethod::new( 4038 + "rockbox.v1alpha1.PlaylistService", 4039 + "GetTrackInfo", 4040 + )); 4663 4041 self.inner.unary(req, path, codec).await 4664 4042 } 4665 4043 pub async fn get_first_index( 4666 4044 &mut self, 4667 4045 request: impl tonic::IntoRequest<super::GetFirstIndexRequest>, 4668 - ) -> std::result::Result< 4669 - tonic::Response<super::GetFirstIndexResponse>, 4670 - tonic::Status, 4671 - > { 4672 - self.inner 4673 - .ready() 4674 - .await 4675 - .map_err(|e| { 4676 - tonic::Status::unknown( 4677 - format!("Service was not ready: {}", e.into()), 4678 - ) 4679 - })?; 4046 + ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status> 4047 + { 4048 + self.inner.ready().await.map_err(|e| { 4049 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4050 + })?; 4680 4051 let codec = tonic::codec::ProstCodec::default(); 4681 4052 let path = http::uri::PathAndQuery::from_static( 4682 4053 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", 4683 4054 ); 4684 4055 let mut req = request.into_request(); 4685 - req.extensions_mut() 4686 - .insert( 4687 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), 4688 - ); 4056 + req.extensions_mut().insert(GrpcMethod::new( 4057 + "rockbox.v1alpha1.PlaylistService", 4058 + "GetFirstIndex", 4059 + )); 4689 4060 self.inner.unary(req, path, codec).await 4690 4061 } 4691 4062 pub async fn get_display_index( 4692 4063 &mut self, 4693 4064 request: impl tonic::IntoRequest<super::GetDisplayIndexRequest>, 4694 - ) -> std::result::Result< 4695 - tonic::Response<super::GetDisplayIndexResponse>, 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 - })?; 4065 + ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status> 4066 + { 4067 + self.inner.ready().await.map_err(|e| { 4068 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4069 + })?; 4706 4070 let codec = tonic::codec::ProstCodec::default(); 4707 4071 let path = http::uri::PathAndQuery::from_static( 4708 4072 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", 4709 4073 ); 4710 4074 let mut req = request.into_request(); 4711 - req.extensions_mut() 4712 - .insert( 4713 - GrpcMethod::new( 4714 - "rockbox.v1alpha1.PlaylistService", 4715 - "GetDisplayIndex", 4716 - ), 4717 - ); 4075 + req.extensions_mut().insert(GrpcMethod::new( 4076 + "rockbox.v1alpha1.PlaylistService", 4077 + "GetDisplayIndex", 4078 + )); 4718 4079 self.inner.unary(req, path, codec).await 4719 4080 } 4720 4081 pub async fn amount( 4721 4082 &mut self, 4722 4083 request: impl tonic::IntoRequest<super::AmountRequest>, 4723 4084 ) -> std::result::Result<tonic::Response<super::AmountResponse>, tonic::Status> { 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 - })?; 4085 + self.inner.ready().await.map_err(|e| { 4086 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4087 + })?; 4732 4088 let codec = tonic::codec::ProstCodec::default(); 4733 - let path = http::uri::PathAndQuery::from_static( 4734 - "/rockbox.v1alpha1.PlaylistService/Amount", 4735 - ); 4089 + let path = 4090 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); 4736 4091 let mut req = request.into_request(); 4737 - req.extensions_mut() 4738 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); 4092 + req.extensions_mut().insert(GrpcMethod::new( 4093 + "rockbox.v1alpha1.PlaylistService", 4094 + "Amount", 4095 + )); 4739 4096 self.inner.unary(req, path, codec).await 4740 4097 } 4741 4098 pub async fn playlist_resume( 4742 4099 &mut self, 4743 4100 request: impl tonic::IntoRequest<super::PlaylistResumeRequest>, 4744 - ) -> std::result::Result< 4745 - tonic::Response<super::PlaylistResumeResponse>, 4746 - tonic::Status, 4747 - > { 4748 - self.inner 4749 - .ready() 4750 - .await 4751 - .map_err(|e| { 4752 - tonic::Status::unknown( 4753 - format!("Service was not ready: {}", e.into()), 4754 - ) 4755 - })?; 4101 + ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status> 4102 + { 4103 + self.inner.ready().await.map_err(|e| { 4104 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4105 + })?; 4756 4106 let codec = tonic::codec::ProstCodec::default(); 4757 4107 let path = http::uri::PathAndQuery::from_static( 4758 4108 "/rockbox.v1alpha1.PlaylistService/PlaylistResume", 4759 4109 ); 4760 4110 let mut req = request.into_request(); 4761 - req.extensions_mut() 4762 - .insert( 4763 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), 4764 - ); 4111 + req.extensions_mut().insert(GrpcMethod::new( 4112 + "rockbox.v1alpha1.PlaylistService", 4113 + "PlaylistResume", 4114 + )); 4765 4115 self.inner.unary(req, path, codec).await 4766 4116 } 4767 4117 pub async fn resume_track( 4768 4118 &mut self, 4769 4119 request: impl tonic::IntoRequest<super::ResumeTrackRequest>, 4770 - ) -> std::result::Result< 4771 - tonic::Response<super::ResumeTrackResponse>, 4772 - tonic::Status, 4773 - > { 4774 - self.inner 4775 - .ready() 4776 - .await 4777 - .map_err(|e| { 4778 - tonic::Status::unknown( 4779 - format!("Service was not ready: {}", e.into()), 4780 - ) 4781 - })?; 4120 + ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status> 4121 + { 4122 + self.inner.ready().await.map_err(|e| { 4123 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4124 + })?; 4782 4125 let codec = tonic::codec::ProstCodec::default(); 4783 4126 let path = http::uri::PathAndQuery::from_static( 4784 4127 "/rockbox.v1alpha1.PlaylistService/ResumeTrack", 4785 4128 ); 4786 4129 let mut req = request.into_request(); 4787 - req.extensions_mut() 4788 - .insert( 4789 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), 4790 - ); 4130 + req.extensions_mut().insert(GrpcMethod::new( 4131 + "rockbox.v1alpha1.PlaylistService", 4132 + "ResumeTrack", 4133 + )); 4791 4134 self.inner.unary(req, path, codec).await 4792 4135 } 4793 4136 pub async fn set_modified( 4794 4137 &mut self, 4795 4138 request: impl tonic::IntoRequest<super::SetModifiedRequest>, 4796 - ) -> std::result::Result< 4797 - tonic::Response<super::SetModifiedResponse>, 4798 - tonic::Status, 4799 - > { 4800 - self.inner 4801 - .ready() 4802 - .await 4803 - .map_err(|e| { 4804 - tonic::Status::unknown( 4805 - format!("Service was not ready: {}", e.into()), 4806 - ) 4807 - })?; 4139 + ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status> 4140 + { 4141 + self.inner.ready().await.map_err(|e| { 4142 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4143 + })?; 4808 4144 let codec = tonic::codec::ProstCodec::default(); 4809 4145 let path = http::uri::PathAndQuery::from_static( 4810 4146 "/rockbox.v1alpha1.PlaylistService/SetModified", 4811 4147 ); 4812 4148 let mut req = request.into_request(); 4813 - req.extensions_mut() 4814 - .insert( 4815 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), 4816 - ); 4149 + req.extensions_mut().insert(GrpcMethod::new( 4150 + "rockbox.v1alpha1.PlaylistService", 4151 + "SetModified", 4152 + )); 4817 4153 self.inner.unary(req, path, codec).await 4818 4154 } 4819 4155 pub async fn start( 4820 4156 &mut self, 4821 4157 request: impl tonic::IntoRequest<super::StartRequest>, 4822 4158 ) -> std::result::Result<tonic::Response<super::StartResponse>, tonic::Status> { 4823 - self.inner 4824 - .ready() 4825 - .await 4826 - .map_err(|e| { 4827 - tonic::Status::unknown( 4828 - format!("Service was not ready: {}", e.into()), 4829 - ) 4830 - })?; 4159 + self.inner.ready().await.map_err(|e| { 4160 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4161 + })?; 4831 4162 let codec = tonic::codec::ProstCodec::default(); 4832 - let path = http::uri::PathAndQuery::from_static( 4833 - "/rockbox.v1alpha1.PlaylistService/Start", 4834 - ); 4163 + let path = 4164 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); 4835 4165 let mut req = request.into_request(); 4836 4166 req.extensions_mut() 4837 4167 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); ··· 4841 4171 &mut self, 4842 4172 request: impl tonic::IntoRequest<super::SyncRequest>, 4843 4173 ) -> std::result::Result<tonic::Response<super::SyncResponse>, tonic::Status> { 4844 - self.inner 4845 - .ready() 4846 - .await 4847 - .map_err(|e| { 4848 - tonic::Status::unknown( 4849 - format!("Service was not ready: {}", e.into()), 4850 - ) 4851 - })?; 4174 + self.inner.ready().await.map_err(|e| { 4175 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4176 + })?; 4852 4177 let codec = tonic::codec::ProstCodec::default(); 4853 - let path = http::uri::PathAndQuery::from_static( 4854 - "/rockbox.v1alpha1.PlaylistService/Sync", 4855 - ); 4178 + let path = 4179 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); 4856 4180 let mut req = request.into_request(); 4857 4181 req.extensions_mut() 4858 4182 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); ··· 4861 4185 pub async fn remove_all_tracks( 4862 4186 &mut self, 4863 4187 request: impl tonic::IntoRequest<super::RemoveAllTracksRequest>, 4864 - ) -> std::result::Result< 4865 - tonic::Response<super::RemoveAllTracksResponse>, 4866 - tonic::Status, 4867 - > { 4868 - self.inner 4869 - .ready() 4870 - .await 4871 - .map_err(|e| { 4872 - tonic::Status::unknown( 4873 - format!("Service was not ready: {}", e.into()), 4874 - ) 4875 - })?; 4188 + ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status> 4189 + { 4190 + self.inner.ready().await.map_err(|e| { 4191 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4192 + })?; 4876 4193 let codec = tonic::codec::ProstCodec::default(); 4877 4194 let path = http::uri::PathAndQuery::from_static( 4878 4195 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", 4879 4196 ); 4880 4197 let mut req = request.into_request(); 4881 - req.extensions_mut() 4882 - .insert( 4883 - GrpcMethod::new( 4884 - "rockbox.v1alpha1.PlaylistService", 4885 - "RemoveAllTracks", 4886 - ), 4887 - ); 4198 + req.extensions_mut().insert(GrpcMethod::new( 4199 + "rockbox.v1alpha1.PlaylistService", 4200 + "RemoveAllTracks", 4201 + )); 4888 4202 self.inner.unary(req, path, codec).await 4889 4203 } 4890 4204 pub async fn remove_tracks( 4891 4205 &mut self, 4892 4206 request: impl tonic::IntoRequest<super::RemoveTracksRequest>, 4893 - ) -> std::result::Result< 4894 - tonic::Response<super::RemoveTracksResponse>, 4895 - tonic::Status, 4896 - > { 4897 - self.inner 4898 - .ready() 4899 - .await 4900 - .map_err(|e| { 4901 - tonic::Status::unknown( 4902 - format!("Service was not ready: {}", e.into()), 4903 - ) 4904 - })?; 4207 + ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status> 4208 + { 4209 + self.inner.ready().await.map_err(|e| { 4210 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4211 + })?; 4905 4212 let codec = tonic::codec::ProstCodec::default(); 4906 4213 let path = http::uri::PathAndQuery::from_static( 4907 4214 "/rockbox.v1alpha1.PlaylistService/RemoveTracks", 4908 4215 ); 4909 4216 let mut req = request.into_request(); 4910 - req.extensions_mut() 4911 - .insert( 4912 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), 4913 - ); 4217 + req.extensions_mut().insert(GrpcMethod::new( 4218 + "rockbox.v1alpha1.PlaylistService", 4219 + "RemoveTracks", 4220 + )); 4914 4221 self.inner.unary(req, path, codec).await 4915 4222 } 4916 4223 pub async fn create_playlist( 4917 4224 &mut self, 4918 4225 request: impl tonic::IntoRequest<super::CreatePlaylistRequest>, 4919 - ) -> std::result::Result< 4920 - tonic::Response<super::CreatePlaylistResponse>, 4921 - tonic::Status, 4922 - > { 4923 - self.inner 4924 - .ready() 4925 - .await 4926 - .map_err(|e| { 4927 - tonic::Status::unknown( 4928 - format!("Service was not ready: {}", e.into()), 4929 - ) 4930 - })?; 4226 + ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status> 4227 + { 4228 + self.inner.ready().await.map_err(|e| { 4229 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4230 + })?; 4931 4231 let codec = tonic::codec::ProstCodec::default(); 4932 4232 let path = http::uri::PathAndQuery::from_static( 4933 4233 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", 4934 4234 ); 4935 4235 let mut req = request.into_request(); 4936 - req.extensions_mut() 4937 - .insert( 4938 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), 4939 - ); 4236 + req.extensions_mut().insert(GrpcMethod::new( 4237 + "rockbox.v1alpha1.PlaylistService", 4238 + "CreatePlaylist", 4239 + )); 4940 4240 self.inner.unary(req, path, codec).await 4941 4241 } 4942 4242 pub async fn insert_tracks( 4943 4243 &mut self, 4944 4244 request: impl tonic::IntoRequest<super::InsertTracksRequest>, 4945 - ) -> std::result::Result< 4946 - tonic::Response<super::InsertTracksResponse>, 4947 - tonic::Status, 4948 - > { 4949 - self.inner 4950 - .ready() 4951 - .await 4952 - .map_err(|e| { 4953 - tonic::Status::unknown( 4954 - format!("Service was not ready: {}", e.into()), 4955 - ) 4956 - })?; 4245 + ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status> 4246 + { 4247 + self.inner.ready().await.map_err(|e| { 4248 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4249 + })?; 4957 4250 let codec = tonic::codec::ProstCodec::default(); 4958 4251 let path = http::uri::PathAndQuery::from_static( 4959 4252 "/rockbox.v1alpha1.PlaylistService/InsertTracks", 4960 4253 ); 4961 4254 let mut req = request.into_request(); 4962 - req.extensions_mut() 4963 - .insert( 4964 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), 4965 - ); 4255 + req.extensions_mut().insert(GrpcMethod::new( 4256 + "rockbox.v1alpha1.PlaylistService", 4257 + "InsertTracks", 4258 + )); 4966 4259 self.inner.unary(req, path, codec).await 4967 4260 } 4968 4261 pub async fn insert_directory( 4969 4262 &mut self, 4970 4263 request: impl tonic::IntoRequest<super::InsertDirectoryRequest>, 4971 - ) -> std::result::Result< 4972 - tonic::Response<super::InsertDirectoryResponse>, 4973 - tonic::Status, 4974 - > { 4975 - self.inner 4976 - .ready() 4977 - .await 4978 - .map_err(|e| { 4979 - tonic::Status::unknown( 4980 - format!("Service was not ready: {}", e.into()), 4981 - ) 4982 - })?; 4264 + ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status> 4265 + { 4266 + self.inner.ready().await.map_err(|e| { 4267 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4268 + })?; 4983 4269 let codec = tonic::codec::ProstCodec::default(); 4984 4270 let path = http::uri::PathAndQuery::from_static( 4985 4271 "/rockbox.v1alpha1.PlaylistService/InsertDirectory", 4986 4272 ); 4987 4273 let mut req = request.into_request(); 4988 - req.extensions_mut() 4989 - .insert( 4990 - GrpcMethod::new( 4991 - "rockbox.v1alpha1.PlaylistService", 4992 - "InsertDirectory", 4993 - ), 4994 - ); 4274 + req.extensions_mut().insert(GrpcMethod::new( 4275 + "rockbox.v1alpha1.PlaylistService", 4276 + "InsertDirectory", 4277 + )); 4995 4278 self.inner.unary(req, path, codec).await 4996 4279 } 4997 4280 pub async fn insert_playlist( 4998 4281 &mut self, 4999 4282 request: impl tonic::IntoRequest<super::InsertPlaylistRequest>, 5000 - ) -> std::result::Result< 5001 - tonic::Response<super::InsertPlaylistResponse>, 5002 - tonic::Status, 5003 - > { 5004 - self.inner 5005 - .ready() 5006 - .await 5007 - .map_err(|e| { 5008 - tonic::Status::unknown( 5009 - format!("Service was not ready: {}", e.into()), 5010 - ) 5011 - })?; 4283 + ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status> 4284 + { 4285 + self.inner.ready().await.map_err(|e| { 4286 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4287 + })?; 5012 4288 let codec = tonic::codec::ProstCodec::default(); 5013 4289 let path = http::uri::PathAndQuery::from_static( 5014 4290 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", 5015 4291 ); 5016 4292 let mut req = request.into_request(); 5017 - req.extensions_mut() 5018 - .insert( 5019 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), 5020 - ); 4293 + req.extensions_mut().insert(GrpcMethod::new( 4294 + "rockbox.v1alpha1.PlaylistService", 4295 + "InsertPlaylist", 4296 + )); 5021 4297 self.inner.unary(req, path, codec).await 5022 4298 } 5023 4299 pub async fn insert_album( 5024 4300 &mut self, 5025 4301 request: impl tonic::IntoRequest<super::InsertAlbumRequest>, 5026 - ) -> std::result::Result< 5027 - tonic::Response<super::InsertAlbumResponse>, 5028 - tonic::Status, 5029 - > { 5030 - self.inner 5031 - .ready() 5032 - .await 5033 - .map_err(|e| { 5034 - tonic::Status::unknown( 5035 - format!("Service was not ready: {}", e.into()), 5036 - ) 5037 - })?; 4302 + ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status> 4303 + { 4304 + self.inner.ready().await.map_err(|e| { 4305 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4306 + })?; 5038 4307 let codec = tonic::codec::ProstCodec::default(); 5039 4308 let path = http::uri::PathAndQuery::from_static( 5040 4309 "/rockbox.v1alpha1.PlaylistService/InsertAlbum", 5041 4310 ); 5042 4311 let mut req = request.into_request(); 5043 - req.extensions_mut() 5044 - .insert( 5045 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), 5046 - ); 4312 + req.extensions_mut().insert(GrpcMethod::new( 4313 + "rockbox.v1alpha1.PlaylistService", 4314 + "InsertAlbum", 4315 + )); 5047 4316 self.inner.unary(req, path, codec).await 5048 4317 } 5049 4318 pub async fn insert_artist_tracks( 5050 4319 &mut self, 5051 4320 request: impl tonic::IntoRequest<super::InsertArtistTracksRequest>, 5052 - ) -> std::result::Result< 5053 - tonic::Response<super::InsertArtistTracksResponse>, 5054 - tonic::Status, 5055 - > { 5056 - self.inner 5057 - .ready() 5058 - .await 5059 - .map_err(|e| { 5060 - tonic::Status::unknown( 5061 - format!("Service was not ready: {}", e.into()), 5062 - ) 5063 - })?; 4321 + ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status> 4322 + { 4323 + self.inner.ready().await.map_err(|e| { 4324 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4325 + })?; 5064 4326 let codec = tonic::codec::ProstCodec::default(); 5065 4327 let path = http::uri::PathAndQuery::from_static( 5066 4328 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", 5067 4329 ); 5068 4330 let mut req = request.into_request(); 5069 - req.extensions_mut() 5070 - .insert( 5071 - GrpcMethod::new( 5072 - "rockbox.v1alpha1.PlaylistService", 5073 - "InsertArtistTracks", 5074 - ), 5075 - ); 4331 + req.extensions_mut().insert(GrpcMethod::new( 4332 + "rockbox.v1alpha1.PlaylistService", 4333 + "InsertArtistTracks", 4334 + )); 5076 4335 self.inner.unary(req, path, codec).await 5077 4336 } 5078 4337 pub async fn shuffle_playlist( 5079 4338 &mut self, 5080 4339 request: impl tonic::IntoRequest<super::ShufflePlaylistRequest>, 5081 - ) -> std::result::Result< 5082 - tonic::Response<super::ShufflePlaylistResponse>, 5083 - tonic::Status, 5084 - > { 5085 - self.inner 5086 - .ready() 5087 - .await 5088 - .map_err(|e| { 5089 - tonic::Status::unknown( 5090 - format!("Service was not ready: {}", e.into()), 5091 - ) 5092 - })?; 4340 + ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status> 4341 + { 4342 + self.inner.ready().await.map_err(|e| { 4343 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4344 + })?; 5093 4345 let codec = tonic::codec::ProstCodec::default(); 5094 4346 let path = http::uri::PathAndQuery::from_static( 5095 4347 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", 5096 4348 ); 5097 4349 let mut req = request.into_request(); 5098 - req.extensions_mut() 5099 - .insert( 5100 - GrpcMethod::new( 5101 - "rockbox.v1alpha1.PlaylistService", 5102 - "ShufflePlaylist", 5103 - ), 5104 - ); 4350 + req.extensions_mut().insert(GrpcMethod::new( 4351 + "rockbox.v1alpha1.PlaylistService", 4352 + "ShufflePlaylist", 4353 + )); 5105 4354 self.inner.unary(req, path, codec).await 5106 4355 } 5107 4356 } ··· 5113 4362 dead_code, 5114 4363 missing_docs, 5115 4364 clippy::wildcard_imports, 5116 - clippy::let_unit_value, 4365 + clippy::let_unit_value 5117 4366 )] 5118 4367 use tonic::codegen::*; 5119 4368 /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. ··· 5122 4371 async fn get_current( 5123 4372 &self, 5124 4373 request: tonic::Request<super::GetCurrentRequest>, 5125 - ) -> std::result::Result< 5126 - tonic::Response<super::GetCurrentResponse>, 5127 - tonic::Status, 5128 - >; 4374 + ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status>; 5129 4375 async fn get_resume_info( 5130 4376 &self, 5131 4377 request: tonic::Request<super::GetResumeInfoRequest>, 5132 - ) -> std::result::Result< 5133 - tonic::Response<super::GetResumeInfoResponse>, 5134 - tonic::Status, 5135 - >; 4378 + ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status>; 5136 4379 async fn get_track_info( 5137 4380 &self, 5138 4381 request: tonic::Request<super::GetTrackInfoRequest>, 5139 - ) -> std::result::Result< 5140 - tonic::Response<super::GetTrackInfoResponse>, 5141 - tonic::Status, 5142 - >; 4382 + ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status>; 5143 4383 async fn get_first_index( 5144 4384 &self, 5145 4385 request: tonic::Request<super::GetFirstIndexRequest>, 5146 - ) -> std::result::Result< 5147 - tonic::Response<super::GetFirstIndexResponse>, 5148 - tonic::Status, 5149 - >; 4386 + ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status>; 5150 4387 async fn get_display_index( 5151 4388 &self, 5152 4389 request: tonic::Request<super::GetDisplayIndexRequest>, 5153 - ) -> std::result::Result< 5154 - tonic::Response<super::GetDisplayIndexResponse>, 5155 - tonic::Status, 5156 - >; 4390 + ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status>; 5157 4391 async fn amount( 5158 4392 &self, 5159 4393 request: tonic::Request<super::AmountRequest>, ··· 5161 4395 async fn playlist_resume( 5162 4396 &self, 5163 4397 request: tonic::Request<super::PlaylistResumeRequest>, 5164 - ) -> std::result::Result< 5165 - tonic::Response<super::PlaylistResumeResponse>, 5166 - tonic::Status, 5167 - >; 4398 + ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status>; 5168 4399 async fn resume_track( 5169 4400 &self, 5170 4401 request: tonic::Request<super::ResumeTrackRequest>, 5171 - ) -> std::result::Result< 5172 - tonic::Response<super::ResumeTrackResponse>, 5173 - tonic::Status, 5174 - >; 4402 + ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status>; 5175 4403 async fn set_modified( 5176 4404 &self, 5177 4405 request: tonic::Request<super::SetModifiedRequest>, 5178 - ) -> std::result::Result< 5179 - tonic::Response<super::SetModifiedResponse>, 5180 - tonic::Status, 5181 - >; 4406 + ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status>; 5182 4407 async fn start( 5183 4408 &self, 5184 4409 request: tonic::Request<super::StartRequest>, ··· 5190 4415 async fn remove_all_tracks( 5191 4416 &self, 5192 4417 request: tonic::Request<super::RemoveAllTracksRequest>, 5193 - ) -> std::result::Result< 5194 - tonic::Response<super::RemoveAllTracksResponse>, 5195 - tonic::Status, 5196 - >; 4418 + ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status>; 5197 4419 async fn remove_tracks( 5198 4420 &self, 5199 4421 request: tonic::Request<super::RemoveTracksRequest>, 5200 - ) -> std::result::Result< 5201 - tonic::Response<super::RemoveTracksResponse>, 5202 - tonic::Status, 5203 - >; 4422 + ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status>; 5204 4423 async fn create_playlist( 5205 4424 &self, 5206 4425 request: tonic::Request<super::CreatePlaylistRequest>, 5207 - ) -> std::result::Result< 5208 - tonic::Response<super::CreatePlaylistResponse>, 5209 - tonic::Status, 5210 - >; 4426 + ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status>; 5211 4427 async fn insert_tracks( 5212 4428 &self, 5213 4429 request: tonic::Request<super::InsertTracksRequest>, 5214 - ) -> std::result::Result< 5215 - tonic::Response<super::InsertTracksResponse>, 5216 - tonic::Status, 5217 - >; 4430 + ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status>; 5218 4431 async fn insert_directory( 5219 4432 &self, 5220 4433 request: tonic::Request<super::InsertDirectoryRequest>, 5221 - ) -> std::result::Result< 5222 - tonic::Response<super::InsertDirectoryResponse>, 5223 - tonic::Status, 5224 - >; 4434 + ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status>; 5225 4435 async fn insert_playlist( 5226 4436 &self, 5227 4437 request: tonic::Request<super::InsertPlaylistRequest>, 5228 - ) -> std::result::Result< 5229 - tonic::Response<super::InsertPlaylistResponse>, 5230 - tonic::Status, 5231 - >; 4438 + ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status>; 5232 4439 async fn insert_album( 5233 4440 &self, 5234 4441 request: tonic::Request<super::InsertAlbumRequest>, 5235 - ) -> std::result::Result< 5236 - tonic::Response<super::InsertAlbumResponse>, 5237 - tonic::Status, 5238 - >; 4442 + ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status>; 5239 4443 async fn insert_artist_tracks( 5240 4444 &self, 5241 4445 request: tonic::Request<super::InsertArtistTracksRequest>, 5242 - ) -> std::result::Result< 5243 - tonic::Response<super::InsertArtistTracksResponse>, 5244 - tonic::Status, 5245 - >; 4446 + ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status>; 5246 4447 async fn shuffle_playlist( 5247 4448 &self, 5248 4449 request: tonic::Request<super::ShufflePlaylistRequest>, 5249 - ) -> std::result::Result< 5250 - tonic::Response<super::ShufflePlaylistResponse>, 5251 - tonic::Status, 5252 - >; 4450 + ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status>; 5253 4451 } 5254 4452 #[derive(Debug)] 5255 4453 pub struct PlaylistServiceServer<T> { ··· 5272 4470 max_encoding_message_size: None, 5273 4471 } 5274 4472 } 5275 - pub fn with_interceptor<F>( 5276 - inner: T, 5277 - interceptor: F, 5278 - ) -> InterceptedService<Self, F> 4473 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 5279 4474 where 5280 4475 F: tonic::service::Interceptor, 5281 4476 { ··· 5330 4525 "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { 5331 4526 #[allow(non_camel_case_types)] 5332 4527 struct GetCurrentSvc<T: PlaylistService>(pub Arc<T>); 5333 - impl< 5334 - T: PlaylistService, 5335 - > tonic::server::UnaryService<super::GetCurrentRequest> 5336 - for GetCurrentSvc<T> { 4528 + impl<T: PlaylistService> tonic::server::UnaryService<super::GetCurrentRequest> 4529 + for GetCurrentSvc<T> 4530 + { 5337 4531 type Response = super::GetCurrentResponse; 5338 - type Future = BoxFuture< 5339 - tonic::Response<Self::Response>, 5340 - tonic::Status, 5341 - >; 4532 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5342 4533 fn call( 5343 4534 &mut self, 5344 4535 request: tonic::Request<super::GetCurrentRequest>, ··· 5375 4566 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { 5376 4567 #[allow(non_camel_case_types)] 5377 4568 struct GetResumeInfoSvc<T: PlaylistService>(pub Arc<T>); 5378 - impl< 5379 - T: PlaylistService, 5380 - > tonic::server::UnaryService<super::GetResumeInfoRequest> 5381 - for GetResumeInfoSvc<T> { 4569 + impl<T: PlaylistService> 4570 + tonic::server::UnaryService<super::GetResumeInfoRequest> 4571 + for GetResumeInfoSvc<T> 4572 + { 5382 4573 type Response = super::GetResumeInfoResponse; 5383 - type Future = BoxFuture< 5384 - tonic::Response<Self::Response>, 5385 - tonic::Status, 5386 - >; 4574 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5387 4575 fn call( 5388 4576 &mut self, 5389 4577 request: tonic::Request<super::GetResumeInfoRequest>, 5390 4578 ) -> Self::Future { 5391 4579 let inner = Arc::clone(&self.0); 5392 4580 let fut = async move { 5393 - <T as PlaylistService>::get_resume_info(&inner, request) 5394 - .await 4581 + <T as PlaylistService>::get_resume_info(&inner, request).await 5395 4582 }; 5396 4583 Box::pin(fut) 5397 4584 } ··· 5421 4608 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { 5422 4609 #[allow(non_camel_case_types)] 5423 4610 struct GetTrackInfoSvc<T: PlaylistService>(pub Arc<T>); 5424 - impl< 5425 - T: PlaylistService, 5426 - > tonic::server::UnaryService<super::GetTrackInfoRequest> 5427 - for GetTrackInfoSvc<T> { 4611 + impl<T: PlaylistService> tonic::server::UnaryService<super::GetTrackInfoRequest> 4612 + for GetTrackInfoSvc<T> 4613 + { 5428 4614 type Response = super::GetTrackInfoResponse; 5429 - type Future = BoxFuture< 5430 - tonic::Response<Self::Response>, 5431 - tonic::Status, 5432 - >; 4615 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5433 4616 fn call( 5434 4617 &mut self, 5435 4618 request: tonic::Request<super::GetTrackInfoRequest>, 5436 4619 ) -> Self::Future { 5437 4620 let inner = Arc::clone(&self.0); 5438 4621 let fut = async move { 5439 - <T as PlaylistService>::get_track_info(&inner, request) 5440 - .await 4622 + <T as PlaylistService>::get_track_info(&inner, request).await 5441 4623 }; 5442 4624 Box::pin(fut) 5443 4625 } ··· 5467 4649 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { 5468 4650 #[allow(non_camel_case_types)] 5469 4651 struct GetFirstIndexSvc<T: PlaylistService>(pub Arc<T>); 5470 - impl< 5471 - T: PlaylistService, 5472 - > tonic::server::UnaryService<super::GetFirstIndexRequest> 5473 - for GetFirstIndexSvc<T> { 4652 + impl<T: PlaylistService> 4653 + tonic::server::UnaryService<super::GetFirstIndexRequest> 4654 + for GetFirstIndexSvc<T> 4655 + { 5474 4656 type Response = super::GetFirstIndexResponse; 5475 - type Future = BoxFuture< 5476 - tonic::Response<Self::Response>, 5477 - tonic::Status, 5478 - >; 4657 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5479 4658 fn call( 5480 4659 &mut self, 5481 4660 request: tonic::Request<super::GetFirstIndexRequest>, 5482 4661 ) -> Self::Future { 5483 4662 let inner = Arc::clone(&self.0); 5484 4663 let fut = async move { 5485 - <T as PlaylistService>::get_first_index(&inner, request) 5486 - .await 4664 + <T as PlaylistService>::get_first_index(&inner, request).await 5487 4665 }; 5488 4666 Box::pin(fut) 5489 4667 } ··· 5513 4691 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { 5514 4692 #[allow(non_camel_case_types)] 5515 4693 struct GetDisplayIndexSvc<T: PlaylistService>(pub Arc<T>); 5516 - impl< 5517 - T: PlaylistService, 5518 - > tonic::server::UnaryService<super::GetDisplayIndexRequest> 5519 - for GetDisplayIndexSvc<T> { 4694 + impl<T: PlaylistService> 4695 + tonic::server::UnaryService<super::GetDisplayIndexRequest> 4696 + for GetDisplayIndexSvc<T> 4697 + { 5520 4698 type Response = super::GetDisplayIndexResponse; 5521 - type Future = BoxFuture< 5522 - tonic::Response<Self::Response>, 5523 - tonic::Status, 5524 - >; 4699 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5525 4700 fn call( 5526 4701 &mut self, 5527 4702 request: tonic::Request<super::GetDisplayIndexRequest>, 5528 4703 ) -> Self::Future { 5529 4704 let inner = Arc::clone(&self.0); 5530 4705 let fut = async move { 5531 - <T as PlaylistService>::get_display_index(&inner, request) 5532 - .await 4706 + <T as PlaylistService>::get_display_index(&inner, request).await 5533 4707 }; 5534 4708 Box::pin(fut) 5535 4709 } ··· 5559 4733 "/rockbox.v1alpha1.PlaylistService/Amount" => { 5560 4734 #[allow(non_camel_case_types)] 5561 4735 struct AmountSvc<T: PlaylistService>(pub Arc<T>); 5562 - impl< 5563 - T: PlaylistService, 5564 - > tonic::server::UnaryService<super::AmountRequest> 5565 - for AmountSvc<T> { 4736 + impl<T: PlaylistService> tonic::server::UnaryService<super::AmountRequest> for AmountSvc<T> { 5566 4737 type Response = super::AmountResponse; 5567 - type Future = BoxFuture< 5568 - tonic::Response<Self::Response>, 5569 - tonic::Status, 5570 - >; 4738 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5571 4739 fn call( 5572 4740 &mut self, 5573 4741 request: tonic::Request<super::AmountRequest>, ··· 5604 4772 "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { 5605 4773 #[allow(non_camel_case_types)] 5606 4774 struct PlaylistResumeSvc<T: PlaylistService>(pub Arc<T>); 5607 - impl< 5608 - T: PlaylistService, 5609 - > tonic::server::UnaryService<super::PlaylistResumeRequest> 5610 - for PlaylistResumeSvc<T> { 4775 + impl<T: PlaylistService> 4776 + tonic::server::UnaryService<super::PlaylistResumeRequest> 4777 + for PlaylistResumeSvc<T> 4778 + { 5611 4779 type Response = super::PlaylistResumeResponse; 5612 - type Future = BoxFuture< 5613 - tonic::Response<Self::Response>, 5614 - tonic::Status, 5615 - >; 4780 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5616 4781 fn call( 5617 4782 &mut self, 5618 4783 request: tonic::Request<super::PlaylistResumeRequest>, 5619 4784 ) -> Self::Future { 5620 4785 let inner = Arc::clone(&self.0); 5621 4786 let fut = async move { 5622 - <T as PlaylistService>::playlist_resume(&inner, request) 5623 - .await 4787 + <T as PlaylistService>::playlist_resume(&inner, request).await 5624 4788 }; 5625 4789 Box::pin(fut) 5626 4790 } ··· 5650 4814 "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { 5651 4815 #[allow(non_camel_case_types)] 5652 4816 struct ResumeTrackSvc<T: PlaylistService>(pub Arc<T>); 5653 - impl< 5654 - T: PlaylistService, 5655 - > tonic::server::UnaryService<super::ResumeTrackRequest> 5656 - for ResumeTrackSvc<T> { 4817 + impl<T: PlaylistService> tonic::server::UnaryService<super::ResumeTrackRequest> 4818 + for ResumeTrackSvc<T> 4819 + { 5657 4820 type Response = super::ResumeTrackResponse; 5658 - type Future = BoxFuture< 5659 - tonic::Response<Self::Response>, 5660 - tonic::Status, 5661 - >; 4821 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5662 4822 fn call( 5663 4823 &mut self, 5664 4824 request: tonic::Request<super::ResumeTrackRequest>, ··· 5695 4855 "/rockbox.v1alpha1.PlaylistService/SetModified" => { 5696 4856 #[allow(non_camel_case_types)] 5697 4857 struct SetModifiedSvc<T: PlaylistService>(pub Arc<T>); 5698 - impl< 5699 - T: PlaylistService, 5700 - > tonic::server::UnaryService<super::SetModifiedRequest> 5701 - for SetModifiedSvc<T> { 4858 + impl<T: PlaylistService> tonic::server::UnaryService<super::SetModifiedRequest> 4859 + for SetModifiedSvc<T> 4860 + { 5702 4861 type Response = super::SetModifiedResponse; 5703 - type Future = BoxFuture< 5704 - tonic::Response<Self::Response>, 5705 - tonic::Status, 5706 - >; 4862 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5707 4863 fn call( 5708 4864 &mut self, 5709 4865 request: tonic::Request<super::SetModifiedRequest>, ··· 5740 4896 "/rockbox.v1alpha1.PlaylistService/Start" => { 5741 4897 #[allow(non_camel_case_types)] 5742 4898 struct StartSvc<T: PlaylistService>(pub Arc<T>); 5743 - impl< 5744 - T: PlaylistService, 5745 - > tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 4899 + impl<T: PlaylistService> tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 5746 4900 type Response = super::StartResponse; 5747 - type Future = BoxFuture< 5748 - tonic::Response<Self::Response>, 5749 - tonic::Status, 5750 - >; 4901 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5751 4902 fn call( 5752 4903 &mut self, 5753 4904 request: tonic::Request<super::StartRequest>, 5754 4905 ) -> Self::Future { 5755 4906 let inner = Arc::clone(&self.0); 5756 - let fut = async move { 5757 - <T as PlaylistService>::start(&inner, request).await 5758 - }; 4907 + let fut = 4908 + async move { <T as PlaylistService>::start(&inner, request).await }; 5759 4909 Box::pin(fut) 5760 4910 } 5761 4911 } ··· 5784 4934 "/rockbox.v1alpha1.PlaylistService/Sync" => { 5785 4935 #[allow(non_camel_case_types)] 5786 4936 struct SyncSvc<T: PlaylistService>(pub Arc<T>); 5787 - impl< 5788 - T: PlaylistService, 5789 - > tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 4937 + impl<T: PlaylistService> tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 5790 4938 type Response = super::SyncResponse; 5791 - type Future = BoxFuture< 5792 - tonic::Response<Self::Response>, 5793 - tonic::Status, 5794 - >; 4939 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5795 4940 fn call( 5796 4941 &mut self, 5797 4942 request: tonic::Request<super::SyncRequest>, 5798 4943 ) -> Self::Future { 5799 4944 let inner = Arc::clone(&self.0); 5800 - let fut = async move { 5801 - <T as PlaylistService>::sync(&inner, request).await 5802 - }; 4945 + let fut = 4946 + async move { <T as PlaylistService>::sync(&inner, request).await }; 5803 4947 Box::pin(fut) 5804 4948 } 5805 4949 } ··· 5828 4972 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { 5829 4973 #[allow(non_camel_case_types)] 5830 4974 struct RemoveAllTracksSvc<T: PlaylistService>(pub Arc<T>); 5831 - impl< 5832 - T: PlaylistService, 5833 - > tonic::server::UnaryService<super::RemoveAllTracksRequest> 5834 - for RemoveAllTracksSvc<T> { 4975 + impl<T: PlaylistService> 4976 + tonic::server::UnaryService<super::RemoveAllTracksRequest> 4977 + for RemoveAllTracksSvc<T> 4978 + { 5835 4979 type Response = super::RemoveAllTracksResponse; 5836 - type Future = BoxFuture< 5837 - tonic::Response<Self::Response>, 5838 - tonic::Status, 5839 - >; 4980 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5840 4981 fn call( 5841 4982 &mut self, 5842 4983 request: tonic::Request<super::RemoveAllTracksRequest>, 5843 4984 ) -> Self::Future { 5844 4985 let inner = Arc::clone(&self.0); 5845 4986 let fut = async move { 5846 - <T as PlaylistService>::remove_all_tracks(&inner, request) 5847 - .await 4987 + <T as PlaylistService>::remove_all_tracks(&inner, request).await 5848 4988 }; 5849 4989 Box::pin(fut) 5850 4990 } ··· 5874 5014 "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { 5875 5015 #[allow(non_camel_case_types)] 5876 5016 struct RemoveTracksSvc<T: PlaylistService>(pub Arc<T>); 5877 - impl< 5878 - T: PlaylistService, 5879 - > tonic::server::UnaryService<super::RemoveTracksRequest> 5880 - for RemoveTracksSvc<T> { 5017 + impl<T: PlaylistService> tonic::server::UnaryService<super::RemoveTracksRequest> 5018 + for RemoveTracksSvc<T> 5019 + { 5881 5020 type Response = super::RemoveTracksResponse; 5882 - type Future = BoxFuture< 5883 - tonic::Response<Self::Response>, 5884 - tonic::Status, 5885 - >; 5021 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5886 5022 fn call( 5887 5023 &mut self, 5888 5024 request: tonic::Request<super::RemoveTracksRequest>, ··· 5919 5055 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { 5920 5056 #[allow(non_camel_case_types)] 5921 5057 struct CreatePlaylistSvc<T: PlaylistService>(pub Arc<T>); 5922 - impl< 5923 - T: PlaylistService, 5924 - > tonic::server::UnaryService<super::CreatePlaylistRequest> 5925 - for CreatePlaylistSvc<T> { 5058 + impl<T: PlaylistService> 5059 + tonic::server::UnaryService<super::CreatePlaylistRequest> 5060 + for CreatePlaylistSvc<T> 5061 + { 5926 5062 type Response = super::CreatePlaylistResponse; 5927 - type Future = BoxFuture< 5928 - tonic::Response<Self::Response>, 5929 - tonic::Status, 5930 - >; 5063 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5931 5064 fn call( 5932 5065 &mut self, 5933 5066 request: tonic::Request<super::CreatePlaylistRequest>, 5934 5067 ) -> Self::Future { 5935 5068 let inner = Arc::clone(&self.0); 5936 5069 let fut = async move { 5937 - <T as PlaylistService>::create_playlist(&inner, request) 5938 - .await 5070 + <T as PlaylistService>::create_playlist(&inner, request).await 5939 5071 }; 5940 5072 Box::pin(fut) 5941 5073 } ··· 5965 5097 "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { 5966 5098 #[allow(non_camel_case_types)] 5967 5099 struct InsertTracksSvc<T: PlaylistService>(pub Arc<T>); 5968 - impl< 5969 - T: PlaylistService, 5970 - > tonic::server::UnaryService<super::InsertTracksRequest> 5971 - for InsertTracksSvc<T> { 5100 + impl<T: PlaylistService> tonic::server::UnaryService<super::InsertTracksRequest> 5101 + for InsertTracksSvc<T> 5102 + { 5972 5103 type Response = super::InsertTracksResponse; 5973 - type Future = BoxFuture< 5974 - tonic::Response<Self::Response>, 5975 - tonic::Status, 5976 - >; 5104 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5977 5105 fn call( 5978 5106 &mut self, 5979 5107 request: tonic::Request<super::InsertTracksRequest>, ··· 6010 5138 "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { 6011 5139 #[allow(non_camel_case_types)] 6012 5140 struct InsertDirectorySvc<T: PlaylistService>(pub Arc<T>); 6013 - impl< 6014 - T: PlaylistService, 6015 - > tonic::server::UnaryService<super::InsertDirectoryRequest> 6016 - for InsertDirectorySvc<T> { 5141 + impl<T: PlaylistService> 5142 + tonic::server::UnaryService<super::InsertDirectoryRequest> 5143 + for InsertDirectorySvc<T> 5144 + { 6017 5145 type Response = super::InsertDirectoryResponse; 6018 - type Future = BoxFuture< 6019 - tonic::Response<Self::Response>, 6020 - tonic::Status, 6021 - >; 5146 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6022 5147 fn call( 6023 5148 &mut self, 6024 5149 request: tonic::Request<super::InsertDirectoryRequest>, 6025 5150 ) -> Self::Future { 6026 5151 let inner = Arc::clone(&self.0); 6027 5152 let fut = async move { 6028 - <T as PlaylistService>::insert_directory(&inner, request) 6029 - .await 5153 + <T as PlaylistService>::insert_directory(&inner, request).await 6030 5154 }; 6031 5155 Box::pin(fut) 6032 5156 } ··· 6056 5180 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { 6057 5181 #[allow(non_camel_case_types)] 6058 5182 struct InsertPlaylistSvc<T: PlaylistService>(pub Arc<T>); 6059 - impl< 6060 - T: PlaylistService, 6061 - > tonic::server::UnaryService<super::InsertPlaylistRequest> 6062 - for InsertPlaylistSvc<T> { 5183 + impl<T: PlaylistService> 5184 + tonic::server::UnaryService<super::InsertPlaylistRequest> 5185 + for InsertPlaylistSvc<T> 5186 + { 6063 5187 type Response = super::InsertPlaylistResponse; 6064 - type Future = BoxFuture< 6065 - tonic::Response<Self::Response>, 6066 - tonic::Status, 6067 - >; 5188 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6068 5189 fn call( 6069 5190 &mut self, 6070 5191 request: tonic::Request<super::InsertPlaylistRequest>, 6071 5192 ) -> Self::Future { 6072 5193 let inner = Arc::clone(&self.0); 6073 5194 let fut = async move { 6074 - <T as PlaylistService>::insert_playlist(&inner, request) 6075 - .await 5195 + <T as PlaylistService>::insert_playlist(&inner, request).await 6076 5196 }; 6077 5197 Box::pin(fut) 6078 5198 } ··· 6102 5222 "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { 6103 5223 #[allow(non_camel_case_types)] 6104 5224 struct InsertAlbumSvc<T: PlaylistService>(pub Arc<T>); 6105 - impl< 6106 - T: PlaylistService, 6107 - > tonic::server::UnaryService<super::InsertAlbumRequest> 6108 - for InsertAlbumSvc<T> { 5225 + impl<T: PlaylistService> tonic::server::UnaryService<super::InsertAlbumRequest> 5226 + for InsertAlbumSvc<T> 5227 + { 6109 5228 type Response = super::InsertAlbumResponse; 6110 - type Future = BoxFuture< 6111 - tonic::Response<Self::Response>, 6112 - tonic::Status, 6113 - >; 5229 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6114 5230 fn call( 6115 5231 &mut self, 6116 5232 request: tonic::Request<super::InsertAlbumRequest>, ··· 6147 5263 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { 6148 5264 #[allow(non_camel_case_types)] 6149 5265 struct InsertArtistTracksSvc<T: PlaylistService>(pub Arc<T>); 6150 - impl< 6151 - T: PlaylistService, 6152 - > tonic::server::UnaryService<super::InsertArtistTracksRequest> 6153 - for InsertArtistTracksSvc<T> { 5266 + impl<T: PlaylistService> 5267 + tonic::server::UnaryService<super::InsertArtistTracksRequest> 5268 + for InsertArtistTracksSvc<T> 5269 + { 6154 5270 type Response = super::InsertArtistTracksResponse; 6155 - type Future = BoxFuture< 6156 - tonic::Response<Self::Response>, 6157 - tonic::Status, 6158 - >; 5271 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6159 5272 fn call( 6160 5273 &mut self, 6161 5274 request: tonic::Request<super::InsertArtistTracksRequest>, 6162 5275 ) -> Self::Future { 6163 5276 let inner = Arc::clone(&self.0); 6164 5277 let fut = async move { 6165 - <T as PlaylistService>::insert_artist_tracks( 6166 - &inner, 6167 - request, 6168 - ) 6169 - .await 5278 + <T as PlaylistService>::insert_artist_tracks(&inner, request).await 6170 5279 }; 6171 5280 Box::pin(fut) 6172 5281 } ··· 6196 5305 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { 6197 5306 #[allow(non_camel_case_types)] 6198 5307 struct ShufflePlaylistSvc<T: PlaylistService>(pub Arc<T>); 6199 - impl< 6200 - T: PlaylistService, 6201 - > tonic::server::UnaryService<super::ShufflePlaylistRequest> 6202 - for ShufflePlaylistSvc<T> { 5308 + impl<T: PlaylistService> 5309 + tonic::server::UnaryService<super::ShufflePlaylistRequest> 5310 + for ShufflePlaylistSvc<T> 5311 + { 6203 5312 type Response = super::ShufflePlaylistResponse; 6204 - type Future = BoxFuture< 6205 - tonic::Response<Self::Response>, 6206 - tonic::Status, 6207 - >; 5313 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6208 5314 fn call( 6209 5315 &mut self, 6210 5316 request: tonic::Request<super::ShufflePlaylistRequest>, 6211 5317 ) -> Self::Future { 6212 5318 let inner = Arc::clone(&self.0); 6213 5319 let fut = async move { 6214 - <T as PlaylistService>::shuffle_playlist(&inner, request) 6215 - .await 5320 + <T as PlaylistService>::shuffle_playlist(&inner, request).await 6216 5321 }; 6217 5322 Box::pin(fut) 6218 5323 } ··· 6239 5344 }; 6240 5345 Box::pin(fut) 6241 5346 } 6242 - _ => { 6243 - Box::pin(async move { 6244 - let mut response = http::Response::new(empty_body()); 6245 - let headers = response.headers_mut(); 6246 - headers 6247 - .insert( 6248 - tonic::Status::GRPC_STATUS, 6249 - (tonic::Code::Unimplemented as i32).into(), 6250 - ); 6251 - headers 6252 - .insert( 6253 - http::header::CONTENT_TYPE, 6254 - tonic::metadata::GRPC_CONTENT_TYPE, 6255 - ); 6256 - Ok(response) 6257 - }) 6258 - } 5347 + _ => Box::pin(async move { 5348 + let mut response = http::Response::new(empty_body()); 5349 + let headers = response.headers_mut(); 5350 + headers.insert( 5351 + tonic::Status::GRPC_STATUS, 5352 + (tonic::Code::Unimplemented as i32).into(), 5353 + ); 5354 + headers.insert( 5355 + http::header::CONTENT_TYPE, 5356 + tonic::metadata::GRPC_CONTENT_TYPE, 5357 + ); 5358 + Ok(response) 5359 + }), 6259 5360 } 6260 5361 } 6261 5362 } ··· 6763 5864 dead_code, 6764 5865 missing_docs, 6765 5866 clippy::wildcard_imports, 6766 - clippy::let_unit_value, 5867 + clippy::let_unit_value 6767 5868 )] 6768 - use tonic::codegen::*; 6769 5869 use tonic::codegen::http::Uri; 5870 + use tonic::codegen::*; 6770 5871 #[derive(Debug, Clone)] 6771 5872 pub struct SettingsServiceClient<T> { 6772 5873 inner: tonic::client::Grpc<T>, ··· 6810 5911 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 6811 5912 >, 6812 5913 >, 6813 - <T as tonic::codegen::Service< 6814 - http::Request<tonic::body::BoxBody>, 6815 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 5914 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 5915 + Into<StdError> + std::marker::Send + std::marker::Sync, 6816 5916 { 6817 5917 SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) 6818 5918 } ··· 6850 5950 pub async fn get_settings_list( 6851 5951 &mut self, 6852 5952 request: impl tonic::IntoRequest<super::GetSettingsListRequest>, 6853 - ) -> std::result::Result< 6854 - tonic::Response<super::GetSettingsListResponse>, 6855 - tonic::Status, 6856 - > { 6857 - self.inner 6858 - .ready() 6859 - .await 6860 - .map_err(|e| { 6861 - tonic::Status::unknown( 6862 - format!("Service was not ready: {}", e.into()), 6863 - ) 6864 - })?; 5953 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status> 5954 + { 5955 + self.inner.ready().await.map_err(|e| { 5956 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 5957 + })?; 6865 5958 let codec = tonic::codec::ProstCodec::default(); 6866 5959 let path = http::uri::PathAndQuery::from_static( 6867 5960 "/rockbox.v1alpha1.SettingsService/GetSettingsList", 6868 5961 ); 6869 5962 let mut req = request.into_request(); 6870 - req.extensions_mut() 6871 - .insert( 6872 - GrpcMethod::new( 6873 - "rockbox.v1alpha1.SettingsService", 6874 - "GetSettingsList", 6875 - ), 6876 - ); 5963 + req.extensions_mut().insert(GrpcMethod::new( 5964 + "rockbox.v1alpha1.SettingsService", 5965 + "GetSettingsList", 5966 + )); 6877 5967 self.inner.unary(req, path, codec).await 6878 5968 } 6879 5969 pub async fn get_global_settings( 6880 5970 &mut self, 6881 5971 request: impl tonic::IntoRequest<super::GetGlobalSettingsRequest>, 6882 - ) -> std::result::Result< 6883 - tonic::Response<super::GetGlobalSettingsResponse>, 6884 - tonic::Status, 6885 - > { 6886 - self.inner 6887 - .ready() 6888 - .await 6889 - .map_err(|e| { 6890 - tonic::Status::unknown( 6891 - format!("Service was not ready: {}", e.into()), 6892 - ) 6893 - })?; 5972 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status> 5973 + { 5974 + self.inner.ready().await.map_err(|e| { 5975 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 5976 + })?; 6894 5977 let codec = tonic::codec::ProstCodec::default(); 6895 5978 let path = http::uri::PathAndQuery::from_static( 6896 5979 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", 6897 5980 ); 6898 5981 let mut req = request.into_request(); 6899 - req.extensions_mut() 6900 - .insert( 6901 - GrpcMethod::new( 6902 - "rockbox.v1alpha1.SettingsService", 6903 - "GetGlobalSettings", 6904 - ), 6905 - ); 5982 + req.extensions_mut().insert(GrpcMethod::new( 5983 + "rockbox.v1alpha1.SettingsService", 5984 + "GetGlobalSettings", 5985 + )); 6906 5986 self.inner.unary(req, path, codec).await 6907 5987 } 6908 5988 pub async fn save_settings( 6909 5989 &mut self, 6910 5990 request: impl tonic::IntoRequest<super::SaveSettingsRequest>, 6911 - ) -> std::result::Result< 6912 - tonic::Response<super::SaveSettingsResponse>, 6913 - tonic::Status, 6914 - > { 6915 - self.inner 6916 - .ready() 6917 - .await 6918 - .map_err(|e| { 6919 - tonic::Status::unknown( 6920 - format!("Service was not ready: {}", e.into()), 6921 - ) 6922 - })?; 5991 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status> 5992 + { 5993 + self.inner.ready().await.map_err(|e| { 5994 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 5995 + })?; 6923 5996 let codec = tonic::codec::ProstCodec::default(); 6924 5997 let path = http::uri::PathAndQuery::from_static( 6925 5998 "/rockbox.v1alpha1.SettingsService/SaveSettings", 6926 5999 ); 6927 6000 let mut req = request.into_request(); 6928 - req.extensions_mut() 6929 - .insert( 6930 - GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), 6931 - ); 6001 + req.extensions_mut().insert(GrpcMethod::new( 6002 + "rockbox.v1alpha1.SettingsService", 6003 + "SaveSettings", 6004 + )); 6932 6005 self.inner.unary(req, path, codec).await 6933 6006 } 6934 6007 } ··· 6940 6013 dead_code, 6941 6014 missing_docs, 6942 6015 clippy::wildcard_imports, 6943 - clippy::let_unit_value, 6016 + clippy::let_unit_value 6944 6017 )] 6945 6018 use tonic::codegen::*; 6946 6019 /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. ··· 6949 6022 async fn get_settings_list( 6950 6023 &self, 6951 6024 request: tonic::Request<super::GetSettingsListRequest>, 6952 - ) -> std::result::Result< 6953 - tonic::Response<super::GetSettingsListResponse>, 6954 - tonic::Status, 6955 - >; 6025 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status>; 6956 6026 async fn get_global_settings( 6957 6027 &self, 6958 6028 request: tonic::Request<super::GetGlobalSettingsRequest>, 6959 - ) -> std::result::Result< 6960 - tonic::Response<super::GetGlobalSettingsResponse>, 6961 - tonic::Status, 6962 - >; 6029 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status>; 6963 6030 async fn save_settings( 6964 6031 &self, 6965 6032 request: tonic::Request<super::SaveSettingsRequest>, 6966 - ) -> std::result::Result< 6967 - tonic::Response<super::SaveSettingsResponse>, 6968 - tonic::Status, 6969 - >; 6033 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status>; 6970 6034 } 6971 6035 #[derive(Debug)] 6972 6036 pub struct SettingsServiceServer<T> { ··· 6989 6053 max_encoding_message_size: None, 6990 6054 } 6991 6055 } 6992 - pub fn with_interceptor<F>( 6993 - inner: T, 6994 - interceptor: F, 6995 - ) -> InterceptedService<Self, F> 6056 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 6996 6057 where 6997 6058 F: tonic::service::Interceptor, 6998 6059 { ··· 7047 6108 "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { 7048 6109 #[allow(non_camel_case_types)] 7049 6110 struct GetSettingsListSvc<T: SettingsService>(pub Arc<T>); 7050 - impl< 7051 - T: SettingsService, 7052 - > tonic::server::UnaryService<super::GetSettingsListRequest> 7053 - for GetSettingsListSvc<T> { 6111 + impl<T: SettingsService> 6112 + tonic::server::UnaryService<super::GetSettingsListRequest> 6113 + for GetSettingsListSvc<T> 6114 + { 7054 6115 type Response = super::GetSettingsListResponse; 7055 - type Future = BoxFuture< 7056 - tonic::Response<Self::Response>, 7057 - tonic::Status, 7058 - >; 6116 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7059 6117 fn call( 7060 6118 &mut self, 7061 6119 request: tonic::Request<super::GetSettingsListRequest>, 7062 6120 ) -> Self::Future { 7063 6121 let inner = Arc::clone(&self.0); 7064 6122 let fut = async move { 7065 - <T as SettingsService>::get_settings_list(&inner, request) 7066 - .await 6123 + <T as SettingsService>::get_settings_list(&inner, request).await 7067 6124 }; 7068 6125 Box::pin(fut) 7069 6126 } ··· 7093 6150 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { 7094 6151 #[allow(non_camel_case_types)] 7095 6152 struct GetGlobalSettingsSvc<T: SettingsService>(pub Arc<T>); 7096 - impl< 7097 - T: SettingsService, 7098 - > tonic::server::UnaryService<super::GetGlobalSettingsRequest> 7099 - for GetGlobalSettingsSvc<T> { 6153 + impl<T: SettingsService> 6154 + tonic::server::UnaryService<super::GetGlobalSettingsRequest> 6155 + for GetGlobalSettingsSvc<T> 6156 + { 7100 6157 type Response = super::GetGlobalSettingsResponse; 7101 - type Future = BoxFuture< 7102 - tonic::Response<Self::Response>, 7103 - tonic::Status, 7104 - >; 6158 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7105 6159 fn call( 7106 6160 &mut self, 7107 6161 request: tonic::Request<super::GetGlobalSettingsRequest>, 7108 6162 ) -> Self::Future { 7109 6163 let inner = Arc::clone(&self.0); 7110 6164 let fut = async move { 7111 - <T as SettingsService>::get_global_settings(&inner, request) 7112 - .await 6165 + <T as SettingsService>::get_global_settings(&inner, request).await 7113 6166 }; 7114 6167 Box::pin(fut) 7115 6168 } ··· 7139 6192 "/rockbox.v1alpha1.SettingsService/SaveSettings" => { 7140 6193 #[allow(non_camel_case_types)] 7141 6194 struct SaveSettingsSvc<T: SettingsService>(pub Arc<T>); 7142 - impl< 7143 - T: SettingsService, 7144 - > tonic::server::UnaryService<super::SaveSettingsRequest> 7145 - for SaveSettingsSvc<T> { 6195 + impl<T: SettingsService> tonic::server::UnaryService<super::SaveSettingsRequest> 6196 + for SaveSettingsSvc<T> 6197 + { 7146 6198 type Response = super::SaveSettingsResponse; 7147 - type Future = BoxFuture< 7148 - tonic::Response<Self::Response>, 7149 - tonic::Status, 7150 - >; 6199 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7151 6200 fn call( 7152 6201 &mut self, 7153 6202 request: tonic::Request<super::SaveSettingsRequest>, ··· 7181 6230 }; 7182 6231 Box::pin(fut) 7183 6232 } 7184 - _ => { 7185 - Box::pin(async move { 7186 - let mut response = http::Response::new(empty_body()); 7187 - let headers = response.headers_mut(); 7188 - headers 7189 - .insert( 7190 - tonic::Status::GRPC_STATUS, 7191 - (tonic::Code::Unimplemented as i32).into(), 7192 - ); 7193 - headers 7194 - .insert( 7195 - http::header::CONTENT_TYPE, 7196 - tonic::metadata::GRPC_CONTENT_TYPE, 7197 - ); 7198 - Ok(response) 7199 - }) 7200 - } 6233 + _ => Box::pin(async move { 6234 + let mut response = http::Response::new(empty_body()); 6235 + let headers = response.headers_mut(); 6236 + headers.insert( 6237 + tonic::Status::GRPC_STATUS, 6238 + (tonic::Code::Unimplemented as i32).into(), 6239 + ); 6240 + headers.insert( 6241 + http::header::CONTENT_TYPE, 6242 + tonic::metadata::GRPC_CONTENT_TYPE, 6243 + ); 6244 + Ok(response) 6245 + }), 7201 6246 } 7202 6247 } 7203 6248 } ··· 7355 6400 dead_code, 7356 6401 missing_docs, 7357 6402 clippy::wildcard_imports, 7358 - clippy::let_unit_value, 6403 + clippy::let_unit_value 7359 6404 )] 7360 - use tonic::codegen::*; 7361 6405 use tonic::codegen::http::Uri; 6406 + use tonic::codegen::*; 7362 6407 #[derive(Debug, Clone)] 7363 6408 pub struct SoundServiceClient<T> { 7364 6409 inner: tonic::client::Grpc<T>, ··· 7402 6447 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 7403 6448 >, 7404 6449 >, 7405 - <T as tonic::codegen::Service< 7406 - http::Request<tonic::body::BoxBody>, 7407 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6450 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6451 + Into<StdError> + std::marker::Send + std::marker::Sync, 7408 6452 { 7409 6453 SoundServiceClient::new(InterceptedService::new(inner, interceptor)) 7410 6454 } ··· 7442 6486 pub async fn adjust_volume( 7443 6487 &mut self, 7444 6488 request: impl tonic::IntoRequest<super::AdjustVolumeRequest>, 7445 - ) -> std::result::Result< 7446 - tonic::Response<super::AdjustVolumeResponse>, 7447 - tonic::Status, 7448 - > { 7449 - self.inner 7450 - .ready() 7451 - .await 7452 - .map_err(|e| { 7453 - tonic::Status::unknown( 7454 - format!("Service was not ready: {}", e.into()), 7455 - ) 7456 - })?; 6489 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status> 6490 + { 6491 + self.inner.ready().await.map_err(|e| { 6492 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6493 + })?; 7457 6494 let codec = tonic::codec::ProstCodec::default(); 7458 - let path = http::uri::PathAndQuery::from_static( 7459 - "/rockbox.v1alpha1.SoundService/AdjustVolume", 7460 - ); 6495 + let path = 6496 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); 7461 6497 let mut req = request.into_request(); 7462 - req.extensions_mut() 7463 - .insert( 7464 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), 7465 - ); 6498 + req.extensions_mut().insert(GrpcMethod::new( 6499 + "rockbox.v1alpha1.SoundService", 6500 + "AdjustVolume", 6501 + )); 7466 6502 self.inner.unary(req, path, codec).await 7467 6503 } 7468 6504 pub async fn sound_set( 7469 6505 &mut self, 7470 6506 request: impl tonic::IntoRequest<super::SoundSetRequest>, 7471 - ) -> std::result::Result< 7472 - tonic::Response<super::SoundSetResponse>, 7473 - tonic::Status, 7474 - > { 7475 - self.inner 7476 - .ready() 7477 - .await 7478 - .map_err(|e| { 7479 - tonic::Status::unknown( 7480 - format!("Service was not ready: {}", e.into()), 7481 - ) 7482 - })?; 6507 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status> { 6508 + self.inner.ready().await.map_err(|e| { 6509 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6510 + })?; 7483 6511 let codec = tonic::codec::ProstCodec::default(); 7484 - let path = http::uri::PathAndQuery::from_static( 7485 - "/rockbox.v1alpha1.SoundService/SoundSet", 7486 - ); 6512 + let path = 6513 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); 7487 6514 let mut req = request.into_request(); 7488 6515 req.extensions_mut() 7489 6516 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); ··· 7492 6519 pub async fn sound_current( 7493 6520 &mut self, 7494 6521 request: impl tonic::IntoRequest<super::SoundCurrentRequest>, 7495 - ) -> std::result::Result< 7496 - tonic::Response<super::SoundCurrentResponse>, 7497 - tonic::Status, 7498 - > { 7499 - self.inner 7500 - .ready() 7501 - .await 7502 - .map_err(|e| { 7503 - tonic::Status::unknown( 7504 - format!("Service was not ready: {}", e.into()), 7505 - ) 7506 - })?; 6522 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status> 6523 + { 6524 + self.inner.ready().await.map_err(|e| { 6525 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6526 + })?; 7507 6527 let codec = tonic::codec::ProstCodec::default(); 7508 - let path = http::uri::PathAndQuery::from_static( 7509 - "/rockbox.v1alpha1.SoundService/SoundCurrent", 7510 - ); 6528 + let path = 6529 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); 7511 6530 let mut req = request.into_request(); 7512 - req.extensions_mut() 7513 - .insert( 7514 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), 7515 - ); 6531 + req.extensions_mut().insert(GrpcMethod::new( 6532 + "rockbox.v1alpha1.SoundService", 6533 + "SoundCurrent", 6534 + )); 7516 6535 self.inner.unary(req, path, codec).await 7517 6536 } 7518 6537 pub async fn sound_default( 7519 6538 &mut self, 7520 6539 request: impl tonic::IntoRequest<super::SoundDefaultRequest>, 7521 - ) -> std::result::Result< 7522 - tonic::Response<super::SoundDefaultResponse>, 7523 - tonic::Status, 7524 - > { 7525 - self.inner 7526 - .ready() 7527 - .await 7528 - .map_err(|e| { 7529 - tonic::Status::unknown( 7530 - format!("Service was not ready: {}", e.into()), 7531 - ) 7532 - })?; 6540 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status> 6541 + { 6542 + self.inner.ready().await.map_err(|e| { 6543 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6544 + })?; 7533 6545 let codec = tonic::codec::ProstCodec::default(); 7534 - let path = http::uri::PathAndQuery::from_static( 7535 - "/rockbox.v1alpha1.SoundService/SoundDefault", 7536 - ); 6546 + let path = 6547 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); 7537 6548 let mut req = request.into_request(); 7538 - req.extensions_mut() 7539 - .insert( 7540 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), 7541 - ); 6549 + req.extensions_mut().insert(GrpcMethod::new( 6550 + "rockbox.v1alpha1.SoundService", 6551 + "SoundDefault", 6552 + )); 7542 6553 self.inner.unary(req, path, codec).await 7543 6554 } 7544 6555 pub async fn sound_min( 7545 6556 &mut self, 7546 6557 request: impl tonic::IntoRequest<super::SoundMinRequest>, 7547 - ) -> std::result::Result< 7548 - tonic::Response<super::SoundMinResponse>, 7549 - tonic::Status, 7550 - > { 7551 - self.inner 7552 - .ready() 7553 - .await 7554 - .map_err(|e| { 7555 - tonic::Status::unknown( 7556 - format!("Service was not ready: {}", e.into()), 7557 - ) 7558 - })?; 6558 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status> { 6559 + self.inner.ready().await.map_err(|e| { 6560 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6561 + })?; 7559 6562 let codec = tonic::codec::ProstCodec::default(); 7560 - let path = http::uri::PathAndQuery::from_static( 7561 - "/rockbox.v1alpha1.SoundService/SoundMin", 7562 - ); 6563 + let path = 6564 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); 7563 6565 let mut req = request.into_request(); 7564 6566 req.extensions_mut() 7565 6567 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); ··· 7568 6570 pub async fn sound_max( 7569 6571 &mut self, 7570 6572 request: impl tonic::IntoRequest<super::SoundMaxRequest>, 7571 - ) -> std::result::Result< 7572 - tonic::Response<super::SoundMaxResponse>, 7573 - tonic::Status, 7574 - > { 7575 - self.inner 7576 - .ready() 7577 - .await 7578 - .map_err(|e| { 7579 - tonic::Status::unknown( 7580 - format!("Service was not ready: {}", e.into()), 7581 - ) 7582 - })?; 6573 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status> { 6574 + self.inner.ready().await.map_err(|e| { 6575 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6576 + })?; 7583 6577 let codec = tonic::codec::ProstCodec::default(); 7584 - let path = http::uri::PathAndQuery::from_static( 7585 - "/rockbox.v1alpha1.SoundService/SoundMax", 7586 - ); 6578 + let path = 6579 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); 7587 6580 let mut req = request.into_request(); 7588 6581 req.extensions_mut() 7589 6582 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); ··· 7592 6585 pub async fn sound_unit( 7593 6586 &mut self, 7594 6587 request: impl tonic::IntoRequest<super::SoundUnitRequest>, 7595 - ) -> std::result::Result< 7596 - tonic::Response<super::SoundUnitResponse>, 7597 - tonic::Status, 7598 - > { 7599 - self.inner 7600 - .ready() 7601 - .await 7602 - .map_err(|e| { 7603 - tonic::Status::unknown( 7604 - format!("Service was not ready: {}", e.into()), 7605 - ) 7606 - })?; 6588 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status> { 6589 + self.inner.ready().await.map_err(|e| { 6590 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6591 + })?; 7607 6592 let codec = tonic::codec::ProstCodec::default(); 7608 - let path = http::uri::PathAndQuery::from_static( 7609 - "/rockbox.v1alpha1.SoundService/SoundUnit", 7610 - ); 6593 + let path = 6594 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); 7611 6595 let mut req = request.into_request(); 7612 - req.extensions_mut() 7613 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); 6596 + req.extensions_mut().insert(GrpcMethod::new( 6597 + "rockbox.v1alpha1.SoundService", 6598 + "SoundUnit", 6599 + )); 7614 6600 self.inner.unary(req, path, codec).await 7615 6601 } 7616 6602 pub async fn sound_val2_phys( 7617 6603 &mut self, 7618 6604 request: impl tonic::IntoRequest<super::SoundVal2PhysRequest>, 7619 - ) -> std::result::Result< 7620 - tonic::Response<super::SoundVal2PhysResponse>, 7621 - tonic::Status, 7622 - > { 7623 - self.inner 7624 - .ready() 7625 - .await 7626 - .map_err(|e| { 7627 - tonic::Status::unknown( 7628 - format!("Service was not ready: {}", e.into()), 7629 - ) 7630 - })?; 6605 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status> 6606 + { 6607 + self.inner.ready().await.map_err(|e| { 6608 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6609 + })?; 7631 6610 let codec = tonic::codec::ProstCodec::default(); 7632 6611 let path = http::uri::PathAndQuery::from_static( 7633 6612 "/rockbox.v1alpha1.SoundService/SoundVal2Phys", 7634 6613 ); 7635 6614 let mut req = request.into_request(); 7636 - req.extensions_mut() 7637 - .insert( 7638 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), 7639 - ); 6615 + req.extensions_mut().insert(GrpcMethod::new( 6616 + "rockbox.v1alpha1.SoundService", 6617 + "SoundVal2Phys", 6618 + )); 7640 6619 self.inner.unary(req, path, codec).await 7641 6620 } 7642 6621 pub async fn get_pitch( 7643 6622 &mut self, 7644 6623 request: impl tonic::IntoRequest<super::GetPitchRequest>, 7645 - ) -> std::result::Result< 7646 - tonic::Response<super::GetPitchResponse>, 7647 - tonic::Status, 7648 - > { 7649 - self.inner 7650 - .ready() 7651 - .await 7652 - .map_err(|e| { 7653 - tonic::Status::unknown( 7654 - format!("Service was not ready: {}", e.into()), 7655 - ) 7656 - })?; 6624 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status> { 6625 + self.inner.ready().await.map_err(|e| { 6626 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6627 + })?; 7657 6628 let codec = tonic::codec::ProstCodec::default(); 7658 - let path = http::uri::PathAndQuery::from_static( 7659 - "/rockbox.v1alpha1.SoundService/GetPitch", 7660 - ); 6629 + let path = 6630 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); 7661 6631 let mut req = request.into_request(); 7662 6632 req.extensions_mut() 7663 6633 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); ··· 7666 6636 pub async fn set_pitch( 7667 6637 &mut self, 7668 6638 request: impl tonic::IntoRequest<super::SetPitchRequest>, 7669 - ) -> std::result::Result< 7670 - tonic::Response<super::SetPitchResponse>, 7671 - tonic::Status, 7672 - > { 7673 - self.inner 7674 - .ready() 7675 - .await 7676 - .map_err(|e| { 7677 - tonic::Status::unknown( 7678 - format!("Service was not ready: {}", e.into()), 7679 - ) 7680 - })?; 6639 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status> { 6640 + self.inner.ready().await.map_err(|e| { 6641 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6642 + })?; 7681 6643 let codec = tonic::codec::ProstCodec::default(); 7682 - let path = http::uri::PathAndQuery::from_static( 7683 - "/rockbox.v1alpha1.SoundService/SetPitch", 7684 - ); 6644 + let path = 6645 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); 7685 6646 let mut req = request.into_request(); 7686 6647 req.extensions_mut() 7687 6648 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); ··· 7690 6651 pub async fn beep_play( 7691 6652 &mut self, 7692 6653 request: impl tonic::IntoRequest<super::BeepPlayRequest>, 7693 - ) -> std::result::Result< 7694 - tonic::Response<super::BeepPlayResponse>, 7695 - tonic::Status, 7696 - > { 7697 - self.inner 7698 - .ready() 7699 - .await 7700 - .map_err(|e| { 7701 - tonic::Status::unknown( 7702 - format!("Service was not ready: {}", e.into()), 7703 - ) 7704 - })?; 6654 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status> { 6655 + self.inner.ready().await.map_err(|e| { 6656 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6657 + })?; 7705 6658 let codec = tonic::codec::ProstCodec::default(); 7706 - let path = http::uri::PathAndQuery::from_static( 7707 - "/rockbox.v1alpha1.SoundService/BeepPlay", 7708 - ); 6659 + let path = 6660 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); 7709 6661 let mut req = request.into_request(); 7710 6662 req.extensions_mut() 7711 6663 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); ··· 7714 6666 pub async fn pcmbuf_fade( 7715 6667 &mut self, 7716 6668 request: impl tonic::IntoRequest<super::PcmbufFadeRequest>, 7717 - ) -> std::result::Result< 7718 - tonic::Response<super::PcmbufFadeResponse>, 7719 - tonic::Status, 7720 - > { 7721 - self.inner 7722 - .ready() 7723 - .await 7724 - .map_err(|e| { 7725 - tonic::Status::unknown( 7726 - format!("Service was not ready: {}", e.into()), 7727 - ) 7728 - })?; 6669 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status> 6670 + { 6671 + self.inner.ready().await.map_err(|e| { 6672 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6673 + })?; 7729 6674 let codec = tonic::codec::ProstCodec::default(); 7730 - let path = http::uri::PathAndQuery::from_static( 7731 - "/rockbox.v1alpha1.SoundService/PcmbufFade", 7732 - ); 6675 + let path = 6676 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); 7733 6677 let mut req = request.into_request(); 7734 - req.extensions_mut() 7735 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); 6678 + req.extensions_mut().insert(GrpcMethod::new( 6679 + "rockbox.v1alpha1.SoundService", 6680 + "PcmbufFade", 6681 + )); 7736 6682 self.inner.unary(req, path, codec).await 7737 6683 } 7738 6684 pub async fn pcmbuf_set_low_latency( 7739 6685 &mut self, 7740 6686 request: impl tonic::IntoRequest<super::PcmbufSetLowLatencyRequest>, 7741 - ) -> std::result::Result< 7742 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 7743 - tonic::Status, 7744 - > { 7745 - self.inner 7746 - .ready() 7747 - .await 7748 - .map_err(|e| { 7749 - tonic::Status::unknown( 7750 - format!("Service was not ready: {}", e.into()), 7751 - ) 7752 - })?; 6687 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status> 6688 + { 6689 + self.inner.ready().await.map_err(|e| { 6690 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6691 + })?; 7753 6692 let codec = tonic::codec::ProstCodec::default(); 7754 6693 let path = http::uri::PathAndQuery::from_static( 7755 6694 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", 7756 6695 ); 7757 6696 let mut req = request.into_request(); 7758 - req.extensions_mut() 7759 - .insert( 7760 - GrpcMethod::new( 7761 - "rockbox.v1alpha1.SoundService", 7762 - "PcmbufSetLowLatency", 7763 - ), 7764 - ); 6697 + req.extensions_mut().insert(GrpcMethod::new( 6698 + "rockbox.v1alpha1.SoundService", 6699 + "PcmbufSetLowLatency", 6700 + )); 7765 6701 self.inner.unary(req, path, codec).await 7766 6702 } 7767 6703 pub async fn system_sound_play( 7768 6704 &mut self, 7769 6705 request: impl tonic::IntoRequest<super::SystemSoundPlayRequest>, 7770 - ) -> std::result::Result< 7771 - tonic::Response<super::SystemSoundPlayResponse>, 7772 - tonic::Status, 7773 - > { 7774 - self.inner 7775 - .ready() 7776 - .await 7777 - .map_err(|e| { 7778 - tonic::Status::unknown( 7779 - format!("Service was not ready: {}", e.into()), 7780 - ) 7781 - })?; 6706 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status> 6707 + { 6708 + self.inner.ready().await.map_err(|e| { 6709 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6710 + })?; 7782 6711 let codec = tonic::codec::ProstCodec::default(); 7783 6712 let path = http::uri::PathAndQuery::from_static( 7784 6713 "/rockbox.v1alpha1.SoundService/SystemSoundPlay", 7785 6714 ); 7786 6715 let mut req = request.into_request(); 7787 - req.extensions_mut() 7788 - .insert( 7789 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), 7790 - ); 6716 + req.extensions_mut().insert(GrpcMethod::new( 6717 + "rockbox.v1alpha1.SoundService", 6718 + "SystemSoundPlay", 6719 + )); 7791 6720 self.inner.unary(req, path, codec).await 7792 6721 } 7793 6722 pub async fn keyclick_click( 7794 6723 &mut self, 7795 6724 request: impl tonic::IntoRequest<super::KeyclickClickRequest>, 7796 - ) -> std::result::Result< 7797 - tonic::Response<super::KeyclickClickResponse>, 7798 - tonic::Status, 7799 - > { 7800 - self.inner 7801 - .ready() 7802 - .await 7803 - .map_err(|e| { 7804 - tonic::Status::unknown( 7805 - format!("Service was not ready: {}", e.into()), 7806 - ) 7807 - })?; 6725 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status> 6726 + { 6727 + self.inner.ready().await.map_err(|e| { 6728 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6729 + })?; 7808 6730 let codec = tonic::codec::ProstCodec::default(); 7809 6731 let path = http::uri::PathAndQuery::from_static( 7810 6732 "/rockbox.v1alpha1.SoundService/KeyclickClick", 7811 6733 ); 7812 6734 let mut req = request.into_request(); 7813 - req.extensions_mut() 7814 - .insert( 7815 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), 7816 - ); 6735 + req.extensions_mut().insert(GrpcMethod::new( 6736 + "rockbox.v1alpha1.SoundService", 6737 + "KeyclickClick", 6738 + )); 7817 6739 self.inner.unary(req, path, codec).await 7818 6740 } 7819 6741 } ··· 7825 6747 dead_code, 7826 6748 missing_docs, 7827 6749 clippy::wildcard_imports, 7828 - clippy::let_unit_value, 6750 + clippy::let_unit_value 7829 6751 )] 7830 6752 use tonic::codegen::*; 7831 6753 /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. ··· 7834 6756 async fn adjust_volume( 7835 6757 &self, 7836 6758 request: tonic::Request<super::AdjustVolumeRequest>, 7837 - ) -> std::result::Result< 7838 - tonic::Response<super::AdjustVolumeResponse>, 7839 - tonic::Status, 7840 - >; 6759 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status>; 7841 6760 async fn sound_set( 7842 6761 &self, 7843 6762 request: tonic::Request<super::SoundSetRequest>, 7844 - ) -> std::result::Result< 7845 - tonic::Response<super::SoundSetResponse>, 7846 - tonic::Status, 7847 - >; 6763 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status>; 7848 6764 async fn sound_current( 7849 6765 &self, 7850 6766 request: tonic::Request<super::SoundCurrentRequest>, 7851 - ) -> std::result::Result< 7852 - tonic::Response<super::SoundCurrentResponse>, 7853 - tonic::Status, 7854 - >; 6767 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status>; 7855 6768 async fn sound_default( 7856 6769 &self, 7857 6770 request: tonic::Request<super::SoundDefaultRequest>, 7858 - ) -> std::result::Result< 7859 - tonic::Response<super::SoundDefaultResponse>, 7860 - tonic::Status, 7861 - >; 6771 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status>; 7862 6772 async fn sound_min( 7863 6773 &self, 7864 6774 request: tonic::Request<super::SoundMinRequest>, 7865 - ) -> std::result::Result< 7866 - tonic::Response<super::SoundMinResponse>, 7867 - tonic::Status, 7868 - >; 6775 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status>; 7869 6776 async fn sound_max( 7870 6777 &self, 7871 6778 request: tonic::Request<super::SoundMaxRequest>, 7872 - ) -> std::result::Result< 7873 - tonic::Response<super::SoundMaxResponse>, 7874 - tonic::Status, 7875 - >; 6779 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status>; 7876 6780 async fn sound_unit( 7877 6781 &self, 7878 6782 request: tonic::Request<super::SoundUnitRequest>, 7879 - ) -> std::result::Result< 7880 - tonic::Response<super::SoundUnitResponse>, 7881 - tonic::Status, 7882 - >; 6783 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status>; 7883 6784 async fn sound_val2_phys( 7884 6785 &self, 7885 6786 request: tonic::Request<super::SoundVal2PhysRequest>, 7886 - ) -> std::result::Result< 7887 - tonic::Response<super::SoundVal2PhysResponse>, 7888 - tonic::Status, 7889 - >; 6787 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status>; 7890 6788 async fn get_pitch( 7891 6789 &self, 7892 6790 request: tonic::Request<super::GetPitchRequest>, 7893 - ) -> std::result::Result< 7894 - tonic::Response<super::GetPitchResponse>, 7895 - tonic::Status, 7896 - >; 6791 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status>; 7897 6792 async fn set_pitch( 7898 6793 &self, 7899 6794 request: tonic::Request<super::SetPitchRequest>, 7900 - ) -> std::result::Result< 7901 - tonic::Response<super::SetPitchResponse>, 7902 - tonic::Status, 7903 - >; 6795 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status>; 7904 6796 async fn beep_play( 7905 6797 &self, 7906 6798 request: tonic::Request<super::BeepPlayRequest>, 7907 - ) -> std::result::Result< 7908 - tonic::Response<super::BeepPlayResponse>, 7909 - tonic::Status, 7910 - >; 6799 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status>; 7911 6800 async fn pcmbuf_fade( 7912 6801 &self, 7913 6802 request: tonic::Request<super::PcmbufFadeRequest>, 7914 - ) -> std::result::Result< 7915 - tonic::Response<super::PcmbufFadeResponse>, 7916 - tonic::Status, 7917 - >; 6803 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status>; 7918 6804 async fn pcmbuf_set_low_latency( 7919 6805 &self, 7920 6806 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 7921 - ) -> std::result::Result< 7922 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 7923 - tonic::Status, 7924 - >; 6807 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status>; 7925 6808 async fn system_sound_play( 7926 6809 &self, 7927 6810 request: tonic::Request<super::SystemSoundPlayRequest>, 7928 - ) -> std::result::Result< 7929 - tonic::Response<super::SystemSoundPlayResponse>, 7930 - tonic::Status, 7931 - >; 6811 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status>; 7932 6812 async fn keyclick_click( 7933 6813 &self, 7934 6814 request: tonic::Request<super::KeyclickClickRequest>, 7935 - ) -> std::result::Result< 7936 - tonic::Response<super::KeyclickClickResponse>, 7937 - tonic::Status, 7938 - >; 6815 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status>; 7939 6816 } 7940 6817 #[derive(Debug)] 7941 6818 pub struct SoundServiceServer<T> { ··· 7958 6835 max_encoding_message_size: None, 7959 6836 } 7960 6837 } 7961 - pub fn with_interceptor<F>( 7962 - inner: T, 7963 - interceptor: F, 7964 - ) -> InterceptedService<Self, F> 6838 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 7965 6839 where 7966 6840 F: tonic::service::Interceptor, 7967 6841 { ··· 8016 6890 "/rockbox.v1alpha1.SoundService/AdjustVolume" => { 8017 6891 #[allow(non_camel_case_types)] 8018 6892 struct AdjustVolumeSvc<T: SoundService>(pub Arc<T>); 8019 - impl< 8020 - T: SoundService, 8021 - > tonic::server::UnaryService<super::AdjustVolumeRequest> 8022 - for AdjustVolumeSvc<T> { 6893 + impl<T: SoundService> tonic::server::UnaryService<super::AdjustVolumeRequest> 6894 + for AdjustVolumeSvc<T> 6895 + { 8023 6896 type Response = super::AdjustVolumeResponse; 8024 - type Future = BoxFuture< 8025 - tonic::Response<Self::Response>, 8026 - tonic::Status, 8027 - >; 6897 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8028 6898 fn call( 8029 6899 &mut self, 8030 6900 request: tonic::Request<super::AdjustVolumeRequest>, ··· 8061 6931 "/rockbox.v1alpha1.SoundService/SoundSet" => { 8062 6932 #[allow(non_camel_case_types)] 8063 6933 struct SoundSetSvc<T: SoundService>(pub Arc<T>); 8064 - impl< 8065 - T: SoundService, 8066 - > tonic::server::UnaryService<super::SoundSetRequest> 8067 - for SoundSetSvc<T> { 6934 + impl<T: SoundService> tonic::server::UnaryService<super::SoundSetRequest> for SoundSetSvc<T> { 8068 6935 type Response = super::SoundSetResponse; 8069 - type Future = BoxFuture< 8070 - tonic::Response<Self::Response>, 8071 - tonic::Status, 8072 - >; 6936 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8073 6937 fn call( 8074 6938 &mut self, 8075 6939 request: tonic::Request<super::SoundSetRequest>, ··· 8106 6970 "/rockbox.v1alpha1.SoundService/SoundCurrent" => { 8107 6971 #[allow(non_camel_case_types)] 8108 6972 struct SoundCurrentSvc<T: SoundService>(pub Arc<T>); 8109 - impl< 8110 - T: SoundService, 8111 - > tonic::server::UnaryService<super::SoundCurrentRequest> 8112 - for SoundCurrentSvc<T> { 6973 + impl<T: SoundService> tonic::server::UnaryService<super::SoundCurrentRequest> 6974 + for SoundCurrentSvc<T> 6975 + { 8113 6976 type Response = super::SoundCurrentResponse; 8114 - type Future = BoxFuture< 8115 - tonic::Response<Self::Response>, 8116 - tonic::Status, 8117 - >; 6977 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8118 6978 fn call( 8119 6979 &mut self, 8120 6980 request: tonic::Request<super::SoundCurrentRequest>, ··· 8151 7011 "/rockbox.v1alpha1.SoundService/SoundDefault" => { 8152 7012 #[allow(non_camel_case_types)] 8153 7013 struct SoundDefaultSvc<T: SoundService>(pub Arc<T>); 8154 - impl< 8155 - T: SoundService, 8156 - > tonic::server::UnaryService<super::SoundDefaultRequest> 8157 - for SoundDefaultSvc<T> { 7014 + impl<T: SoundService> tonic::server::UnaryService<super::SoundDefaultRequest> 7015 + for SoundDefaultSvc<T> 7016 + { 8158 7017 type Response = super::SoundDefaultResponse; 8159 - type Future = BoxFuture< 8160 - tonic::Response<Self::Response>, 8161 - tonic::Status, 8162 - >; 7018 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8163 7019 fn call( 8164 7020 &mut self, 8165 7021 request: tonic::Request<super::SoundDefaultRequest>, ··· 8196 7052 "/rockbox.v1alpha1.SoundService/SoundMin" => { 8197 7053 #[allow(non_camel_case_types)] 8198 7054 struct SoundMinSvc<T: SoundService>(pub Arc<T>); 8199 - impl< 8200 - T: SoundService, 8201 - > tonic::server::UnaryService<super::SoundMinRequest> 8202 - for SoundMinSvc<T> { 7055 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMinRequest> for SoundMinSvc<T> { 8203 7056 type Response = super::SoundMinResponse; 8204 - type Future = BoxFuture< 8205 - tonic::Response<Self::Response>, 8206 - tonic::Status, 8207 - >; 7057 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8208 7058 fn call( 8209 7059 &mut self, 8210 7060 request: tonic::Request<super::SoundMinRequest>, ··· 8241 7091 "/rockbox.v1alpha1.SoundService/SoundMax" => { 8242 7092 #[allow(non_camel_case_types)] 8243 7093 struct SoundMaxSvc<T: SoundService>(pub Arc<T>); 8244 - impl< 8245 - T: SoundService, 8246 - > tonic::server::UnaryService<super::SoundMaxRequest> 8247 - for SoundMaxSvc<T> { 7094 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMaxRequest> for SoundMaxSvc<T> { 8248 7095 type Response = super::SoundMaxResponse; 8249 - type Future = BoxFuture< 8250 - tonic::Response<Self::Response>, 8251 - tonic::Status, 8252 - >; 7096 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8253 7097 fn call( 8254 7098 &mut self, 8255 7099 request: tonic::Request<super::SoundMaxRequest>, ··· 8286 7130 "/rockbox.v1alpha1.SoundService/SoundUnit" => { 8287 7131 #[allow(non_camel_case_types)] 8288 7132 struct SoundUnitSvc<T: SoundService>(pub Arc<T>); 8289 - impl< 8290 - T: SoundService, 8291 - > tonic::server::UnaryService<super::SoundUnitRequest> 8292 - for SoundUnitSvc<T> { 7133 + impl<T: SoundService> tonic::server::UnaryService<super::SoundUnitRequest> for SoundUnitSvc<T> { 8293 7134 type Response = super::SoundUnitResponse; 8294 - type Future = BoxFuture< 8295 - tonic::Response<Self::Response>, 8296 - tonic::Status, 8297 - >; 7135 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8298 7136 fn call( 8299 7137 &mut self, 8300 7138 request: tonic::Request<super::SoundUnitRequest>, ··· 8331 7169 "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { 8332 7170 #[allow(non_camel_case_types)] 8333 7171 struct SoundVal2PhysSvc<T: SoundService>(pub Arc<T>); 8334 - impl< 8335 - T: SoundService, 8336 - > tonic::server::UnaryService<super::SoundVal2PhysRequest> 8337 - for SoundVal2PhysSvc<T> { 7172 + impl<T: SoundService> tonic::server::UnaryService<super::SoundVal2PhysRequest> 7173 + for SoundVal2PhysSvc<T> 7174 + { 8338 7175 type Response = super::SoundVal2PhysResponse; 8339 - type Future = BoxFuture< 8340 - tonic::Response<Self::Response>, 8341 - tonic::Status, 8342 - >; 7176 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8343 7177 fn call( 8344 7178 &mut self, 8345 7179 request: tonic::Request<super::SoundVal2PhysRequest>, ··· 8376 7210 "/rockbox.v1alpha1.SoundService/GetPitch" => { 8377 7211 #[allow(non_camel_case_types)] 8378 7212 struct GetPitchSvc<T: SoundService>(pub Arc<T>); 8379 - impl< 8380 - T: SoundService, 8381 - > tonic::server::UnaryService<super::GetPitchRequest> 8382 - for GetPitchSvc<T> { 7213 + impl<T: SoundService> tonic::server::UnaryService<super::GetPitchRequest> for GetPitchSvc<T> { 8383 7214 type Response = super::GetPitchResponse; 8384 - type Future = BoxFuture< 8385 - tonic::Response<Self::Response>, 8386 - tonic::Status, 8387 - >; 7215 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8388 7216 fn call( 8389 7217 &mut self, 8390 7218 request: tonic::Request<super::GetPitchRequest>, ··· 8421 7249 "/rockbox.v1alpha1.SoundService/SetPitch" => { 8422 7250 #[allow(non_camel_case_types)] 8423 7251 struct SetPitchSvc<T: SoundService>(pub Arc<T>); 8424 - impl< 8425 - T: SoundService, 8426 - > tonic::server::UnaryService<super::SetPitchRequest> 8427 - for SetPitchSvc<T> { 7252 + impl<T: SoundService> tonic::server::UnaryService<super::SetPitchRequest> for SetPitchSvc<T> { 8428 7253 type Response = super::SetPitchResponse; 8429 - type Future = BoxFuture< 8430 - tonic::Response<Self::Response>, 8431 - tonic::Status, 8432 - >; 7254 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8433 7255 fn call( 8434 7256 &mut self, 8435 7257 request: tonic::Request<super::SetPitchRequest>, ··· 8466 7288 "/rockbox.v1alpha1.SoundService/BeepPlay" => { 8467 7289 #[allow(non_camel_case_types)] 8468 7290 struct BeepPlaySvc<T: SoundService>(pub Arc<T>); 8469 - impl< 8470 - T: SoundService, 8471 - > tonic::server::UnaryService<super::BeepPlayRequest> 8472 - for BeepPlaySvc<T> { 7291 + impl<T: SoundService> tonic::server::UnaryService<super::BeepPlayRequest> for BeepPlaySvc<T> { 8473 7292 type Response = super::BeepPlayResponse; 8474 - type Future = BoxFuture< 8475 - tonic::Response<Self::Response>, 8476 - tonic::Status, 8477 - >; 7293 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8478 7294 fn call( 8479 7295 &mut self, 8480 7296 request: tonic::Request<super::BeepPlayRequest>, ··· 8511 7327 "/rockbox.v1alpha1.SoundService/PcmbufFade" => { 8512 7328 #[allow(non_camel_case_types)] 8513 7329 struct PcmbufFadeSvc<T: SoundService>(pub Arc<T>); 8514 - impl< 8515 - T: SoundService, 8516 - > tonic::server::UnaryService<super::PcmbufFadeRequest> 8517 - for PcmbufFadeSvc<T> { 7330 + impl<T: SoundService> tonic::server::UnaryService<super::PcmbufFadeRequest> for PcmbufFadeSvc<T> { 8518 7331 type Response = super::PcmbufFadeResponse; 8519 - type Future = BoxFuture< 8520 - tonic::Response<Self::Response>, 8521 - tonic::Status, 8522 - >; 7332 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8523 7333 fn call( 8524 7334 &mut self, 8525 7335 request: tonic::Request<super::PcmbufFadeRequest>, ··· 8556 7366 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { 8557 7367 #[allow(non_camel_case_types)] 8558 7368 struct PcmbufSetLowLatencySvc<T: SoundService>(pub Arc<T>); 8559 - impl< 8560 - T: SoundService, 8561 - > tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 8562 - for PcmbufSetLowLatencySvc<T> { 7369 + impl<T: SoundService> 7370 + tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 7371 + for PcmbufSetLowLatencySvc<T> 7372 + { 8563 7373 type Response = super::PcmbufSetLowLatencyResponse; 8564 - type Future = BoxFuture< 8565 - tonic::Response<Self::Response>, 8566 - tonic::Status, 8567 - >; 7374 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8568 7375 fn call( 8569 7376 &mut self, 8570 7377 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8571 7378 ) -> Self::Future { 8572 7379 let inner = Arc::clone(&self.0); 8573 7380 let fut = async move { 8574 - <T as SoundService>::pcmbuf_set_low_latency(&inner, request) 8575 - .await 7381 + <T as SoundService>::pcmbuf_set_low_latency(&inner, request).await 8576 7382 }; 8577 7383 Box::pin(fut) 8578 7384 } ··· 8602 7408 "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { 8603 7409 #[allow(non_camel_case_types)] 8604 7410 struct SystemSoundPlaySvc<T: SoundService>(pub Arc<T>); 8605 - impl< 8606 - T: SoundService, 8607 - > tonic::server::UnaryService<super::SystemSoundPlayRequest> 8608 - for SystemSoundPlaySvc<T> { 7411 + impl<T: SoundService> tonic::server::UnaryService<super::SystemSoundPlayRequest> 7412 + for SystemSoundPlaySvc<T> 7413 + { 8609 7414 type Response = super::SystemSoundPlayResponse; 8610 - type Future = BoxFuture< 8611 - tonic::Response<Self::Response>, 8612 - tonic::Status, 8613 - >; 7415 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8614 7416 fn call( 8615 7417 &mut self, 8616 7418 request: tonic::Request<super::SystemSoundPlayRequest>, 8617 7419 ) -> Self::Future { 8618 7420 let inner = Arc::clone(&self.0); 8619 7421 let fut = async move { 8620 - <T as SoundService>::system_sound_play(&inner, request) 8621 - .await 7422 + <T as SoundService>::system_sound_play(&inner, request).await 8622 7423 }; 8623 7424 Box::pin(fut) 8624 7425 } ··· 8648 7449 "/rockbox.v1alpha1.SoundService/KeyclickClick" => { 8649 7450 #[allow(non_camel_case_types)] 8650 7451 struct KeyclickClickSvc<T: SoundService>(pub Arc<T>); 8651 - impl< 8652 - T: SoundService, 8653 - > tonic::server::UnaryService<super::KeyclickClickRequest> 8654 - for KeyclickClickSvc<T> { 7452 + impl<T: SoundService> tonic::server::UnaryService<super::KeyclickClickRequest> 7453 + for KeyclickClickSvc<T> 7454 + { 8655 7455 type Response = super::KeyclickClickResponse; 8656 - type Future = BoxFuture< 8657 - tonic::Response<Self::Response>, 8658 - tonic::Status, 8659 - >; 7456 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8660 7457 fn call( 8661 7458 &mut self, 8662 7459 request: tonic::Request<super::KeyclickClickRequest>, ··· 8690 7487 }; 8691 7488 Box::pin(fut) 8692 7489 } 8693 - _ => { 8694 - Box::pin(async move { 8695 - let mut response = http::Response::new(empty_body()); 8696 - let headers = response.headers_mut(); 8697 - headers 8698 - .insert( 8699 - tonic::Status::GRPC_STATUS, 8700 - (tonic::Code::Unimplemented as i32).into(), 8701 - ); 8702 - headers 8703 - .insert( 8704 - http::header::CONTENT_TYPE, 8705 - tonic::metadata::GRPC_CONTENT_TYPE, 8706 - ); 8707 - Ok(response) 8708 - }) 8709 - } 7490 + _ => Box::pin(async move { 7491 + let mut response = http::Response::new(empty_body()); 7492 + let headers = response.headers_mut(); 7493 + headers.insert( 7494 + tonic::Status::GRPC_STATUS, 7495 + (tonic::Code::Unimplemented as i32).into(), 7496 + ); 7497 + headers.insert( 7498 + http::header::CONTENT_TYPE, 7499 + tonic::metadata::GRPC_CONTENT_TYPE, 7500 + ); 7501 + Ok(response) 7502 + }), 8710 7503 } 8711 7504 } 8712 7505 } ··· 8767 7560 dead_code, 8768 7561 missing_docs, 8769 7562 clippy::wildcard_imports, 8770 - clippy::let_unit_value, 7563 + clippy::let_unit_value 8771 7564 )] 8772 - use tonic::codegen::*; 8773 7565 use tonic::codegen::http::Uri; 7566 + use tonic::codegen::*; 8774 7567 #[derive(Debug, Clone)] 8775 7568 pub struct SystemServiceClient<T> { 8776 7569 inner: tonic::client::Grpc<T>, ··· 8814 7607 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 8815 7608 >, 8816 7609 >, 8817 - <T as tonic::codegen::Service< 8818 - http::Request<tonic::body::BoxBody>, 8819 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 7610 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 7611 + Into<StdError> + std::marker::Send + std::marker::Sync, 8820 7612 { 8821 7613 SystemServiceClient::new(InterceptedService::new(inner, interceptor)) 8822 7614 } ··· 8854 7646 pub async fn get_rockbox_version( 8855 7647 &mut self, 8856 7648 request: impl tonic::IntoRequest<super::GetRockboxVersionRequest>, 8857 - ) -> std::result::Result< 8858 - tonic::Response<super::GetRockboxVersionResponse>, 8859 - tonic::Status, 8860 - > { 8861 - self.inner 8862 - .ready() 8863 - .await 8864 - .map_err(|e| { 8865 - tonic::Status::unknown( 8866 - format!("Service was not ready: {}", e.into()), 8867 - ) 8868 - })?; 7649 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status> 7650 + { 7651 + self.inner.ready().await.map_err(|e| { 7652 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7653 + })?; 8869 7654 let codec = tonic::codec::ProstCodec::default(); 8870 7655 let path = http::uri::PathAndQuery::from_static( 8871 7656 "/rockbox.v1alpha1.SystemService/GetRockboxVersion", 8872 7657 ); 8873 7658 let mut req = request.into_request(); 8874 - req.extensions_mut() 8875 - .insert( 8876 - GrpcMethod::new( 8877 - "rockbox.v1alpha1.SystemService", 8878 - "GetRockboxVersion", 8879 - ), 8880 - ); 7659 + req.extensions_mut().insert(GrpcMethod::new( 7660 + "rockbox.v1alpha1.SystemService", 7661 + "GetRockboxVersion", 7662 + )); 8881 7663 self.inner.unary(req, path, codec).await 8882 7664 } 8883 7665 pub async fn get_global_status( 8884 7666 &mut self, 8885 7667 request: impl tonic::IntoRequest<super::GetGlobalStatusRequest>, 8886 - ) -> std::result::Result< 8887 - tonic::Response<super::GetGlobalStatusResponse>, 8888 - tonic::Status, 8889 - > { 8890 - self.inner 8891 - .ready() 8892 - .await 8893 - .map_err(|e| { 8894 - tonic::Status::unknown( 8895 - format!("Service was not ready: {}", e.into()), 8896 - ) 8897 - })?; 7668 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status> 7669 + { 7670 + self.inner.ready().await.map_err(|e| { 7671 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7672 + })?; 8898 7673 let codec = tonic::codec::ProstCodec::default(); 8899 7674 let path = http::uri::PathAndQuery::from_static( 8900 7675 "/rockbox.v1alpha1.SystemService/GetGlobalStatus", 8901 7676 ); 8902 7677 let mut req = request.into_request(); 8903 - req.extensions_mut() 8904 - .insert( 8905 - GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), 8906 - ); 7678 + req.extensions_mut().insert(GrpcMethod::new( 7679 + "rockbox.v1alpha1.SystemService", 7680 + "GetGlobalStatus", 7681 + )); 8907 7682 self.inner.unary(req, path, codec).await 8908 7683 } 8909 7684 } ··· 8915 7690 dead_code, 8916 7691 missing_docs, 8917 7692 clippy::wildcard_imports, 8918 - clippy::let_unit_value, 7693 + clippy::let_unit_value 8919 7694 )] 8920 7695 use tonic::codegen::*; 8921 7696 /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. ··· 8924 7699 async fn get_rockbox_version( 8925 7700 &self, 8926 7701 request: tonic::Request<super::GetRockboxVersionRequest>, 8927 - ) -> std::result::Result< 8928 - tonic::Response<super::GetRockboxVersionResponse>, 8929 - tonic::Status, 8930 - >; 7702 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status>; 8931 7703 async fn get_global_status( 8932 7704 &self, 8933 7705 request: tonic::Request<super::GetGlobalStatusRequest>, 8934 - ) -> std::result::Result< 8935 - tonic::Response<super::GetGlobalStatusResponse>, 8936 - tonic::Status, 8937 - >; 7706 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status>; 8938 7707 } 8939 7708 #[derive(Debug)] 8940 7709 pub struct SystemServiceServer<T> { ··· 8957 7726 max_encoding_message_size: None, 8958 7727 } 8959 7728 } 8960 - pub fn with_interceptor<F>( 8961 - inner: T, 8962 - interceptor: F, 8963 - ) -> InterceptedService<Self, F> 7729 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 8964 7730 where 8965 7731 F: tonic::service::Interceptor, 8966 7732 { ··· 9015 7781 "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { 9016 7782 #[allow(non_camel_case_types)] 9017 7783 struct GetRockboxVersionSvc<T: SystemService>(pub Arc<T>); 9018 - impl< 9019 - T: SystemService, 9020 - > tonic::server::UnaryService<super::GetRockboxVersionRequest> 9021 - for GetRockboxVersionSvc<T> { 7784 + impl<T: SystemService> 7785 + tonic::server::UnaryService<super::GetRockboxVersionRequest> 7786 + for GetRockboxVersionSvc<T> 7787 + { 9022 7788 type Response = super::GetRockboxVersionResponse; 9023 - type Future = BoxFuture< 9024 - tonic::Response<Self::Response>, 9025 - tonic::Status, 9026 - >; 7789 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9027 7790 fn call( 9028 7791 &mut self, 9029 7792 request: tonic::Request<super::GetRockboxVersionRequest>, 9030 7793 ) -> Self::Future { 9031 7794 let inner = Arc::clone(&self.0); 9032 7795 let fut = async move { 9033 - <T as SystemService>::get_rockbox_version(&inner, request) 9034 - .await 7796 + <T as SystemService>::get_rockbox_version(&inner, request).await 9035 7797 }; 9036 7798 Box::pin(fut) 9037 7799 } ··· 9061 7823 "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { 9062 7824 #[allow(non_camel_case_types)] 9063 7825 struct GetGlobalStatusSvc<T: SystemService>(pub Arc<T>); 9064 - impl< 9065 - T: SystemService, 9066 - > tonic::server::UnaryService<super::GetGlobalStatusRequest> 9067 - for GetGlobalStatusSvc<T> { 7826 + impl<T: SystemService> 7827 + tonic::server::UnaryService<super::GetGlobalStatusRequest> 7828 + for GetGlobalStatusSvc<T> 7829 + { 9068 7830 type Response = super::GetGlobalStatusResponse; 9069 - type Future = BoxFuture< 9070 - tonic::Response<Self::Response>, 9071 - tonic::Status, 9072 - >; 7831 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9073 7832 fn call( 9074 7833 &mut self, 9075 7834 request: tonic::Request<super::GetGlobalStatusRequest>, 9076 7835 ) -> Self::Future { 9077 7836 let inner = Arc::clone(&self.0); 9078 7837 let fut = async move { 9079 - <T as SystemService>::get_global_status(&inner, request) 9080 - .await 7838 + <T as SystemService>::get_global_status(&inner, request).await 9081 7839 }; 9082 7840 Box::pin(fut) 9083 7841 } ··· 9104 7862 }; 9105 7863 Box::pin(fut) 9106 7864 } 9107 - _ => { 9108 - Box::pin(async move { 9109 - let mut response = http::Response::new(empty_body()); 9110 - let headers = response.headers_mut(); 9111 - headers 9112 - .insert( 9113 - tonic::Status::GRPC_STATUS, 9114 - (tonic::Code::Unimplemented as i32).into(), 9115 - ); 9116 - headers 9117 - .insert( 9118 - http::header::CONTENT_TYPE, 9119 - tonic::metadata::GRPC_CONTENT_TYPE, 9120 - ); 9121 - Ok(response) 9122 - }) 9123 - } 7865 + _ => Box::pin(async move { 7866 + let mut response = http::Response::new(empty_body()); 7867 + let headers = response.headers_mut(); 7868 + headers.insert( 7869 + tonic::Status::GRPC_STATUS, 7870 + (tonic::Code::Unimplemented as i32).into(), 7871 + ); 7872 + headers.insert( 7873 + http::header::CONTENT_TYPE, 7874 + tonic::metadata::GRPC_CONTENT_TYPE, 7875 + ); 7876 + Ok(response) 7877 + }), 9124 7878 } 9125 7879 } 9126 7880 }