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.

Add clear command and tidy gRPC client code

Create 'clear' CLI subcommand to remove Rockbox playlist and resume
files in ~/.config/rockbox.org (.playlist_control,
.playlist_control.old, .resume.cfg, .resume.cfg.new). Also apply
formatting and minor refactors to generated gRPC client/server code in
cli/src/api/*.

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

This is a binary file and will not be displayed.