From 762ff3f47864ec557d5de355bf9f0b368df453b0 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Wed, 24 Dec 2025 22:03:36 +0300 Subject: [PATCH] Add rockbox-controls crate and simplify start Make media controls a standalone crate at crates/controls and exclude it from the workspace. Remove the macOS-only path dependency from the CLI and replace platform-specific start logic with a unified rockboxd spawn; add a small binary to run the media controls. --- Cargo.lock | 3 + Cargo.toml | 2 +- cli/Cargo.toml | 3 - cli/src/api/rockbox.v1alpha1.rs | 3746 ++++++++++----- cli/src/cmd/start.rs | 58 +- crates/controls/Cargo.lock | 4581 +++++++++++++++++++ crates/controls/Cargo.toml | 4 - crates/controls/src/api/rockbox.v1alpha1.rs | 3746 ++++++++++----- crates/controls/src/main.rs | 8 + crates/rpc/src/api/rockbox.v1alpha1.rs | 3965 ++++++++++------ gtk/src/api/rockbox.v1alpha1.rs | 3652 ++++++++++----- 11 files changed, 14708 insertions(+), 5060 deletions(-) create mode 100644 crates/controls/Cargo.lock create mode 100644 crates/controls/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index c9331989a9..5a1c754494 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8952,8 +8952,10 @@ dependencies = [ "lofty", "md5", "owo-colors 4.1.0", + "reqwest", "rockbox-sys", "serde", + "serde_json", "sqlx", "tokio", ] @@ -9064,6 +9066,7 @@ name = "rockbox-search" version = "0.1.0" dependencies = [ "anyhow", + "regex", "rockbox-library", "serde", "tantivy", diff --git a/Cargo.toml b/Cargo.toml index 2a1b50a2e7..c0c7577296 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ "webui", ] resolver = "2" -exclude = ["rmpc"] +exclude = ["rmpc", "crates/controls"] [workspace.package] authors = ["Tsiry Sandratraina { inner: tonic::client::Grpc, @@ -90,8 +90,9 @@ pub mod browse_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -129,20 +130,27 @@ pub mod browse_service_client { pub async fn tree_get_entries( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.BrowseService/TreeGetEntries", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.BrowseService", - "TreeGetEntries", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), + ); self.inner.unary(req, path, codec).await } } @@ -154,7 +162,7 @@ pub mod browse_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. @@ -163,7 +171,10 @@ pub mod browse_service_server { async fn tree_get_entries( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct BrowseServiceServer { @@ -186,7 +197,10 @@ pub mod browse_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -241,18 +255,23 @@ pub mod browse_service_server { "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { #[allow(non_camel_case_types)] struct TreeGetEntriesSvc(pub Arc); - impl tonic::server::UnaryService - for TreeGetEntriesSvc - { + impl< + T: BrowseService, + > tonic::server::UnaryService + for TreeGetEntriesSvc { type Response = super::TreeGetEntriesResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::tree_get_entries(&inner, request).await + ::tree_get_entries(&inner, request) + .await }; Box::pin(fut) } @@ -279,19 +298,23 @@ pub mod browse_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -527,10 +550,10 @@ pub mod library_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct LibraryServiceClient { inner: tonic::client::Grpc, @@ -574,8 +597,9 @@ pub mod library_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -613,245 +637,343 @@ pub mod library_service_client { pub async fn get_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbums", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbums", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); self.inner.unary(req, path, codec).await } pub async fn get_artists( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtists", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtists", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), + ); self.inner.unary(req, path, codec).await } pub async fn get_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTracks", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTracks", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); self.inner.unary(req, path, codec).await } pub async fn get_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); self.inner.unary(req, path, codec).await } pub async fn get_artist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtist", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtist", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); self.inner.unary(req, path, codec).await } pub async fn get_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); self.inner.unary(req, path, codec).await } pub async fn like_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); self.inner.unary(req, path, codec).await } pub async fn unlike_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn like_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); self.inner.unary(req, path, codec).await } pub async fn unlike_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedAlbums", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), + ); self.inner.unary(req, path, codec).await } pub async fn scan_library( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/ScanLibrary", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "ScanLibrary", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), + ); self.inner.unary(req, path, codec).await } pub async fn search( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/Search", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); @@ -866,7 +988,7 @@ pub mod library_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. @@ -875,55 +997,94 @@ pub mod library_service_server { async fn get_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artists( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn scan_library( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn search( &self, request: tonic::Request, @@ -950,7 +1111,10 @@ pub mod library_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1005,9 +1169,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbums" => { #[allow(non_camel_case_types)] struct GetAlbumsSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumsSvc { type Response = super::GetAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1044,9 +1214,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtists" => { #[allow(non_camel_case_types)] struct GetArtistsSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistsSvc { type Response = super::GetArtistsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1083,9 +1259,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTracks" => { #[allow(non_camel_case_types)] struct GetTracksSvc(pub Arc); - impl tonic::server::UnaryService for GetTracksSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTracksSvc { type Response = super::GetTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1122,9 +1304,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbum" => { #[allow(non_camel_case_types)] struct GetAlbumSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumSvc { type Response = super::GetAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1161,9 +1349,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtist" => { #[allow(non_camel_case_types)] struct GetArtistSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistSvc { type Response = super::GetArtistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1200,9 +1394,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTrack" => { #[allow(non_camel_case_types)] struct GetTrackSvc(pub Arc); - impl tonic::server::UnaryService for GetTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTrackSvc { type Response = super::GetTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1239,9 +1439,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeTrack" => { #[allow(non_camel_case_types)] struct LikeTrackSvc(pub Arc); - impl tonic::server::UnaryService for LikeTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeTrackSvc { type Response = super::LikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1278,11 +1484,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { #[allow(non_camel_case_types)] struct UnlikeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeTrackSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeTrackSvc { type Response = super::UnlikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1319,9 +1529,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { #[allow(non_camel_case_types)] struct LikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService for LikeAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeAlbumSvc { type Response = super::LikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1358,11 +1574,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { #[allow(non_camel_case_types)] struct UnlikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeAlbumSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeAlbumSvc { type Response = super::UnlikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1399,19 +1619,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { #[allow(non_camel_case_types)] struct GetLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedTracksSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedTracksSvc { type Response = super::GetLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_tracks(&inner, request).await + ::get_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -1441,19 +1665,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { #[allow(non_camel_case_types)] struct GetLikedAlbumsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedAlbumsSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedAlbumsSvc { type Response = super::GetLikedAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_albums(&inner, request).await + ::get_liked_albums(&inner, request) + .await }; Box::pin(fut) } @@ -1483,11 +1711,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { #[allow(non_camel_case_types)] struct ScanLibrarySvc(pub Arc); - impl tonic::server::UnaryService - for ScanLibrarySvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for ScanLibrarySvc { type Response = super::ScanLibraryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1524,16 +1756,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/Search" => { #[allow(non_camel_case_types)] struct SearchSvc(pub Arc); - impl tonic::server::UnaryService for SearchSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for SearchSvc { type Response = super::SearchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::search(&inner, request).await }; + let fut = async move { + ::search(&inner, request).await + }; Box::pin(fut) } } @@ -1559,19 +1798,23 @@ pub mod library_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -1600,10 +1843,10 @@ pub mod metadata_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct MetadataServiceClient { inner: tonic::client::Grpc, @@ -1647,8 +1890,9 @@ pub mod metadata_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -1692,7 +1936,7 @@ pub mod metadata_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. @@ -1719,7 +1963,10 @@ pub mod metadata_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1771,19 +2018,23 @@ pub mod metadata_service_server { } fn call(&mut self, req: http::Request) -> Self::Future { match req.uri().path() { - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -2067,10 +2318,10 @@ pub mod playback_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaybackServiceClient { inner: tonic::client::Grpc, @@ -2114,8 +2365,9 @@ pub mod playback_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -2154,12 +2406,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Play", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); @@ -2169,12 +2427,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Pause", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); @@ -2183,49 +2447,66 @@ pub mod playback_service_client { pub async fn play_or_pause( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayOrPause", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayOrPause", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), + ); self.inner.unary(req, path, codec).await } pub async fn resume( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Resume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Resume", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); self.inner.unary(req, path, codec).await } pub async fn next( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Next", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); @@ -2234,293 +2515,426 @@ pub mod playback_service_client { pub async fn previous( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Previous", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Previous", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); self.inner.unary(req, path, codec).await } pub async fn fast_forward_rewind( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FastForwardRewind", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FastForwardRewind", + ), + ); self.inner.unary(req, path, codec).await } pub async fn status( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Status", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Status", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); self.inner.unary(req, path, codec).await } pub async fn current_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/CurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "CurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn next_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/NextTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "NextTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn flush_and_reload_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FlushAndReloadTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FlushAndReloadTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_file_position( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/GetFilePosition", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "GetFilePosition", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "GetFilePosition", + ), + ); self.inner.unary(req, path, codec).await } pub async fn hard_stop( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/HardStop", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "HardStop", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); self.inner.unary(req, path, codec).await } pub async fn play_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn play_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn play_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), + ); self.inner.unary(req, path, codec).await } pub async fn play_music_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayMusicDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayMusicDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn play_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayLikedTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn stream_current_track( @@ -2530,18 +2944,26 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamCurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "StreamCurrentTrack", + ), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_status( @@ -2551,18 +2973,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_playlist( @@ -2572,18 +2999,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), + ); self.inner.server_streaming(req, path, codec).await } } @@ -2595,7 +3027,7 @@ pub mod playback_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. @@ -2612,7 +3044,10 @@ pub mod playback_service_server { async fn play_or_pause( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume( &self, request: tonic::Request, @@ -2624,11 +3059,17 @@ pub mod playback_service_server { async fn previous( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn fast_forward_rewind( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn status( &self, request: tonic::Request, @@ -2636,82 +3077,133 @@ pub mod playback_service_server { async fn current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn next_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn flush_and_reload_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_file_position( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn hard_stop( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_music_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamCurrentTrack method. type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamStatus method. type StreamStatusStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamPlaylist method. type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaybackServiceServer { @@ -2734,7 +3226,10 @@ pub mod playback_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -2789,16 +3284,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Play" => { #[allow(non_camel_case_types)] struct PlaySvc(pub Arc); - impl tonic::server::UnaryService for PlaySvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PlaySvc { type Response = super::PlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::play(&inner, request).await }; + let fut = async move { + ::play(&inner, request).await + }; Box::pin(fut) } } @@ -2827,16 +3328,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Pause" => { #[allow(non_camel_case_types)] struct PauseSvc(pub Arc); - impl tonic::server::UnaryService for PauseSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PauseSvc { type Response = super::PauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::pause(&inner, request).await }; + let fut = async move { + ::pause(&inner, request).await + }; Box::pin(fut) } } @@ -2865,11 +3372,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { #[allow(non_camel_case_types)] struct PlayOrPauseSvc(pub Arc); - impl tonic::server::UnaryService - for PlayOrPauseSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayOrPauseSvc { type Response = super::PlayOrPauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2906,9 +3417,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Resume" => { #[allow(non_camel_case_types)] struct ResumeSvc(pub Arc); - impl tonic::server::UnaryService for ResumeSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for ResumeSvc { type Response = super::ResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2945,16 +3462,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Next" => { #[allow(non_camel_case_types)] struct NextSvc(pub Arc); - impl tonic::server::UnaryService for NextSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for NextSvc { type Response = super::NextResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::next(&inner, request).await }; + let fut = async move { + ::next(&inner, request).await + }; Box::pin(fut) } } @@ -2983,9 +3506,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Previous" => { #[allow(non_camel_case_types)] struct PreviousSvc(pub Arc); - impl tonic::server::UnaryService for PreviousSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PreviousSvc { type Response = super::PreviousResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3022,19 +3551,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { #[allow(non_camel_case_types)] struct FastForwardRewindSvc(pub Arc); - impl - tonic::server::UnaryService - for FastForwardRewindSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FastForwardRewindSvc { type Response = super::FastForwardRewindResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::fast_forward_rewind(&inner, request).await + ::fast_forward_rewind(&inner, request) + .await }; Box::pin(fut) } @@ -3064,9 +3597,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Status" => { #[allow(non_camel_case_types)] struct StatusSvc(pub Arc); - impl tonic::server::UnaryService for StatusSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for StatusSvc { type Response = super::StatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3103,11 +3642,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { #[allow(non_camel_case_types)] struct CurrentTrackSvc(pub Arc); - impl tonic::server::UnaryService - for CurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for CurrentTrackSvc { type Response = super::CurrentTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3144,9 +3687,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/NextTrack" => { #[allow(non_camel_case_types)] struct NextTrackSvc(pub Arc); - impl tonic::server::UnaryService for NextTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for NextTrackSvc { type Response = super::NextTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3183,19 +3732,25 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { #[allow(non_camel_case_types)] struct FlushAndReloadTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for FlushAndReloadTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FlushAndReloadTracksSvc { type Response = super::FlushAndReloadTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::flush_and_reload_tracks(&inner, request) + ::flush_and_reload_tracks( + &inner, + request, + ) .await }; Box::pin(fut) @@ -3226,19 +3781,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { #[allow(non_camel_case_types)] struct GetFilePositionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFilePositionSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for GetFilePositionSvc { type Response = super::GetFilePositionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_file_position(&inner, request).await + ::get_file_position(&inner, request) + .await }; Box::pin(fut) } @@ -3268,9 +3827,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/HardStop" => { #[allow(non_camel_case_types)] struct HardStopSvc(pub Arc); - impl tonic::server::UnaryService for HardStopSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for HardStopSvc { type Response = super::HardStopResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3307,9 +3872,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { #[allow(non_camel_case_types)] struct PlayAlbumSvc(pub Arc); - impl tonic::server::UnaryService for PlayAlbumSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAlbumSvc { type Response = super::PlayAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3346,19 +3917,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { #[allow(non_camel_case_types)] struct PlayArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayArtistTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayArtistTracksSvc { type Response = super::PlayArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_artist_tracks(&inner, request).await + ::play_artist_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3388,11 +3963,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { #[allow(non_camel_case_types)] struct PlayPlaylistSvc(pub Arc); - impl tonic::server::UnaryService - for PlayPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayPlaylistSvc { type Response = super::PlayPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3429,19 +4008,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { #[allow(non_camel_case_types)] struct PlayDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayDirectorySvc { type Response = super::PlayDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_directory(&inner, request).await + ::play_directory(&inner, request) + .await }; Box::pin(fut) } @@ -3471,19 +4054,26 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory" => { #[allow(non_camel_case_types)] struct PlayMusicDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayMusicDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayMusicDirectorySvc { type Response = super::PlayMusicDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_music_directory(&inner, request).await + ::play_music_directory( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -3513,9 +4103,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { #[allow(non_camel_case_types)] struct PlayTrackSvc(pub Arc); - impl tonic::server::UnaryService for PlayTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayTrackSvc { type Response = super::PlayTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3552,19 +4148,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { #[allow(non_camel_case_types)] struct PlayLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayLikedTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayLikedTracksSvc { type Response = super::PlayLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_liked_tracks(&inner, request).await + ::play_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3594,19 +4194,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { #[allow(non_camel_case_types)] struct PlayAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayAllTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAllTracksSvc { type Response = super::PlayAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_all_tracks(&inner, request).await + ::play_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3636,21 +4240,28 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { #[allow(non_camel_case_types)] struct StreamCurrentTrackSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamCurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService< + super::StreamCurrentTrackRequest, + > for StreamCurrentTrackSvc { type Response = super::CurrentTrackResponse; type ResponseStream = T::StreamCurrentTrackStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_current_track(&inner, request).await + ::stream_current_track( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -3680,14 +4291,16 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { #[allow(non_camel_case_types)] struct StreamStatusSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamStatusSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamStatusSvc { type Response = super::StatusResponse; type ResponseStream = T::StreamStatusStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3724,21 +4337,24 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { #[allow(non_camel_case_types)] struct StreamPlaylistSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamPlaylistSvc { type Response = super::PlaylistResponse; type ResponseStream = T::StreamPlaylistStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_playlist(&inner, request).await + ::stream_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -3765,19 +4381,23 @@ pub mod playback_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -3984,10 +4604,10 @@ pub mod playlist_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaylistServiceClient { inner: tonic::client::Grpc, @@ -4031,8 +4651,9 @@ pub mod playlist_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -4070,182 +4691,251 @@ pub mod playlist_service_client { pub async fn get_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetCurrent", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn get_resume_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetResumeInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_track_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetTrackInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_first_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetFirstIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), + ); self.inner.unary(req, path, codec).await } pub async fn get_display_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetDisplayIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "GetDisplayIndex", + ), + ); self.inner.unary(req, path, codec).await } pub async fn amount( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Amount", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "Amount", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); self.inner.unary(req, path, codec).await } pub async fn playlist_resume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/PlaylistResume", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "PlaylistResume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), + ); self.inner.unary(req, path, codec).await } pub async fn resume_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ResumeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ResumeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn set_modified( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/SetModified", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "SetModified", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), + ); self.inner.unary(req, path, codec).await } pub async fn start( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Start", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); @@ -4255,12 +4945,18 @@ pub mod playlist_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Sync", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); @@ -4269,172 +4965,247 @@ pub mod playlist_service_client { pub async fn remove_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "RemoveAllTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn remove_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn create_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "CreatePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn insert_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn shuffle_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ShufflePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "ShufflePlaylist", + ), + ); self.inner.unary(req, path, codec).await } } @@ -4446,7 +5217,7 @@ pub mod playlist_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. @@ -4455,23 +5226,38 @@ pub mod playlist_service_server { async fn get_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_resume_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_first_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_display_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn amount( &self, request: tonic::Request, @@ -4479,15 +5265,24 @@ pub mod playlist_service_server { async fn playlist_resume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_modified( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn start( &self, request: tonic::Request, @@ -4499,39 +5294,66 @@ pub mod playlist_service_server { async fn remove_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn remove_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn create_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn shuffle_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaylistServiceServer { @@ -4554,7 +5376,10 @@ pub mod playlist_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -4609,11 +5434,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { #[allow(non_camel_case_types)] struct GetCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for GetCurrentSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetCurrentSvc { type Response = super::GetCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4650,19 +5479,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { #[allow(non_camel_case_types)] struct GetResumeInfoSvc(pub Arc); - impl - tonic::server::UnaryService - for GetResumeInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetResumeInfoSvc { type Response = super::GetResumeInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_resume_info(&inner, request).await + ::get_resume_info(&inner, request) + .await }; Box::pin(fut) } @@ -4692,18 +5525,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { #[allow(non_camel_case_types)] struct GetTrackInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GetTrackInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetTrackInfoSvc { type Response = super::GetTrackInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_track_info(&inner, request).await + ::get_track_info(&inner, request) + .await }; Box::pin(fut) } @@ -4733,19 +5571,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { #[allow(non_camel_case_types)] struct GetFirstIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFirstIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetFirstIndexSvc { type Response = super::GetFirstIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_first_index(&inner, request).await + ::get_first_index(&inner, request) + .await }; Box::pin(fut) } @@ -4775,19 +5617,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { #[allow(non_camel_case_types)] struct GetDisplayIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetDisplayIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetDisplayIndexSvc { type Response = super::GetDisplayIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_display_index(&inner, request).await + ::get_display_index(&inner, request) + .await }; Box::pin(fut) } @@ -4817,9 +5663,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Amount" => { #[allow(non_camel_case_types)] struct AmountSvc(pub Arc); - impl tonic::server::UnaryService for AmountSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for AmountSvc { type Response = super::AmountResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4856,19 +5708,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { #[allow(non_camel_case_types)] struct PlaylistResumeSvc(pub Arc); - impl - tonic::server::UnaryService - for PlaylistResumeSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for PlaylistResumeSvc { type Response = super::PlaylistResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::playlist_resume(&inner, request).await + ::playlist_resume(&inner, request) + .await }; Box::pin(fut) } @@ -4898,11 +5754,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { #[allow(non_camel_case_types)] struct ResumeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for ResumeTrackSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ResumeTrackSvc { type Response = super::ResumeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4939,11 +5799,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/SetModified" => { #[allow(non_camel_case_types)] struct SetModifiedSvc(pub Arc); - impl tonic::server::UnaryService - for SetModifiedSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for SetModifiedSvc { type Response = super::SetModifiedResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4980,16 +5844,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Start" => { #[allow(non_camel_case_types)] struct StartSvc(pub Arc); - impl tonic::server::UnaryService for StartSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for StartSvc { type Response = super::StartResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::start(&inner, request).await }; + let fut = async move { + ::start(&inner, request).await + }; Box::pin(fut) } } @@ -5018,16 +5888,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Sync" => { #[allow(non_camel_case_types)] struct SyncSvc(pub Arc); - impl tonic::server::UnaryService for SyncSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for SyncSvc { type Response = super::SyncResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::sync(&inner, request).await }; + let fut = async move { + ::sync(&inner, request).await + }; Box::pin(fut) } } @@ -5056,19 +5932,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { #[allow(non_camel_case_types)] struct RemoveAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for RemoveAllTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveAllTracksSvc { type Response = super::RemoveAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::remove_all_tracks(&inner, request).await + ::remove_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -5098,11 +5978,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { #[allow(non_camel_case_types)] struct RemoveTracksSvc(pub Arc); - impl tonic::server::UnaryService - for RemoveTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveTracksSvc { type Response = super::RemoveTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5139,19 +6023,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { #[allow(non_camel_case_types)] struct CreatePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for CreatePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for CreatePlaylistSvc { type Response = super::CreatePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::create_playlist(&inner, request).await + ::create_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5181,11 +6069,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { #[allow(non_camel_case_types)] struct InsertTracksSvc(pub Arc); - impl tonic::server::UnaryService - for InsertTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertTracksSvc { type Response = super::InsertTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5222,19 +6114,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { #[allow(non_camel_case_types)] struct InsertDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for InsertDirectorySvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertDirectorySvc { type Response = super::InsertDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_directory(&inner, request).await + ::insert_directory(&inner, request) + .await }; Box::pin(fut) } @@ -5264,19 +6160,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { #[allow(non_camel_case_types)] struct InsertPlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertPlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertPlaylistSvc { type Response = super::InsertPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_playlist(&inner, request).await + ::insert_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5306,11 +6206,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { #[allow(non_camel_case_types)] struct InsertAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for InsertAlbumSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertAlbumSvc { type Response = super::InsertAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5347,19 +6251,26 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { #[allow(non_camel_case_types)] struct InsertArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertArtistTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertArtistTracksSvc { type Response = super::InsertArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_artist_tracks(&inner, request).await + ::insert_artist_tracks( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -5389,19 +6300,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { #[allow(non_camel_case_types)] struct ShufflePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for ShufflePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ShufflePlaylistSvc { type Response = super::ShufflePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::shuffle_playlist(&inner, request).await + ::shuffle_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5428,19 +6343,23 @@ pub mod playlist_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -5948,10 +6867,10 @@ pub mod settings_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SettingsServiceClient { inner: tonic::client::Grpc, @@ -5995,8 +6914,9 @@ pub mod settings_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -6034,58 +6954,85 @@ pub mod settings_service_client { pub async fn get_settings_list( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetSettingsList", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetSettingsList", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetSettingsList", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetGlobalSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetGlobalSettings", + ), + ); self.inner.unary(req, path, codec).await } pub async fn save_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/SaveSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "SaveSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), + ); self.inner.unary(req, path, codec).await } } @@ -6097,7 +7044,7 @@ pub mod settings_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. @@ -6106,15 +7053,24 @@ pub mod settings_service_server { async fn get_settings_list( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn save_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SettingsServiceServer { @@ -6137,7 +7093,10 @@ pub mod settings_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6192,19 +7151,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { #[allow(non_camel_case_types)] struct GetSettingsListSvc(pub Arc); - impl - tonic::server::UnaryService - for GetSettingsListSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetSettingsListSvc { type Response = super::GetSettingsListResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_settings_list(&inner, request).await + ::get_settings_list(&inner, request) + .await }; Box::pin(fut) } @@ -6234,19 +7197,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { #[allow(non_camel_case_types)] struct GetGlobalSettingsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetGlobalSettingsSvc { type Response = super::GetGlobalSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_settings(&inner, request).await + ::get_global_settings(&inner, request) + .await }; Box::pin(fut) } @@ -6276,11 +7243,15 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/SaveSettings" => { #[allow(non_camel_case_types)] struct SaveSettingsSvc(pub Arc); - impl tonic::server::UnaryService - for SaveSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for SaveSettingsSvc { type Response = super::SaveSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6314,19 +7285,23 @@ pub mod settings_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -6484,10 +7459,10 @@ pub mod sound_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SoundServiceClient { inner: tonic::client::Grpc, @@ -6531,8 +7506,9 @@ pub mod sound_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SoundServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -6570,31 +7546,48 @@ pub mod sound_service_client { pub async fn adjust_volume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/AdjustVolume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "AdjustVolume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_set( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundSet", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); @@ -6603,49 +7596,74 @@ pub mod sound_service_client { pub async fn sound_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundCurrent", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_default( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundDefault", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundDefault", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_min( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMin", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); @@ -6654,13 +7672,22 @@ pub mod sound_service_client { pub async fn sound_max( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMax", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); @@ -6669,49 +7696,72 @@ pub mod sound_service_client { pub async fn sound_unit( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundUnit", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundUnit", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); self.inner.unary(req, path, codec).await } pub async fn sound_val2_phys( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SoundVal2Phys", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundVal2Phys", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), + ); self.inner.unary(req, path, codec).await } pub async fn get_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/GetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); @@ -6720,13 +7770,22 @@ pub mod sound_service_client { pub async fn set_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); @@ -6735,13 +7794,22 @@ pub mod sound_service_client { pub async fn beep_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/BeepPlay", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); @@ -6750,76 +7818,106 @@ pub mod sound_service_client { pub async fn pcmbuf_fade( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/PcmbufFade", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufFade", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); self.inner.unary(req, path, codec).await } pub async fn pcmbuf_set_low_latency( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufSetLowLatency", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SoundService", + "PcmbufSetLowLatency", + ), + ); self.inner.unary(req, path, codec).await } pub async fn system_sound_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SystemSoundPlay", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SystemSoundPlay", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), + ); self.inner.unary(req, path, codec).await } pub async fn keyclick_click( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/KeyclickClick", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "KeyclickClick", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), + ); self.inner.unary(req, path, codec).await } } @@ -6831,7 +7929,7 @@ pub mod sound_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. @@ -6840,63 +7938,108 @@ pub mod sound_service_server { async fn adjust_volume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_set( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_default( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_min( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_max( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_unit( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_val2_phys( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn beep_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_fade( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_set_low_latency( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn system_sound_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn keyclick_click( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SoundServiceServer { @@ -6919,7 +8062,10 @@ pub mod sound_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6974,11 +8120,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/AdjustVolume" => { #[allow(non_camel_case_types)] struct AdjustVolumeSvc(pub Arc); - impl tonic::server::UnaryService - for AdjustVolumeSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for AdjustVolumeSvc { type Response = super::AdjustVolumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7015,9 +8165,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundSet" => { #[allow(non_camel_case_types)] struct SoundSetSvc(pub Arc); - impl tonic::server::UnaryService for SoundSetSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundSetSvc { type Response = super::SoundSetResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7054,11 +8210,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundCurrent" => { #[allow(non_camel_case_types)] struct SoundCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for SoundCurrentSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundCurrentSvc { type Response = super::SoundCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7095,11 +8255,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundDefault" => { #[allow(non_camel_case_types)] struct SoundDefaultSvc(pub Arc); - impl tonic::server::UnaryService - for SoundDefaultSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundDefaultSvc { type Response = super::SoundDefaultResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7136,9 +8300,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMin" => { #[allow(non_camel_case_types)] struct SoundMinSvc(pub Arc); - impl tonic::server::UnaryService for SoundMinSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMinSvc { type Response = super::SoundMinResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7175,9 +8345,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMax" => { #[allow(non_camel_case_types)] struct SoundMaxSvc(pub Arc); - impl tonic::server::UnaryService for SoundMaxSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMaxSvc { type Response = super::SoundMaxResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7214,9 +8390,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundUnit" => { #[allow(non_camel_case_types)] struct SoundUnitSvc(pub Arc); - impl tonic::server::UnaryService for SoundUnitSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundUnitSvc { type Response = super::SoundUnitResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7253,11 +8435,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { #[allow(non_camel_case_types)] struct SoundVal2PhysSvc(pub Arc); - impl tonic::server::UnaryService - for SoundVal2PhysSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundVal2PhysSvc { type Response = super::SoundVal2PhysResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7294,9 +8480,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/GetPitch" => { #[allow(non_camel_case_types)] struct GetPitchSvc(pub Arc); - impl tonic::server::UnaryService for GetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for GetPitchSvc { type Response = super::GetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7333,9 +8525,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SetPitch" => { #[allow(non_camel_case_types)] struct SetPitchSvc(pub Arc); - impl tonic::server::UnaryService for SetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SetPitchSvc { type Response = super::SetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7372,9 +8570,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/BeepPlay" => { #[allow(non_camel_case_types)] struct BeepPlaySvc(pub Arc); - impl tonic::server::UnaryService for BeepPlaySvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for BeepPlaySvc { type Response = super::BeepPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7411,9 +8615,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufFade" => { #[allow(non_camel_case_types)] struct PcmbufFadeSvc(pub Arc); - impl tonic::server::UnaryService for PcmbufFadeSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufFadeSvc { type Response = super::PcmbufFadeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7450,19 +8660,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { #[allow(non_camel_case_types)] struct PcmbufSetLowLatencySvc(pub Arc); - impl - tonic::server::UnaryService - for PcmbufSetLowLatencySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufSetLowLatencySvc { type Response = super::PcmbufSetLowLatencyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::pcmbuf_set_low_latency(&inner, request).await + ::pcmbuf_set_low_latency(&inner, request) + .await }; Box::pin(fut) } @@ -7492,18 +8706,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { #[allow(non_camel_case_types)] struct SystemSoundPlaySvc(pub Arc); - impl tonic::server::UnaryService - for SystemSoundPlaySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SystemSoundPlaySvc { type Response = super::SystemSoundPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::system_sound_play(&inner, request).await + ::system_sound_play(&inner, request) + .await }; Box::pin(fut) } @@ -7533,11 +8752,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/KeyclickClick" => { #[allow(non_camel_case_types)] struct KeyclickClickSvc(pub Arc); - impl tonic::server::UnaryService - for KeyclickClickSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for KeyclickClickSvc { type Response = super::KeyclickClickResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7571,19 +8794,23 @@ pub mod sound_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -7644,10 +8871,10 @@ pub mod system_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SystemServiceClient { inner: tonic::client::Grpc, @@ -7691,8 +8918,9 @@ pub mod system_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SystemServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -7730,39 +8958,56 @@ pub mod system_service_client { pub async fn get_rockbox_version( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetRockboxVersion", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetRockboxVersion", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SystemService", + "GetRockboxVersion", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_status( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetGlobalStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetGlobalStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), + ); self.inner.unary(req, path, codec).await } } @@ -7774,7 +9019,7 @@ pub mod system_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. @@ -7783,11 +9028,17 @@ pub mod system_service_server { async fn get_rockbox_version( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SystemServiceServer { @@ -7810,7 +9061,10 @@ pub mod system_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -7865,19 +9119,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { #[allow(non_camel_case_types)] struct GetRockboxVersionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetRockboxVersionSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetRockboxVersionSvc { type Response = super::GetRockboxVersionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_rockbox_version(&inner, request).await + ::get_rockbox_version(&inner, request) + .await }; Box::pin(fut) } @@ -7907,19 +9165,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { #[allow(non_camel_case_types)] struct GetGlobalStatusSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalStatusSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetGlobalStatusSvc { type Response = super::GetGlobalStatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_status(&inner, request).await + ::get_global_status(&inner, request) + .await }; Box::pin(fut) } @@ -7946,19 +9208,23 @@ pub mod system_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } diff --git a/cli/src/cmd/start.rs b/cli/src/cmd/start.rs index 74c95f55b7..b2516934be 100644 --- a/cli/src/cmd/start.rs +++ b/cli/src/cmd/start.rs @@ -24,52 +24,18 @@ pub fn start(with_ui: bool) -> Result<(), Error> { match wait_for_rockboxd(port.parse()?, Some(1)) { Ok(_) => {} Err(_) => { - #[cfg(target_os = "linux")] - { - let mut child = Command::new("rockboxd") - .env("SDL_VIDEODRIVER", video_driver) - .env("ROCKBOX_PORT", port) - .env("ROCKBOX_GRAPHQL_PORT", ui_port) - .env("ROCKBOX_TCP_PORT", http_port) - .env( - "ROCKBOX_UPDATE_LIBRARY", - env::var("ROCKBOX_UPDATE_LIBRARY").unwrap_or("0".to_string()), - ) - .spawn()?; - - child.wait()?; - } - #[cfg(target_os = "macos")] - { - use std::thread; - - thread::spawn(move || { - let mut child = Command::new("rockboxd") - .env("SDL_VIDEODRIVER", video_driver) - .env("ROCKBOX_PORT", port) - .env("ROCKBOX_GRAPHQL_PORT", ui_port) - .env("ROCKBOX_TCP_PORT", http_port) - .env( - "ROCKBOX_UPDATE_LIBRARY", - env::var("ROCKBOX_UPDATE_LIBRARY").unwrap_or("0".to_string()), - ) - .spawn()?; - - child.wait()?; - Ok::<(), Error>(()) - }); - - let port = env::var("ROCKBOX_PORT").unwrap_or_else(|_| "6061".to_string()); - wait_for_rockboxd(port.parse()?, None)?; - - // On macOS, EventLoop must be created on the main thread. - match rockbox_controls::run_media_controls() { - Ok(_) => {} - Err(e) => { - eprintln!("Error starting rockbox controls: {}", e); - } - } - } + let mut child = Command::new("rockboxd") + .env("SDL_VIDEODRIVER", video_driver) + .env("ROCKBOX_PORT", port) + .env("ROCKBOX_GRAPHQL_PORT", ui_port) + .env("ROCKBOX_TCP_PORT", http_port) + .env( + "ROCKBOX_UPDATE_LIBRARY", + env::var("ROCKBOX_UPDATE_LIBRARY").unwrap_or("0".to_string()), + ) + .spawn()?; + + child.wait()?; } }; Ok(()) diff --git a/crates/controls/Cargo.lock b/crates/controls/Cargo.lock new file mode 100644 index 0000000000..0926ac9aff --- /dev/null +++ b/crates/controls/Cargo.lock @@ -0,0 +1,4581 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.10.0", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 1.0.69", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower 0.5.2", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base36" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c26bddc1271f7112e5ec797e8eeba6de2de211c1488e506b9500196dbf77c5" +dependencies = [ + "base-x", + "failure", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytemuck" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.10.0", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.2.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cocoa" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.22.3", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "libc", + "objc", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cuid" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fe01ebbba358b9af4850d1a2b16d45f765137398e34134643790f19dc935a0" +dependencies = [ + "base36", + "cuid-util", + "cuid2", + "hostname", + "num", + "once_cell", + "rand 0.8.5", + "uuid", +] + +[[package]] +name = "cuid-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d59a706635108a7e8eaae7ec8e6154504fafa4a415ef38690d94fccea051757" + +[[package]] +name = "cuid2" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc4ec2422180444acb04e5dda013369c9860fe66e8f558aa8c3f265ad195d3" +dependencies = [ + "cuid-util", + "getrandom 0.2.16", + "num", + "rand 0.8.5", + "sha3", + "web-time", +] + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "data-encoding" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" + +[[package]] +name = "dbus" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b3aa68d7e7abee336255bd7248ea965cc393f3e70411135a6f6a4b651345d4" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "dbus-crossroads" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64bff0bd181fba667660276c6b7ebdc50cff37ce593e7adf9e734f89c8f444e8" +dependencies = [ + "dbus", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure 0.12.6", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "flate2" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.3", + "windows-link", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.12.1", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "hostname" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +dependencies = [ + "cfg-if", + "libc", + "windows-link", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots 1.0.4", +] + +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2 0.6.1", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.178" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" +dependencies = [ + "bitflags 2.10.0", + "libc", + "redox_syscall 0.6.0", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lofty" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8bc4717ff10833a623b009e9254ae8667c7a59edc3cfb01c37aeeef4b6d54a7" +dependencies = [ + "byteorder", + "data-encoding", + "flate2", + "lofty_attr", + "log", + "ogg_pager", + "paste", +] + +[[package]] +name = "lofty_attr" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9983e64b2358522f745c1251924e3ab7252d55637e80f6a0a3de642d6a9efc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memmap2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +dependencies = [ + "libc", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.10.0", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.10.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.10.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "ogg_pager" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87b0bef808533c5890ab77279538212efdbbbd9aa4ef1ccdfcfbf77a42f7e6fa" +dependencies = [ + "byteorder", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "orbclient" +version = "0.3.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "247ad146e19b9437f8604c21f8652423595cf710ad108af40e77d3ae6e96b827" +dependencies = [ + "libredox", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "owo-colors" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap 2.12.1", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.111", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +dependencies = [ + "heck", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.111", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "prost-types" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +dependencies = [ + "prost", +] + +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2 0.6.1", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.6.1", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.10.0", +] + +[[package]] +name = "redox_syscall" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec96166dafa0886eb81fe1c0a388bece180fbef2135f97c1e2cf8302e74b43b5" +dependencies = [ + "bitflags 2.10.0", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower 0.5.2", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 1.0.4", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rockbox-controls" +version = "0.1.0" +dependencies = [ + "anyhow", + "prost", + "rockbox-library", + "souvlaki", + "tokio", + "tonic", + "tonic-build", + "urlencoding", + "winit", +] + +[[package]] +name = "rockbox-library" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "cuid", + "futures", + "lofty", + "md5", + "owo-colors", + "reqwest", + "rockbox-sys", + "serde", + "serde_json", + "sqlx", + "tokio", +] + +[[package]] +name = "rockbox-sys" +version = "0.1.0" +dependencies = [ + "anyhow", + "reqwest", + "rockbox-traits", + "serde", + "url", +] + +[[package]] +name = "rockbox-traits" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", +] + +[[package]] +name = "rsa" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a0376c50d0358279d9d643e4bf7b7be212f1f4ff1da9070a7b54d22ef75c88" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "serde_json" +version = "1.0.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af14725505314343e673e9ecb7cd7e8a36aa9791eb936235a3567cc31447ae4" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.10.0", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "souvlaki" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5855c8f31521af07d896b852eaa9eca974ddd3211fc2ae292e58dda8eb129bc8" +dependencies = [ + "base64", + "block", + "cocoa", + "core-graphics 0.22.3", + "dbus", + "dbus-crossroads", + "dispatch", + "objc", + "thiserror 1.0.69", + "windows", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap 2.12.1", + "log", + "memchr", + "once_cell", + "percent-encoding", + "rustls", + "serde", + "serde_json", + "sha2", + "smallvec", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots 0.26.11", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.111", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 2.0.111", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" +dependencies = [ + "atoi", + "base64", + "bitflags 2.10.0", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand 0.8.5", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.17", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" +dependencies = [ + "atoi", + "base64", + "bitflags 2.10.0", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand 0.8.5", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.17", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror 2.0.17", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "tempfile" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +dependencies = [ + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix 1.1.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl 2.0.17", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.6.1", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap 2.12.1", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow", +] + +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "prost", + "socket2 0.5.10", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags 2.10.0", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower 0.5.2", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +dependencies = [ + "getrandom 0.3.4", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.111", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.3", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +dependencies = [ + "bitflags 2.10.0", + "rustix 1.1.3", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.10.0", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +dependencies = [ + "rustix 1.1.3", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.4", +] + +[[package]] +name = "webpki-roots" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winit" +version = "0.30.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.10.0", + "block2", + "bytemuck", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics 0.23.2", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.3", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.10.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", + "synstructure 0.13.2", +] + +[[package]] +name = "zerocopy" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", + "synstructure 0.13.2", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "zmij" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e404bcd8afdaf006e529269d3e85a743f9480c3cef60034d77860d02964f3ba" diff --git a/crates/controls/Cargo.toml b/crates/controls/Cargo.toml index 18605bb768..454ed061f6 100644 --- a/crates/controls/Cargo.toml +++ b/crates/controls/Cargo.toml @@ -1,10 +1,6 @@ [package] name = "rockbox-controls" version = "0.1.0" -authors.workspace = true -edition.workspace = true -license.workspace = true -repository.workspace = true [dependencies] anyhow = "1.0.93" diff --git a/crates/controls/src/api/rockbox.v1alpha1.rs b/crates/controls/src/api/rockbox.v1alpha1.rs index 19942cbede..33ba2fe922 100644 --- a/crates/controls/src/api/rockbox.v1alpha1.rs +++ b/crates/controls/src/api/rockbox.v1alpha1.rs @@ -43,10 +43,10 @@ pub mod browse_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct BrowseServiceClient { inner: tonic::client::Grpc, @@ -90,8 +90,9 @@ pub mod browse_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -129,20 +130,27 @@ pub mod browse_service_client { pub async fn tree_get_entries( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.BrowseService/TreeGetEntries", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.BrowseService", - "TreeGetEntries", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), + ); self.inner.unary(req, path, codec).await } } @@ -154,7 +162,7 @@ pub mod browse_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. @@ -163,7 +171,10 @@ pub mod browse_service_server { async fn tree_get_entries( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct BrowseServiceServer { @@ -186,7 +197,10 @@ pub mod browse_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -241,18 +255,23 @@ pub mod browse_service_server { "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { #[allow(non_camel_case_types)] struct TreeGetEntriesSvc(pub Arc); - impl tonic::server::UnaryService - for TreeGetEntriesSvc - { + impl< + T: BrowseService, + > tonic::server::UnaryService + for TreeGetEntriesSvc { type Response = super::TreeGetEntriesResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::tree_get_entries(&inner, request).await + ::tree_get_entries(&inner, request) + .await }; Box::pin(fut) } @@ -279,19 +298,23 @@ pub mod browse_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -527,10 +550,10 @@ pub mod library_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct LibraryServiceClient { inner: tonic::client::Grpc, @@ -574,8 +597,9 @@ pub mod library_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -613,245 +637,343 @@ pub mod library_service_client { pub async fn get_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbums", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbums", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); self.inner.unary(req, path, codec).await } pub async fn get_artists( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtists", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtists", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), + ); self.inner.unary(req, path, codec).await } pub async fn get_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTracks", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTracks", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); self.inner.unary(req, path, codec).await } pub async fn get_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); self.inner.unary(req, path, codec).await } pub async fn get_artist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtist", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtist", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); self.inner.unary(req, path, codec).await } pub async fn get_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); self.inner.unary(req, path, codec).await } pub async fn like_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); self.inner.unary(req, path, codec).await } pub async fn unlike_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn like_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); self.inner.unary(req, path, codec).await } pub async fn unlike_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedAlbums", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), + ); self.inner.unary(req, path, codec).await } pub async fn scan_library( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/ScanLibrary", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "ScanLibrary", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), + ); self.inner.unary(req, path, codec).await } pub async fn search( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/Search", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); @@ -866,7 +988,7 @@ pub mod library_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. @@ -875,55 +997,94 @@ pub mod library_service_server { async fn get_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artists( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn scan_library( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn search( &self, request: tonic::Request, @@ -950,7 +1111,10 @@ pub mod library_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1005,9 +1169,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbums" => { #[allow(non_camel_case_types)] struct GetAlbumsSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumsSvc { type Response = super::GetAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1044,9 +1214,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtists" => { #[allow(non_camel_case_types)] struct GetArtistsSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistsSvc { type Response = super::GetArtistsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1083,9 +1259,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTracks" => { #[allow(non_camel_case_types)] struct GetTracksSvc(pub Arc); - impl tonic::server::UnaryService for GetTracksSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTracksSvc { type Response = super::GetTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1122,9 +1304,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbum" => { #[allow(non_camel_case_types)] struct GetAlbumSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumSvc { type Response = super::GetAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1161,9 +1349,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtist" => { #[allow(non_camel_case_types)] struct GetArtistSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistSvc { type Response = super::GetArtistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1200,9 +1394,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTrack" => { #[allow(non_camel_case_types)] struct GetTrackSvc(pub Arc); - impl tonic::server::UnaryService for GetTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTrackSvc { type Response = super::GetTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1239,9 +1439,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeTrack" => { #[allow(non_camel_case_types)] struct LikeTrackSvc(pub Arc); - impl tonic::server::UnaryService for LikeTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeTrackSvc { type Response = super::LikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1278,11 +1484,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { #[allow(non_camel_case_types)] struct UnlikeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeTrackSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeTrackSvc { type Response = super::UnlikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1319,9 +1529,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { #[allow(non_camel_case_types)] struct LikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService for LikeAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeAlbumSvc { type Response = super::LikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1358,11 +1574,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { #[allow(non_camel_case_types)] struct UnlikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeAlbumSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeAlbumSvc { type Response = super::UnlikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1399,19 +1619,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { #[allow(non_camel_case_types)] struct GetLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedTracksSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedTracksSvc { type Response = super::GetLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_tracks(&inner, request).await + ::get_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -1441,19 +1665,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { #[allow(non_camel_case_types)] struct GetLikedAlbumsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedAlbumsSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedAlbumsSvc { type Response = super::GetLikedAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_albums(&inner, request).await + ::get_liked_albums(&inner, request) + .await }; Box::pin(fut) } @@ -1483,11 +1711,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { #[allow(non_camel_case_types)] struct ScanLibrarySvc(pub Arc); - impl tonic::server::UnaryService - for ScanLibrarySvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for ScanLibrarySvc { type Response = super::ScanLibraryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1524,16 +1756,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/Search" => { #[allow(non_camel_case_types)] struct SearchSvc(pub Arc); - impl tonic::server::UnaryService for SearchSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for SearchSvc { type Response = super::SearchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::search(&inner, request).await }; + let fut = async move { + ::search(&inner, request).await + }; Box::pin(fut) } } @@ -1559,19 +1798,23 @@ pub mod library_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -1600,10 +1843,10 @@ pub mod metadata_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct MetadataServiceClient { inner: tonic::client::Grpc, @@ -1647,8 +1890,9 @@ pub mod metadata_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -1692,7 +1936,7 @@ pub mod metadata_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. @@ -1719,7 +1963,10 @@ pub mod metadata_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1771,19 +2018,23 @@ pub mod metadata_service_server { } fn call(&mut self, req: http::Request) -> Self::Future { match req.uri().path() { - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -2067,10 +2318,10 @@ pub mod playback_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaybackServiceClient { inner: tonic::client::Grpc, @@ -2114,8 +2365,9 @@ pub mod playback_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -2154,12 +2406,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Play", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); @@ -2169,12 +2427,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Pause", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); @@ -2183,49 +2447,66 @@ pub mod playback_service_client { pub async fn play_or_pause( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayOrPause", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayOrPause", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), + ); self.inner.unary(req, path, codec).await } pub async fn resume( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Resume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Resume", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); self.inner.unary(req, path, codec).await } pub async fn next( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Next", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); @@ -2234,293 +2515,426 @@ pub mod playback_service_client { pub async fn previous( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Previous", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Previous", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); self.inner.unary(req, path, codec).await } pub async fn fast_forward_rewind( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FastForwardRewind", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FastForwardRewind", + ), + ); self.inner.unary(req, path, codec).await } pub async fn status( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Status", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Status", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); self.inner.unary(req, path, codec).await } pub async fn current_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/CurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "CurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn next_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/NextTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "NextTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn flush_and_reload_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FlushAndReloadTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FlushAndReloadTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_file_position( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/GetFilePosition", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "GetFilePosition", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "GetFilePosition", + ), + ); self.inner.unary(req, path, codec).await } pub async fn hard_stop( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/HardStop", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "HardStop", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); self.inner.unary(req, path, codec).await } pub async fn play_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn play_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn play_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), + ); self.inner.unary(req, path, codec).await } pub async fn play_music_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayMusicDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayMusicDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn play_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayLikedTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn stream_current_track( @@ -2530,18 +2944,26 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamCurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "StreamCurrentTrack", + ), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_status( @@ -2551,18 +2973,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_playlist( @@ -2572,18 +2999,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), + ); self.inner.server_streaming(req, path, codec).await } } @@ -2595,7 +3027,7 @@ pub mod playback_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. @@ -2612,7 +3044,10 @@ pub mod playback_service_server { async fn play_or_pause( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume( &self, request: tonic::Request, @@ -2624,11 +3059,17 @@ pub mod playback_service_server { async fn previous( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn fast_forward_rewind( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn status( &self, request: tonic::Request, @@ -2636,82 +3077,133 @@ pub mod playback_service_server { async fn current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn next_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn flush_and_reload_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_file_position( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn hard_stop( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_music_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamCurrentTrack method. type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamStatus method. type StreamStatusStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamPlaylist method. type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaybackServiceServer { @@ -2734,7 +3226,10 @@ pub mod playback_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -2789,16 +3284,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Play" => { #[allow(non_camel_case_types)] struct PlaySvc(pub Arc); - impl tonic::server::UnaryService for PlaySvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PlaySvc { type Response = super::PlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::play(&inner, request).await }; + let fut = async move { + ::play(&inner, request).await + }; Box::pin(fut) } } @@ -2827,16 +3328,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Pause" => { #[allow(non_camel_case_types)] struct PauseSvc(pub Arc); - impl tonic::server::UnaryService for PauseSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PauseSvc { type Response = super::PauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::pause(&inner, request).await }; + let fut = async move { + ::pause(&inner, request).await + }; Box::pin(fut) } } @@ -2865,11 +3372,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { #[allow(non_camel_case_types)] struct PlayOrPauseSvc(pub Arc); - impl tonic::server::UnaryService - for PlayOrPauseSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayOrPauseSvc { type Response = super::PlayOrPauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2906,9 +3417,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Resume" => { #[allow(non_camel_case_types)] struct ResumeSvc(pub Arc); - impl tonic::server::UnaryService for ResumeSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for ResumeSvc { type Response = super::ResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2945,16 +3462,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Next" => { #[allow(non_camel_case_types)] struct NextSvc(pub Arc); - impl tonic::server::UnaryService for NextSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for NextSvc { type Response = super::NextResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::next(&inner, request).await }; + let fut = async move { + ::next(&inner, request).await + }; Box::pin(fut) } } @@ -2983,9 +3506,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Previous" => { #[allow(non_camel_case_types)] struct PreviousSvc(pub Arc); - impl tonic::server::UnaryService for PreviousSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PreviousSvc { type Response = super::PreviousResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3022,19 +3551,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { #[allow(non_camel_case_types)] struct FastForwardRewindSvc(pub Arc); - impl - tonic::server::UnaryService - for FastForwardRewindSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FastForwardRewindSvc { type Response = super::FastForwardRewindResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::fast_forward_rewind(&inner, request).await + ::fast_forward_rewind(&inner, request) + .await }; Box::pin(fut) } @@ -3064,9 +3597,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Status" => { #[allow(non_camel_case_types)] struct StatusSvc(pub Arc); - impl tonic::server::UnaryService for StatusSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for StatusSvc { type Response = super::StatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3103,11 +3642,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { #[allow(non_camel_case_types)] struct CurrentTrackSvc(pub Arc); - impl tonic::server::UnaryService - for CurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for CurrentTrackSvc { type Response = super::CurrentTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3144,9 +3687,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/NextTrack" => { #[allow(non_camel_case_types)] struct NextTrackSvc(pub Arc); - impl tonic::server::UnaryService for NextTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for NextTrackSvc { type Response = super::NextTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3183,19 +3732,25 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { #[allow(non_camel_case_types)] struct FlushAndReloadTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for FlushAndReloadTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FlushAndReloadTracksSvc { type Response = super::FlushAndReloadTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::flush_and_reload_tracks(&inner, request) + ::flush_and_reload_tracks( + &inner, + request, + ) .await }; Box::pin(fut) @@ -3226,19 +3781,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { #[allow(non_camel_case_types)] struct GetFilePositionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFilePositionSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for GetFilePositionSvc { type Response = super::GetFilePositionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_file_position(&inner, request).await + ::get_file_position(&inner, request) + .await }; Box::pin(fut) } @@ -3268,9 +3827,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/HardStop" => { #[allow(non_camel_case_types)] struct HardStopSvc(pub Arc); - impl tonic::server::UnaryService for HardStopSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for HardStopSvc { type Response = super::HardStopResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3307,9 +3872,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { #[allow(non_camel_case_types)] struct PlayAlbumSvc(pub Arc); - impl tonic::server::UnaryService for PlayAlbumSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAlbumSvc { type Response = super::PlayAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3346,19 +3917,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { #[allow(non_camel_case_types)] struct PlayArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayArtistTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayArtistTracksSvc { type Response = super::PlayArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_artist_tracks(&inner, request).await + ::play_artist_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3388,11 +3963,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { #[allow(non_camel_case_types)] struct PlayPlaylistSvc(pub Arc); - impl tonic::server::UnaryService - for PlayPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayPlaylistSvc { type Response = super::PlayPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3429,19 +4008,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { #[allow(non_camel_case_types)] struct PlayDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayDirectorySvc { type Response = super::PlayDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_directory(&inner, request).await + ::play_directory(&inner, request) + .await }; Box::pin(fut) } @@ -3471,19 +4054,26 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory" => { #[allow(non_camel_case_types)] struct PlayMusicDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayMusicDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayMusicDirectorySvc { type Response = super::PlayMusicDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_music_directory(&inner, request).await + ::play_music_directory( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -3513,9 +4103,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { #[allow(non_camel_case_types)] struct PlayTrackSvc(pub Arc); - impl tonic::server::UnaryService for PlayTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayTrackSvc { type Response = super::PlayTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3552,19 +4148,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { #[allow(non_camel_case_types)] struct PlayLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayLikedTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayLikedTracksSvc { type Response = super::PlayLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_liked_tracks(&inner, request).await + ::play_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3594,19 +4194,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { #[allow(non_camel_case_types)] struct PlayAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayAllTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAllTracksSvc { type Response = super::PlayAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_all_tracks(&inner, request).await + ::play_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3636,21 +4240,28 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { #[allow(non_camel_case_types)] struct StreamCurrentTrackSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamCurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService< + super::StreamCurrentTrackRequest, + > for StreamCurrentTrackSvc { type Response = super::CurrentTrackResponse; type ResponseStream = T::StreamCurrentTrackStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_current_track(&inner, request).await + ::stream_current_track( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -3680,14 +4291,16 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { #[allow(non_camel_case_types)] struct StreamStatusSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamStatusSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamStatusSvc { type Response = super::StatusResponse; type ResponseStream = T::StreamStatusStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3724,21 +4337,24 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { #[allow(non_camel_case_types)] struct StreamPlaylistSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamPlaylistSvc { type Response = super::PlaylistResponse; type ResponseStream = T::StreamPlaylistStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_playlist(&inner, request).await + ::stream_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -3765,19 +4381,23 @@ pub mod playback_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -3984,10 +4604,10 @@ pub mod playlist_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaylistServiceClient { inner: tonic::client::Grpc, @@ -4031,8 +4651,9 @@ pub mod playlist_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -4070,182 +4691,251 @@ pub mod playlist_service_client { pub async fn get_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetCurrent", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn get_resume_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetResumeInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_track_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetTrackInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_first_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetFirstIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), + ); self.inner.unary(req, path, codec).await } pub async fn get_display_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetDisplayIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "GetDisplayIndex", + ), + ); self.inner.unary(req, path, codec).await } pub async fn amount( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Amount", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "Amount", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); self.inner.unary(req, path, codec).await } pub async fn playlist_resume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/PlaylistResume", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "PlaylistResume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), + ); self.inner.unary(req, path, codec).await } pub async fn resume_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ResumeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ResumeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn set_modified( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/SetModified", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "SetModified", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), + ); self.inner.unary(req, path, codec).await } pub async fn start( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Start", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); @@ -4255,12 +4945,18 @@ pub mod playlist_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Sync", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); @@ -4269,172 +4965,247 @@ pub mod playlist_service_client { pub async fn remove_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "RemoveAllTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn remove_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn create_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "CreatePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn insert_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn shuffle_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ShufflePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "ShufflePlaylist", + ), + ); self.inner.unary(req, path, codec).await } } @@ -4446,7 +5217,7 @@ pub mod playlist_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. @@ -4455,23 +5226,38 @@ pub mod playlist_service_server { async fn get_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_resume_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_first_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_display_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn amount( &self, request: tonic::Request, @@ -4479,15 +5265,24 @@ pub mod playlist_service_server { async fn playlist_resume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_modified( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn start( &self, request: tonic::Request, @@ -4499,39 +5294,66 @@ pub mod playlist_service_server { async fn remove_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn remove_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn create_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn shuffle_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaylistServiceServer { @@ -4554,7 +5376,10 @@ pub mod playlist_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -4609,11 +5434,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { #[allow(non_camel_case_types)] struct GetCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for GetCurrentSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetCurrentSvc { type Response = super::GetCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4650,19 +5479,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { #[allow(non_camel_case_types)] struct GetResumeInfoSvc(pub Arc); - impl - tonic::server::UnaryService - for GetResumeInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetResumeInfoSvc { type Response = super::GetResumeInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_resume_info(&inner, request).await + ::get_resume_info(&inner, request) + .await }; Box::pin(fut) } @@ -4692,18 +5525,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { #[allow(non_camel_case_types)] struct GetTrackInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GetTrackInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetTrackInfoSvc { type Response = super::GetTrackInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_track_info(&inner, request).await + ::get_track_info(&inner, request) + .await }; Box::pin(fut) } @@ -4733,19 +5571,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { #[allow(non_camel_case_types)] struct GetFirstIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFirstIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetFirstIndexSvc { type Response = super::GetFirstIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_first_index(&inner, request).await + ::get_first_index(&inner, request) + .await }; Box::pin(fut) } @@ -4775,19 +5617,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { #[allow(non_camel_case_types)] struct GetDisplayIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetDisplayIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetDisplayIndexSvc { type Response = super::GetDisplayIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_display_index(&inner, request).await + ::get_display_index(&inner, request) + .await }; Box::pin(fut) } @@ -4817,9 +5663,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Amount" => { #[allow(non_camel_case_types)] struct AmountSvc(pub Arc); - impl tonic::server::UnaryService for AmountSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for AmountSvc { type Response = super::AmountResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4856,19 +5708,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { #[allow(non_camel_case_types)] struct PlaylistResumeSvc(pub Arc); - impl - tonic::server::UnaryService - for PlaylistResumeSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for PlaylistResumeSvc { type Response = super::PlaylistResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::playlist_resume(&inner, request).await + ::playlist_resume(&inner, request) + .await }; Box::pin(fut) } @@ -4898,11 +5754,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { #[allow(non_camel_case_types)] struct ResumeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for ResumeTrackSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ResumeTrackSvc { type Response = super::ResumeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4939,11 +5799,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/SetModified" => { #[allow(non_camel_case_types)] struct SetModifiedSvc(pub Arc); - impl tonic::server::UnaryService - for SetModifiedSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for SetModifiedSvc { type Response = super::SetModifiedResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4980,16 +5844,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Start" => { #[allow(non_camel_case_types)] struct StartSvc(pub Arc); - impl tonic::server::UnaryService for StartSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for StartSvc { type Response = super::StartResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::start(&inner, request).await }; + let fut = async move { + ::start(&inner, request).await + }; Box::pin(fut) } } @@ -5018,16 +5888,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Sync" => { #[allow(non_camel_case_types)] struct SyncSvc(pub Arc); - impl tonic::server::UnaryService for SyncSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for SyncSvc { type Response = super::SyncResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::sync(&inner, request).await }; + let fut = async move { + ::sync(&inner, request).await + }; Box::pin(fut) } } @@ -5056,19 +5932,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { #[allow(non_camel_case_types)] struct RemoveAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for RemoveAllTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveAllTracksSvc { type Response = super::RemoveAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::remove_all_tracks(&inner, request).await + ::remove_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -5098,11 +5978,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { #[allow(non_camel_case_types)] struct RemoveTracksSvc(pub Arc); - impl tonic::server::UnaryService - for RemoveTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveTracksSvc { type Response = super::RemoveTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5139,19 +6023,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { #[allow(non_camel_case_types)] struct CreatePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for CreatePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for CreatePlaylistSvc { type Response = super::CreatePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::create_playlist(&inner, request).await + ::create_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5181,11 +6069,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { #[allow(non_camel_case_types)] struct InsertTracksSvc(pub Arc); - impl tonic::server::UnaryService - for InsertTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertTracksSvc { type Response = super::InsertTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5222,19 +6114,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { #[allow(non_camel_case_types)] struct InsertDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for InsertDirectorySvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertDirectorySvc { type Response = super::InsertDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_directory(&inner, request).await + ::insert_directory(&inner, request) + .await }; Box::pin(fut) } @@ -5264,19 +6160,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { #[allow(non_camel_case_types)] struct InsertPlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertPlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertPlaylistSvc { type Response = super::InsertPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_playlist(&inner, request).await + ::insert_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5306,11 +6206,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { #[allow(non_camel_case_types)] struct InsertAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for InsertAlbumSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertAlbumSvc { type Response = super::InsertAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5347,19 +6251,26 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { #[allow(non_camel_case_types)] struct InsertArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertArtistTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertArtistTracksSvc { type Response = super::InsertArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_artist_tracks(&inner, request).await + ::insert_artist_tracks( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -5389,19 +6300,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { #[allow(non_camel_case_types)] struct ShufflePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for ShufflePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ShufflePlaylistSvc { type Response = super::ShufflePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::shuffle_playlist(&inner, request).await + ::shuffle_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5428,19 +6343,23 @@ pub mod playlist_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -5948,10 +6867,10 @@ pub mod settings_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SettingsServiceClient { inner: tonic::client::Grpc, @@ -5995,8 +6914,9 @@ pub mod settings_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -6034,58 +6954,85 @@ pub mod settings_service_client { pub async fn get_settings_list( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetSettingsList", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetSettingsList", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetSettingsList", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetGlobalSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetGlobalSettings", + ), + ); self.inner.unary(req, path, codec).await } pub async fn save_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/SaveSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "SaveSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), + ); self.inner.unary(req, path, codec).await } } @@ -6097,7 +7044,7 @@ pub mod settings_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. @@ -6106,15 +7053,24 @@ pub mod settings_service_server { async fn get_settings_list( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn save_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SettingsServiceServer { @@ -6137,7 +7093,10 @@ pub mod settings_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6192,19 +7151,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { #[allow(non_camel_case_types)] struct GetSettingsListSvc(pub Arc); - impl - tonic::server::UnaryService - for GetSettingsListSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetSettingsListSvc { type Response = super::GetSettingsListResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_settings_list(&inner, request).await + ::get_settings_list(&inner, request) + .await }; Box::pin(fut) } @@ -6234,19 +7197,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { #[allow(non_camel_case_types)] struct GetGlobalSettingsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetGlobalSettingsSvc { type Response = super::GetGlobalSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_settings(&inner, request).await + ::get_global_settings(&inner, request) + .await }; Box::pin(fut) } @@ -6276,11 +7243,15 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/SaveSettings" => { #[allow(non_camel_case_types)] struct SaveSettingsSvc(pub Arc); - impl tonic::server::UnaryService - for SaveSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for SaveSettingsSvc { type Response = super::SaveSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6314,19 +7285,23 @@ pub mod settings_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -6484,10 +7459,10 @@ pub mod sound_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SoundServiceClient { inner: tonic::client::Grpc, @@ -6531,8 +7506,9 @@ pub mod sound_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SoundServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -6570,31 +7546,48 @@ pub mod sound_service_client { pub async fn adjust_volume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/AdjustVolume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "AdjustVolume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_set( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundSet", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); @@ -6603,49 +7596,74 @@ pub mod sound_service_client { pub async fn sound_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundCurrent", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_default( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundDefault", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundDefault", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_min( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMin", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); @@ -6654,13 +7672,22 @@ pub mod sound_service_client { pub async fn sound_max( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMax", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); @@ -6669,49 +7696,72 @@ pub mod sound_service_client { pub async fn sound_unit( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundUnit", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundUnit", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); self.inner.unary(req, path, codec).await } pub async fn sound_val2_phys( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SoundVal2Phys", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundVal2Phys", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), + ); self.inner.unary(req, path, codec).await } pub async fn get_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/GetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); @@ -6720,13 +7770,22 @@ pub mod sound_service_client { pub async fn set_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); @@ -6735,13 +7794,22 @@ pub mod sound_service_client { pub async fn beep_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/BeepPlay", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); @@ -6750,76 +7818,106 @@ pub mod sound_service_client { pub async fn pcmbuf_fade( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/PcmbufFade", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufFade", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); self.inner.unary(req, path, codec).await } pub async fn pcmbuf_set_low_latency( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufSetLowLatency", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SoundService", + "PcmbufSetLowLatency", + ), + ); self.inner.unary(req, path, codec).await } pub async fn system_sound_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SystemSoundPlay", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SystemSoundPlay", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), + ); self.inner.unary(req, path, codec).await } pub async fn keyclick_click( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/KeyclickClick", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "KeyclickClick", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), + ); self.inner.unary(req, path, codec).await } } @@ -6831,7 +7929,7 @@ pub mod sound_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. @@ -6840,63 +7938,108 @@ pub mod sound_service_server { async fn adjust_volume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_set( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_default( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_min( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_max( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_unit( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_val2_phys( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn beep_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_fade( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_set_low_latency( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn system_sound_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn keyclick_click( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SoundServiceServer { @@ -6919,7 +8062,10 @@ pub mod sound_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6974,11 +8120,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/AdjustVolume" => { #[allow(non_camel_case_types)] struct AdjustVolumeSvc(pub Arc); - impl tonic::server::UnaryService - for AdjustVolumeSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for AdjustVolumeSvc { type Response = super::AdjustVolumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7015,9 +8165,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundSet" => { #[allow(non_camel_case_types)] struct SoundSetSvc(pub Arc); - impl tonic::server::UnaryService for SoundSetSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundSetSvc { type Response = super::SoundSetResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7054,11 +8210,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundCurrent" => { #[allow(non_camel_case_types)] struct SoundCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for SoundCurrentSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundCurrentSvc { type Response = super::SoundCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7095,11 +8255,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundDefault" => { #[allow(non_camel_case_types)] struct SoundDefaultSvc(pub Arc); - impl tonic::server::UnaryService - for SoundDefaultSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundDefaultSvc { type Response = super::SoundDefaultResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7136,9 +8300,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMin" => { #[allow(non_camel_case_types)] struct SoundMinSvc(pub Arc); - impl tonic::server::UnaryService for SoundMinSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMinSvc { type Response = super::SoundMinResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7175,9 +8345,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMax" => { #[allow(non_camel_case_types)] struct SoundMaxSvc(pub Arc); - impl tonic::server::UnaryService for SoundMaxSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMaxSvc { type Response = super::SoundMaxResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7214,9 +8390,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundUnit" => { #[allow(non_camel_case_types)] struct SoundUnitSvc(pub Arc); - impl tonic::server::UnaryService for SoundUnitSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundUnitSvc { type Response = super::SoundUnitResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7253,11 +8435,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { #[allow(non_camel_case_types)] struct SoundVal2PhysSvc(pub Arc); - impl tonic::server::UnaryService - for SoundVal2PhysSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundVal2PhysSvc { type Response = super::SoundVal2PhysResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7294,9 +8480,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/GetPitch" => { #[allow(non_camel_case_types)] struct GetPitchSvc(pub Arc); - impl tonic::server::UnaryService for GetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for GetPitchSvc { type Response = super::GetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7333,9 +8525,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SetPitch" => { #[allow(non_camel_case_types)] struct SetPitchSvc(pub Arc); - impl tonic::server::UnaryService for SetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SetPitchSvc { type Response = super::SetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7372,9 +8570,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/BeepPlay" => { #[allow(non_camel_case_types)] struct BeepPlaySvc(pub Arc); - impl tonic::server::UnaryService for BeepPlaySvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for BeepPlaySvc { type Response = super::BeepPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7411,9 +8615,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufFade" => { #[allow(non_camel_case_types)] struct PcmbufFadeSvc(pub Arc); - impl tonic::server::UnaryService for PcmbufFadeSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufFadeSvc { type Response = super::PcmbufFadeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7450,19 +8660,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { #[allow(non_camel_case_types)] struct PcmbufSetLowLatencySvc(pub Arc); - impl - tonic::server::UnaryService - for PcmbufSetLowLatencySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufSetLowLatencySvc { type Response = super::PcmbufSetLowLatencyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::pcmbuf_set_low_latency(&inner, request).await + ::pcmbuf_set_low_latency(&inner, request) + .await }; Box::pin(fut) } @@ -7492,18 +8706,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { #[allow(non_camel_case_types)] struct SystemSoundPlaySvc(pub Arc); - impl tonic::server::UnaryService - for SystemSoundPlaySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SystemSoundPlaySvc { type Response = super::SystemSoundPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::system_sound_play(&inner, request).await + ::system_sound_play(&inner, request) + .await }; Box::pin(fut) } @@ -7533,11 +8752,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/KeyclickClick" => { #[allow(non_camel_case_types)] struct KeyclickClickSvc(pub Arc); - impl tonic::server::UnaryService - for KeyclickClickSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for KeyclickClickSvc { type Response = super::KeyclickClickResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7571,19 +8794,23 @@ pub mod sound_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -7644,10 +8871,10 @@ pub mod system_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SystemServiceClient { inner: tonic::client::Grpc, @@ -7691,8 +8918,9 @@ pub mod system_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SystemServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -7730,39 +8958,56 @@ pub mod system_service_client { pub async fn get_rockbox_version( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetRockboxVersion", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetRockboxVersion", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SystemService", + "GetRockboxVersion", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_status( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetGlobalStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetGlobalStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), + ); self.inner.unary(req, path, codec).await } } @@ -7774,7 +9019,7 @@ pub mod system_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. @@ -7783,11 +9028,17 @@ pub mod system_service_server { async fn get_rockbox_version( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SystemServiceServer { @@ -7810,7 +9061,10 @@ pub mod system_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -7865,19 +9119,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { #[allow(non_camel_case_types)] struct GetRockboxVersionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetRockboxVersionSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetRockboxVersionSvc { type Response = super::GetRockboxVersionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_rockbox_version(&inner, request).await + ::get_rockbox_version(&inner, request) + .await }; Box::pin(fut) } @@ -7907,19 +9165,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { #[allow(non_camel_case_types)] struct GetGlobalStatusSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalStatusSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetGlobalStatusSvc { type Response = super::GetGlobalStatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_status(&inner, request).await + ::get_global_status(&inner, request) + .await }; Box::pin(fut) } @@ -7946,19 +9208,23 @@ pub mod system_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } diff --git a/crates/controls/src/main.rs b/crates/controls/src/main.rs new file mode 100644 index 0000000000..076de00a84 --- /dev/null +++ b/crates/controls/src/main.rs @@ -0,0 +1,8 @@ +fn main() { + match rockbox_controls::run_media_controls() { + Ok(_) => {} + Err(e) => { + eprintln!("Error starting rockbox controls: {}", e); + } + } +} diff --git a/crates/rpc/src/api/rockbox.v1alpha1.rs b/crates/rpc/src/api/rockbox.v1alpha1.rs index eb600b3f52..1e094a7fc5 100644 --- a/crates/rpc/src/api/rockbox.v1alpha1.rs +++ b/crates/rpc/src/api/rockbox.v1alpha1.rs @@ -43,10 +43,10 @@ pub mod browse_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct BrowseServiceClient { inner: tonic::client::Grpc, @@ -90,8 +90,9 @@ pub mod browse_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -129,20 +130,27 @@ pub mod browse_service_client { pub async fn tree_get_entries( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.BrowseService/TreeGetEntries", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.BrowseService", - "TreeGetEntries", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), + ); self.inner.unary(req, path, codec).await } } @@ -154,7 +162,7 @@ pub mod browse_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. @@ -163,7 +171,10 @@ pub mod browse_service_server { async fn tree_get_entries( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct BrowseServiceServer { @@ -186,7 +197,10 @@ pub mod browse_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -241,18 +255,23 @@ pub mod browse_service_server { "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { #[allow(non_camel_case_types)] struct TreeGetEntriesSvc(pub Arc); - impl tonic::server::UnaryService - for TreeGetEntriesSvc - { + impl< + T: BrowseService, + > tonic::server::UnaryService + for TreeGetEntriesSvc { type Response = super::TreeGetEntriesResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::tree_get_entries(&inner, request).await + ::tree_get_entries(&inner, request) + .await }; Box::pin(fut) } @@ -279,19 +298,23 @@ pub mod browse_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -384,10 +407,10 @@ pub mod device_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct DeviceServiceClient { inner: tonic::client::Grpc, @@ -431,8 +454,9 @@ pub mod device_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { DeviceServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -470,74 +494,101 @@ pub mod device_service_client { pub async fn get_devices( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.DeviceService/GetDevices"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.DeviceService/GetDevices", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.DeviceService", - "GetDevices", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.DeviceService", "GetDevices")); self.inner.unary(req, path, codec).await } pub async fn get_device( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.DeviceService/GetDevice"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.DeviceService/GetDevice", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.DeviceService", - "GetDevice", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.DeviceService", "GetDevice")); self.inner.unary(req, path, codec).await } pub async fn connect_device( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.DeviceService/ConnectDevice", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.DeviceService", - "ConnectDevice", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.DeviceService", "ConnectDevice"), + ); self.inner.unary(req, path, codec).await } pub async fn disconnect_device( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.DeviceService/DisconnectDevice", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.DeviceService", - "DisconnectDevice", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.DeviceService", "DisconnectDevice"), + ); self.inner.unary(req, path, codec).await } } @@ -549,7 +600,7 @@ pub mod device_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with DeviceServiceServer. @@ -558,19 +609,31 @@ pub mod device_service_server { async fn get_devices( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_device( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn connect_device( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn disconnect_device( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct DeviceServiceServer { @@ -593,7 +656,10 @@ pub mod device_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -648,9 +714,15 @@ pub mod device_service_server { "/rockbox.v1alpha1.DeviceService/GetDevices" => { #[allow(non_camel_case_types)] struct GetDevicesSvc(pub Arc); - impl tonic::server::UnaryService for GetDevicesSvc { + impl< + T: DeviceService, + > tonic::server::UnaryService + for GetDevicesSvc { type Response = super::GetDevicesResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -687,9 +759,15 @@ pub mod device_service_server { "/rockbox.v1alpha1.DeviceService/GetDevice" => { #[allow(non_camel_case_types)] struct GetDeviceSvc(pub Arc); - impl tonic::server::UnaryService for GetDeviceSvc { + impl< + T: DeviceService, + > tonic::server::UnaryService + for GetDeviceSvc { type Response = super::GetDeviceResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -726,11 +804,15 @@ pub mod device_service_server { "/rockbox.v1alpha1.DeviceService/ConnectDevice" => { #[allow(non_camel_case_types)] struct ConnectDeviceSvc(pub Arc); - impl tonic::server::UnaryService - for ConnectDeviceSvc - { + impl< + T: DeviceService, + > tonic::server::UnaryService + for ConnectDeviceSvc { type Response = super::ConnectDeviceResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -767,19 +849,23 @@ pub mod device_service_server { "/rockbox.v1alpha1.DeviceService/DisconnectDevice" => { #[allow(non_camel_case_types)] struct DisconnectDeviceSvc(pub Arc); - impl - tonic::server::UnaryService - for DisconnectDeviceSvc - { + impl< + T: DeviceService, + > tonic::server::UnaryService + for DisconnectDeviceSvc { type Response = super::DisconnectDeviceResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::disconnect_device(&inner, request).await + ::disconnect_device(&inner, request) + .await }; Box::pin(fut) } @@ -806,19 +892,23 @@ pub mod device_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -1054,10 +1144,10 @@ pub mod library_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct LibraryServiceClient { inner: tonic::client::Grpc, @@ -1101,8 +1191,9 @@ pub mod library_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -1140,245 +1231,343 @@ pub mod library_service_client { pub async fn get_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbums", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbums", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); self.inner.unary(req, path, codec).await } pub async fn get_artists( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtists", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtists", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), + ); self.inner.unary(req, path, codec).await } pub async fn get_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTracks", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTracks", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); self.inner.unary(req, path, codec).await } pub async fn get_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); self.inner.unary(req, path, codec).await } pub async fn get_artist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtist", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtist", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); self.inner.unary(req, path, codec).await } pub async fn get_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); self.inner.unary(req, path, codec).await } pub async fn like_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); self.inner.unary(req, path, codec).await } pub async fn unlike_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn like_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); self.inner.unary(req, path, codec).await } pub async fn unlike_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedAlbums", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), + ); self.inner.unary(req, path, codec).await } pub async fn scan_library( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/ScanLibrary", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "ScanLibrary", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), + ); self.inner.unary(req, path, codec).await } pub async fn search( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/Search", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); @@ -1393,7 +1582,7 @@ pub mod library_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. @@ -1402,55 +1591,94 @@ pub mod library_service_server { async fn get_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artists( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn scan_library( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn search( &self, request: tonic::Request, @@ -1477,7 +1705,10 @@ pub mod library_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1532,9 +1763,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbums" => { #[allow(non_camel_case_types)] struct GetAlbumsSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumsSvc { type Response = super::GetAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1571,9 +1808,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtists" => { #[allow(non_camel_case_types)] struct GetArtistsSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistsSvc { type Response = super::GetArtistsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1610,9 +1853,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTracks" => { #[allow(non_camel_case_types)] struct GetTracksSvc(pub Arc); - impl tonic::server::UnaryService for GetTracksSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTracksSvc { type Response = super::GetTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1649,9 +1898,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbum" => { #[allow(non_camel_case_types)] struct GetAlbumSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumSvc { type Response = super::GetAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1688,9 +1943,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtist" => { #[allow(non_camel_case_types)] struct GetArtistSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistSvc { type Response = super::GetArtistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1727,9 +1988,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTrack" => { #[allow(non_camel_case_types)] struct GetTrackSvc(pub Arc); - impl tonic::server::UnaryService for GetTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTrackSvc { type Response = super::GetTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1766,9 +2033,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeTrack" => { #[allow(non_camel_case_types)] struct LikeTrackSvc(pub Arc); - impl tonic::server::UnaryService for LikeTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeTrackSvc { type Response = super::LikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1805,11 +2078,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { #[allow(non_camel_case_types)] struct UnlikeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeTrackSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeTrackSvc { type Response = super::UnlikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1846,9 +2123,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { #[allow(non_camel_case_types)] struct LikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService for LikeAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeAlbumSvc { type Response = super::LikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1885,11 +2168,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { #[allow(non_camel_case_types)] struct UnlikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeAlbumSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeAlbumSvc { type Response = super::UnlikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1926,19 +2213,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { #[allow(non_camel_case_types)] struct GetLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedTracksSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedTracksSvc { type Response = super::GetLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_tracks(&inner, request).await + ::get_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -1968,19 +2259,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { #[allow(non_camel_case_types)] struct GetLikedAlbumsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedAlbumsSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedAlbumsSvc { type Response = super::GetLikedAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_albums(&inner, request).await + ::get_liked_albums(&inner, request) + .await }; Box::pin(fut) } @@ -2010,11 +2305,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { #[allow(non_camel_case_types)] struct ScanLibrarySvc(pub Arc); - impl tonic::server::UnaryService - for ScanLibrarySvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for ScanLibrarySvc { type Response = super::ScanLibraryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2051,16 +2350,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/Search" => { #[allow(non_camel_case_types)] struct SearchSvc(pub Arc); - impl tonic::server::UnaryService for SearchSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for SearchSvc { type Response = super::SearchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::search(&inner, request).await }; + let fut = async move { + ::search(&inner, request).await + }; Box::pin(fut) } } @@ -2086,19 +2392,23 @@ pub mod library_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -2127,10 +2437,10 @@ pub mod metadata_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct MetadataServiceClient { inner: tonic::client::Grpc, @@ -2174,8 +2484,9 @@ pub mod metadata_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -2219,7 +2530,7 @@ pub mod metadata_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. @@ -2246,7 +2557,10 @@ pub mod metadata_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -2298,19 +2612,23 @@ pub mod metadata_service_server { } fn call(&mut self, req: http::Request) -> Self::Future { match req.uri().path() { - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -2594,10 +2912,10 @@ pub mod playback_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaybackServiceClient { inner: tonic::client::Grpc, @@ -2641,8 +2959,9 @@ pub mod playback_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -2681,12 +3000,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Play", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); @@ -2696,12 +3021,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Pause", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); @@ -2710,49 +3041,66 @@ pub mod playback_service_client { pub async fn play_or_pause( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayOrPause", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayOrPause", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), + ); self.inner.unary(req, path, codec).await } pub async fn resume( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Resume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Resume", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); self.inner.unary(req, path, codec).await } pub async fn next( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Next", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); @@ -2761,293 +3109,426 @@ pub mod playback_service_client { pub async fn previous( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Previous", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Previous", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); self.inner.unary(req, path, codec).await } pub async fn fast_forward_rewind( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FastForwardRewind", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FastForwardRewind", + ), + ); self.inner.unary(req, path, codec).await } pub async fn status( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Status", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Status", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); self.inner.unary(req, path, codec).await } pub async fn current_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/CurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "CurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn next_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/NextTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "NextTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn flush_and_reload_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FlushAndReloadTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FlushAndReloadTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_file_position( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/GetFilePosition", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "GetFilePosition", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "GetFilePosition", + ), + ); self.inner.unary(req, path, codec).await } pub async fn hard_stop( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/HardStop", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "HardStop", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); self.inner.unary(req, path, codec).await } pub async fn play_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn play_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn play_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), + ); self.inner.unary(req, path, codec).await } pub async fn play_music_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayMusicDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayMusicDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn play_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayLikedTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn stream_current_track( @@ -3057,18 +3538,26 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamCurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "StreamCurrentTrack", + ), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_status( @@ -3078,18 +3567,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_playlist( @@ -3099,18 +3593,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), + ); self.inner.server_streaming(req, path, codec).await } } @@ -3122,7 +3621,7 @@ pub mod playback_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. @@ -3139,7 +3638,10 @@ pub mod playback_service_server { async fn play_or_pause( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume( &self, request: tonic::Request, @@ -3151,11 +3653,17 @@ pub mod playback_service_server { async fn previous( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn fast_forward_rewind( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn status( &self, request: tonic::Request, @@ -3163,82 +3671,133 @@ pub mod playback_service_server { async fn current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn next_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn flush_and_reload_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_file_position( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn hard_stop( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_music_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamCurrentTrack method. type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamStatus method. type StreamStatusStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamPlaylist method. type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaybackServiceServer { @@ -3261,7 +3820,10 @@ pub mod playback_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -3316,16 +3878,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Play" => { #[allow(non_camel_case_types)] struct PlaySvc(pub Arc); - impl tonic::server::UnaryService for PlaySvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PlaySvc { type Response = super::PlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::play(&inner, request).await }; + let fut = async move { + ::play(&inner, request).await + }; Box::pin(fut) } } @@ -3354,16 +3922,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Pause" => { #[allow(non_camel_case_types)] struct PauseSvc(pub Arc); - impl tonic::server::UnaryService for PauseSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PauseSvc { type Response = super::PauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::pause(&inner, request).await }; + let fut = async move { + ::pause(&inner, request).await + }; Box::pin(fut) } } @@ -3392,11 +3966,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { #[allow(non_camel_case_types)] struct PlayOrPauseSvc(pub Arc); - impl tonic::server::UnaryService - for PlayOrPauseSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayOrPauseSvc { type Response = super::PlayOrPauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3433,9 +4011,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Resume" => { #[allow(non_camel_case_types)] struct ResumeSvc(pub Arc); - impl tonic::server::UnaryService for ResumeSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for ResumeSvc { type Response = super::ResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3472,16 +4056,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Next" => { #[allow(non_camel_case_types)] struct NextSvc(pub Arc); - impl tonic::server::UnaryService for NextSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for NextSvc { type Response = super::NextResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::next(&inner, request).await }; + let fut = async move { + ::next(&inner, request).await + }; Box::pin(fut) } } @@ -3510,9 +4100,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Previous" => { #[allow(non_camel_case_types)] struct PreviousSvc(pub Arc); - impl tonic::server::UnaryService for PreviousSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PreviousSvc { type Response = super::PreviousResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3549,19 +4145,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { #[allow(non_camel_case_types)] struct FastForwardRewindSvc(pub Arc); - impl - tonic::server::UnaryService - for FastForwardRewindSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FastForwardRewindSvc { type Response = super::FastForwardRewindResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::fast_forward_rewind(&inner, request).await + ::fast_forward_rewind(&inner, request) + .await }; Box::pin(fut) } @@ -3591,9 +4191,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Status" => { #[allow(non_camel_case_types)] struct StatusSvc(pub Arc); - impl tonic::server::UnaryService for StatusSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for StatusSvc { type Response = super::StatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3630,11 +4236,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { #[allow(non_camel_case_types)] struct CurrentTrackSvc(pub Arc); - impl tonic::server::UnaryService - for CurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for CurrentTrackSvc { type Response = super::CurrentTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3671,9 +4281,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/NextTrack" => { #[allow(non_camel_case_types)] struct NextTrackSvc(pub Arc); - impl tonic::server::UnaryService for NextTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for NextTrackSvc { type Response = super::NextTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3710,19 +4326,25 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { #[allow(non_camel_case_types)] struct FlushAndReloadTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for FlushAndReloadTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FlushAndReloadTracksSvc { type Response = super::FlushAndReloadTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::flush_and_reload_tracks(&inner, request) + ::flush_and_reload_tracks( + &inner, + request, + ) .await }; Box::pin(fut) @@ -3753,19 +4375,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { #[allow(non_camel_case_types)] struct GetFilePositionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFilePositionSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for GetFilePositionSvc { type Response = super::GetFilePositionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_file_position(&inner, request).await + ::get_file_position(&inner, request) + .await }; Box::pin(fut) } @@ -3795,9 +4421,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/HardStop" => { #[allow(non_camel_case_types)] struct HardStopSvc(pub Arc); - impl tonic::server::UnaryService for HardStopSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for HardStopSvc { type Response = super::HardStopResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3834,9 +4466,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { #[allow(non_camel_case_types)] struct PlayAlbumSvc(pub Arc); - impl tonic::server::UnaryService for PlayAlbumSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAlbumSvc { type Response = super::PlayAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3873,19 +4511,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { #[allow(non_camel_case_types)] struct PlayArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayArtistTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayArtistTracksSvc { type Response = super::PlayArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_artist_tracks(&inner, request).await + ::play_artist_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3915,11 +4557,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { #[allow(non_camel_case_types)] struct PlayPlaylistSvc(pub Arc); - impl tonic::server::UnaryService - for PlayPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayPlaylistSvc { type Response = super::PlayPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3956,19 +4602,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { #[allow(non_camel_case_types)] struct PlayDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayDirectorySvc { type Response = super::PlayDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_directory(&inner, request).await + ::play_directory(&inner, request) + .await }; Box::pin(fut) } @@ -3998,19 +4648,26 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory" => { #[allow(non_camel_case_types)] struct PlayMusicDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayMusicDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayMusicDirectorySvc { type Response = super::PlayMusicDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_music_directory(&inner, request).await + ::play_music_directory( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -4040,9 +4697,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { #[allow(non_camel_case_types)] struct PlayTrackSvc(pub Arc); - impl tonic::server::UnaryService for PlayTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayTrackSvc { type Response = super::PlayTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4079,19 +4742,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { #[allow(non_camel_case_types)] struct PlayLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayLikedTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayLikedTracksSvc { type Response = super::PlayLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_liked_tracks(&inner, request).await + ::play_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -4121,19 +4788,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { #[allow(non_camel_case_types)] struct PlayAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayAllTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAllTracksSvc { type Response = super::PlayAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_all_tracks(&inner, request).await + ::play_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -4163,21 +4834,28 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { #[allow(non_camel_case_types)] struct StreamCurrentTrackSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamCurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService< + super::StreamCurrentTrackRequest, + > for StreamCurrentTrackSvc { type Response = super::CurrentTrackResponse; type ResponseStream = T::StreamCurrentTrackStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_current_track(&inner, request).await + ::stream_current_track( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -4207,14 +4885,16 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { #[allow(non_camel_case_types)] struct StreamStatusSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamStatusSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamStatusSvc { type Response = super::StatusResponse; type ResponseStream = T::StreamStatusStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4251,21 +4931,24 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { #[allow(non_camel_case_types)] struct StreamPlaylistSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamPlaylistSvc { type Response = super::PlaylistResponse; type ResponseStream = T::StreamPlaylistStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_playlist(&inner, request).await + ::stream_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -4292,19 +4975,23 @@ pub mod playback_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -4511,10 +5198,10 @@ pub mod playlist_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaylistServiceClient { inner: tonic::client::Grpc, @@ -4558,8 +5245,9 @@ pub mod playlist_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -4597,182 +5285,251 @@ pub mod playlist_service_client { pub async fn get_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetCurrent", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn get_resume_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetResumeInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_track_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetTrackInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_first_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetFirstIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), + ); self.inner.unary(req, path, codec).await } pub async fn get_display_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetDisplayIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "GetDisplayIndex", + ), + ); self.inner.unary(req, path, codec).await } pub async fn amount( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Amount", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "Amount", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); self.inner.unary(req, path, codec).await } pub async fn playlist_resume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/PlaylistResume", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "PlaylistResume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), + ); self.inner.unary(req, path, codec).await } pub async fn resume_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ResumeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ResumeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn set_modified( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/SetModified", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "SetModified", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), + ); self.inner.unary(req, path, codec).await } pub async fn start( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Start", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); @@ -4782,12 +5539,18 @@ pub mod playlist_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Sync", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); @@ -4796,172 +5559,247 @@ pub mod playlist_service_client { pub async fn remove_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "RemoveAllTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn remove_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn create_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "CreatePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn insert_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn shuffle_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ShufflePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "ShufflePlaylist", + ), + ); self.inner.unary(req, path, codec).await } } @@ -4973,7 +5811,7 @@ pub mod playlist_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. @@ -4982,23 +5820,38 @@ pub mod playlist_service_server { async fn get_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_resume_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_first_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_display_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn amount( &self, request: tonic::Request, @@ -5006,15 +5859,24 @@ pub mod playlist_service_server { async fn playlist_resume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_modified( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn start( &self, request: tonic::Request, @@ -5026,39 +5888,66 @@ pub mod playlist_service_server { async fn remove_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn remove_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn create_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn shuffle_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaylistServiceServer { @@ -5081,7 +5970,10 @@ pub mod playlist_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -5136,11 +6028,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { #[allow(non_camel_case_types)] struct GetCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for GetCurrentSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetCurrentSvc { type Response = super::GetCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5177,19 +6073,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { #[allow(non_camel_case_types)] struct GetResumeInfoSvc(pub Arc); - impl - tonic::server::UnaryService - for GetResumeInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetResumeInfoSvc { type Response = super::GetResumeInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_resume_info(&inner, request).await + ::get_resume_info(&inner, request) + .await }; Box::pin(fut) } @@ -5219,18 +6119,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { #[allow(non_camel_case_types)] struct GetTrackInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GetTrackInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetTrackInfoSvc { type Response = super::GetTrackInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_track_info(&inner, request).await + ::get_track_info(&inner, request) + .await }; Box::pin(fut) } @@ -5260,19 +6165,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { #[allow(non_camel_case_types)] struct GetFirstIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFirstIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetFirstIndexSvc { type Response = super::GetFirstIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_first_index(&inner, request).await + ::get_first_index(&inner, request) + .await }; Box::pin(fut) } @@ -5302,19 +6211,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { #[allow(non_camel_case_types)] struct GetDisplayIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetDisplayIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetDisplayIndexSvc { type Response = super::GetDisplayIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_display_index(&inner, request).await + ::get_display_index(&inner, request) + .await }; Box::pin(fut) } @@ -5344,9 +6257,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Amount" => { #[allow(non_camel_case_types)] struct AmountSvc(pub Arc); - impl tonic::server::UnaryService for AmountSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for AmountSvc { type Response = super::AmountResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5383,19 +6302,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { #[allow(non_camel_case_types)] struct PlaylistResumeSvc(pub Arc); - impl - tonic::server::UnaryService - for PlaylistResumeSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for PlaylistResumeSvc { type Response = super::PlaylistResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::playlist_resume(&inner, request).await + ::playlist_resume(&inner, request) + .await }; Box::pin(fut) } @@ -5425,11 +6348,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { #[allow(non_camel_case_types)] struct ResumeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for ResumeTrackSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ResumeTrackSvc { type Response = super::ResumeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5466,11 +6393,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/SetModified" => { #[allow(non_camel_case_types)] struct SetModifiedSvc(pub Arc); - impl tonic::server::UnaryService - for SetModifiedSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for SetModifiedSvc { type Response = super::SetModifiedResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5507,16 +6438,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Start" => { #[allow(non_camel_case_types)] struct StartSvc(pub Arc); - impl tonic::server::UnaryService for StartSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for StartSvc { type Response = super::StartResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::start(&inner, request).await }; + let fut = async move { + ::start(&inner, request).await + }; Box::pin(fut) } } @@ -5545,16 +6482,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Sync" => { #[allow(non_camel_case_types)] struct SyncSvc(pub Arc); - impl tonic::server::UnaryService for SyncSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for SyncSvc { type Response = super::SyncResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::sync(&inner, request).await }; + let fut = async move { + ::sync(&inner, request).await + }; Box::pin(fut) } } @@ -5583,19 +6526,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { #[allow(non_camel_case_types)] struct RemoveAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for RemoveAllTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveAllTracksSvc { type Response = super::RemoveAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::remove_all_tracks(&inner, request).await + ::remove_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -5625,11 +6572,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { #[allow(non_camel_case_types)] struct RemoveTracksSvc(pub Arc); - impl tonic::server::UnaryService - for RemoveTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveTracksSvc { type Response = super::RemoveTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5666,19 +6617,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { #[allow(non_camel_case_types)] struct CreatePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for CreatePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for CreatePlaylistSvc { type Response = super::CreatePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::create_playlist(&inner, request).await + ::create_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5708,11 +6663,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { #[allow(non_camel_case_types)] struct InsertTracksSvc(pub Arc); - impl tonic::server::UnaryService - for InsertTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertTracksSvc { type Response = super::InsertTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5749,19 +6708,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { #[allow(non_camel_case_types)] struct InsertDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for InsertDirectorySvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertDirectorySvc { type Response = super::InsertDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_directory(&inner, request).await + ::insert_directory(&inner, request) + .await }; Box::pin(fut) } @@ -5791,19 +6754,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { #[allow(non_camel_case_types)] struct InsertPlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertPlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertPlaylistSvc { type Response = super::InsertPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_playlist(&inner, request).await + ::insert_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5833,11 +6800,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { #[allow(non_camel_case_types)] struct InsertAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for InsertAlbumSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertAlbumSvc { type Response = super::InsertAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5874,19 +6845,26 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { #[allow(non_camel_case_types)] struct InsertArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertArtistTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertArtistTracksSvc { type Response = super::InsertArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_artist_tracks(&inner, request).await + ::insert_artist_tracks( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -5916,19 +6894,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { #[allow(non_camel_case_types)] struct ShufflePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for ShufflePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ShufflePlaylistSvc { type Response = super::ShufflePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::shuffle_playlist(&inner, request).await + ::shuffle_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5955,19 +6937,23 @@ pub mod playlist_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -6475,10 +7461,10 @@ pub mod settings_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SettingsServiceClient { inner: tonic::client::Grpc, @@ -6522,8 +7508,9 @@ pub mod settings_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -6561,58 +7548,85 @@ pub mod settings_service_client { pub async fn get_settings_list( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetSettingsList", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetSettingsList", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetSettingsList", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetGlobalSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetGlobalSettings", + ), + ); self.inner.unary(req, path, codec).await } pub async fn save_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/SaveSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "SaveSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), + ); self.inner.unary(req, path, codec).await } } @@ -6624,7 +7638,7 @@ pub mod settings_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. @@ -6633,15 +7647,24 @@ pub mod settings_service_server { async fn get_settings_list( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn save_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SettingsServiceServer { @@ -6664,7 +7687,10 @@ pub mod settings_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6719,19 +7745,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { #[allow(non_camel_case_types)] struct GetSettingsListSvc(pub Arc); - impl - tonic::server::UnaryService - for GetSettingsListSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetSettingsListSvc { type Response = super::GetSettingsListResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_settings_list(&inner, request).await + ::get_settings_list(&inner, request) + .await }; Box::pin(fut) } @@ -6761,19 +7791,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { #[allow(non_camel_case_types)] struct GetGlobalSettingsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetGlobalSettingsSvc { type Response = super::GetGlobalSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_settings(&inner, request).await + ::get_global_settings(&inner, request) + .await }; Box::pin(fut) } @@ -6803,11 +7837,15 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/SaveSettings" => { #[allow(non_camel_case_types)] struct SaveSettingsSvc(pub Arc); - impl tonic::server::UnaryService - for SaveSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for SaveSettingsSvc { type Response = super::SaveSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6841,19 +7879,23 @@ pub mod settings_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -7011,10 +8053,10 @@ pub mod sound_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SoundServiceClient { inner: tonic::client::Grpc, @@ -7058,8 +8100,9 @@ pub mod sound_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SoundServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -7097,31 +8140,48 @@ pub mod sound_service_client { pub async fn adjust_volume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/AdjustVolume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "AdjustVolume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_set( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundSet", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); @@ -7130,49 +8190,74 @@ pub mod sound_service_client { pub async fn sound_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundCurrent", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_default( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundDefault", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundDefault", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_min( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMin", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); @@ -7181,13 +8266,22 @@ pub mod sound_service_client { pub async fn sound_max( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMax", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); @@ -7196,49 +8290,72 @@ pub mod sound_service_client { pub async fn sound_unit( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundUnit", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundUnit", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); self.inner.unary(req, path, codec).await } pub async fn sound_val2_phys( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SoundVal2Phys", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundVal2Phys", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), + ); self.inner.unary(req, path, codec).await } pub async fn get_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/GetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); @@ -7247,13 +8364,22 @@ pub mod sound_service_client { pub async fn set_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); @@ -7262,13 +8388,22 @@ pub mod sound_service_client { pub async fn beep_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/BeepPlay", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); @@ -7277,76 +8412,106 @@ pub mod sound_service_client { pub async fn pcmbuf_fade( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/PcmbufFade", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufFade", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); self.inner.unary(req, path, codec).await } pub async fn pcmbuf_set_low_latency( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufSetLowLatency", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SoundService", + "PcmbufSetLowLatency", + ), + ); self.inner.unary(req, path, codec).await } pub async fn system_sound_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SystemSoundPlay", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SystemSoundPlay", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), + ); self.inner.unary(req, path, codec).await } pub async fn keyclick_click( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/KeyclickClick", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "KeyclickClick", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), + ); self.inner.unary(req, path, codec).await } } @@ -7358,7 +8523,7 @@ pub mod sound_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. @@ -7367,63 +8532,108 @@ pub mod sound_service_server { async fn adjust_volume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_set( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_default( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_min( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_max( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_unit( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_val2_phys( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn beep_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_fade( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_set_low_latency( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn system_sound_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn keyclick_click( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SoundServiceServer { @@ -7446,7 +8656,10 @@ pub mod sound_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -7501,11 +8714,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/AdjustVolume" => { #[allow(non_camel_case_types)] struct AdjustVolumeSvc(pub Arc); - impl tonic::server::UnaryService - for AdjustVolumeSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for AdjustVolumeSvc { type Response = super::AdjustVolumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7542,9 +8759,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundSet" => { #[allow(non_camel_case_types)] struct SoundSetSvc(pub Arc); - impl tonic::server::UnaryService for SoundSetSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundSetSvc { type Response = super::SoundSetResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7581,11 +8804,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundCurrent" => { #[allow(non_camel_case_types)] struct SoundCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for SoundCurrentSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundCurrentSvc { type Response = super::SoundCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7622,11 +8849,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundDefault" => { #[allow(non_camel_case_types)] struct SoundDefaultSvc(pub Arc); - impl tonic::server::UnaryService - for SoundDefaultSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundDefaultSvc { type Response = super::SoundDefaultResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7663,9 +8894,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMin" => { #[allow(non_camel_case_types)] struct SoundMinSvc(pub Arc); - impl tonic::server::UnaryService for SoundMinSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMinSvc { type Response = super::SoundMinResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7702,9 +8939,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMax" => { #[allow(non_camel_case_types)] struct SoundMaxSvc(pub Arc); - impl tonic::server::UnaryService for SoundMaxSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMaxSvc { type Response = super::SoundMaxResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7741,9 +8984,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundUnit" => { #[allow(non_camel_case_types)] struct SoundUnitSvc(pub Arc); - impl tonic::server::UnaryService for SoundUnitSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundUnitSvc { type Response = super::SoundUnitResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7780,11 +9029,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { #[allow(non_camel_case_types)] struct SoundVal2PhysSvc(pub Arc); - impl tonic::server::UnaryService - for SoundVal2PhysSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundVal2PhysSvc { type Response = super::SoundVal2PhysResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7821,9 +9074,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/GetPitch" => { #[allow(non_camel_case_types)] struct GetPitchSvc(pub Arc); - impl tonic::server::UnaryService for GetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for GetPitchSvc { type Response = super::GetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7860,9 +9119,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SetPitch" => { #[allow(non_camel_case_types)] struct SetPitchSvc(pub Arc); - impl tonic::server::UnaryService for SetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SetPitchSvc { type Response = super::SetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7899,9 +9164,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/BeepPlay" => { #[allow(non_camel_case_types)] struct BeepPlaySvc(pub Arc); - impl tonic::server::UnaryService for BeepPlaySvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for BeepPlaySvc { type Response = super::BeepPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7938,9 +9209,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufFade" => { #[allow(non_camel_case_types)] struct PcmbufFadeSvc(pub Arc); - impl tonic::server::UnaryService for PcmbufFadeSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufFadeSvc { type Response = super::PcmbufFadeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7977,19 +9254,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { #[allow(non_camel_case_types)] struct PcmbufSetLowLatencySvc(pub Arc); - impl - tonic::server::UnaryService - for PcmbufSetLowLatencySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufSetLowLatencySvc { type Response = super::PcmbufSetLowLatencyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::pcmbuf_set_low_latency(&inner, request).await + ::pcmbuf_set_low_latency(&inner, request) + .await }; Box::pin(fut) } @@ -8019,18 +9300,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { #[allow(non_camel_case_types)] struct SystemSoundPlaySvc(pub Arc); - impl tonic::server::UnaryService - for SystemSoundPlaySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SystemSoundPlaySvc { type Response = super::SystemSoundPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::system_sound_play(&inner, request).await + ::system_sound_play(&inner, request) + .await }; Box::pin(fut) } @@ -8060,11 +9346,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/KeyclickClick" => { #[allow(non_camel_case_types)] struct KeyclickClickSvc(pub Arc); - impl tonic::server::UnaryService - for KeyclickClickSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for KeyclickClickSvc { type Response = super::KeyclickClickResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -8098,19 +9388,23 @@ pub mod sound_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -8171,10 +9465,10 @@ pub mod system_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SystemServiceClient { inner: tonic::client::Grpc, @@ -8218,8 +9512,9 @@ pub mod system_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SystemServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -8257,39 +9552,56 @@ pub mod system_service_client { pub async fn get_rockbox_version( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetRockboxVersion", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetRockboxVersion", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SystemService", + "GetRockboxVersion", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_status( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetGlobalStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetGlobalStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), + ); self.inner.unary(req, path, codec).await } } @@ -8301,7 +9613,7 @@ pub mod system_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. @@ -8310,11 +9622,17 @@ pub mod system_service_server { async fn get_rockbox_version( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SystemServiceServer { @@ -8337,7 +9655,10 @@ pub mod system_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -8392,19 +9713,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { #[allow(non_camel_case_types)] struct GetRockboxVersionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetRockboxVersionSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetRockboxVersionSvc { type Response = super::GetRockboxVersionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_rockbox_version(&inner, request).await + ::get_rockbox_version(&inner, request) + .await }; Box::pin(fut) } @@ -8434,19 +9759,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { #[allow(non_camel_case_types)] struct GetGlobalStatusSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalStatusSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetGlobalStatusSvc { type Response = super::GetGlobalStatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_status(&inner, request).await + ::get_global_status(&inner, request) + .await }; Box::pin(fut) } @@ -8473,19 +9802,23 @@ pub mod system_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } diff --git a/gtk/src/api/rockbox.v1alpha1.rs b/gtk/src/api/rockbox.v1alpha1.rs index 39289700ab..2dc7619697 100644 --- a/gtk/src/api/rockbox.v1alpha1.rs +++ b/gtk/src/api/rockbox.v1alpha1.rs @@ -43,10 +43,10 @@ pub mod browse_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct BrowseServiceClient { inner: tonic::client::Grpc, @@ -90,8 +90,9 @@ pub mod browse_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -129,20 +130,27 @@ pub mod browse_service_client { pub async fn tree_get_entries( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.BrowseService/TreeGetEntries", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.BrowseService", - "TreeGetEntries", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), + ); self.inner.unary(req, path, codec).await } } @@ -154,7 +162,7 @@ pub mod browse_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. @@ -163,7 +171,10 @@ pub mod browse_service_server { async fn tree_get_entries( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct BrowseServiceServer { @@ -186,7 +197,10 @@ pub mod browse_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -241,18 +255,23 @@ pub mod browse_service_server { "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { #[allow(non_camel_case_types)] struct TreeGetEntriesSvc(pub Arc); - impl tonic::server::UnaryService - for TreeGetEntriesSvc - { + impl< + T: BrowseService, + > tonic::server::UnaryService + for TreeGetEntriesSvc { type Response = super::TreeGetEntriesResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::tree_get_entries(&inner, request).await + ::tree_get_entries(&inner, request) + .await }; Box::pin(fut) } @@ -279,19 +298,23 @@ pub mod browse_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -519,10 +542,10 @@ pub mod library_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct LibraryServiceClient { inner: tonic::client::Grpc, @@ -566,8 +589,9 @@ pub mod library_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -605,245 +629,343 @@ pub mod library_service_client { pub async fn get_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbums", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbums", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); self.inner.unary(req, path, codec).await } pub async fn get_artists( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtists", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtists", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), + ); self.inner.unary(req, path, codec).await } pub async fn get_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTracks", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTracks", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); self.inner.unary(req, path, codec).await } pub async fn get_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); self.inner.unary(req, path, codec).await } pub async fn get_artist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetArtist", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetArtist", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); self.inner.unary(req, path, codec).await } pub async fn get_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/GetTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); self.inner.unary(req, path, codec).await } pub async fn like_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeTrack", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); self.inner.unary(req, path, codec).await } pub async fn unlike_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn like_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/LikeAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "LikeAlbum", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); self.inner.unary(req, path, codec).await } pub async fn unlike_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "UnlikeAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn get_liked_albums( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "GetLikedAlbums", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), + ); self.inner.unary(req, path, codec).await } pub async fn scan_library( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.LibraryService/ScanLibrary", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.LibraryService", - "ScanLibrary", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), + ); self.inner.unary(req, path, codec).await } pub async fn search( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.LibraryService/Search", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); @@ -858,7 +980,7 @@ pub mod library_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. @@ -867,55 +989,94 @@ pub mod library_service_server { async fn get_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artists( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_artist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn like_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn unlike_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_liked_albums( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn scan_library( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn search( &self, request: tonic::Request, @@ -942,7 +1103,10 @@ pub mod library_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -997,9 +1161,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbums" => { #[allow(non_camel_case_types)] struct GetAlbumsSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumsSvc { type Response = super::GetAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1036,9 +1206,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtists" => { #[allow(non_camel_case_types)] struct GetArtistsSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistsSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistsSvc { type Response = super::GetArtistsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1075,9 +1251,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTracks" => { #[allow(non_camel_case_types)] struct GetTracksSvc(pub Arc); - impl tonic::server::UnaryService for GetTracksSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTracksSvc { type Response = super::GetTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1114,9 +1296,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetAlbum" => { #[allow(non_camel_case_types)] struct GetAlbumSvc(pub Arc); - impl tonic::server::UnaryService for GetAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetAlbumSvc { type Response = super::GetAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1153,9 +1341,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetArtist" => { #[allow(non_camel_case_types)] struct GetArtistSvc(pub Arc); - impl tonic::server::UnaryService for GetArtistSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetArtistSvc { type Response = super::GetArtistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1192,9 +1386,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetTrack" => { #[allow(non_camel_case_types)] struct GetTrackSvc(pub Arc); - impl tonic::server::UnaryService for GetTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetTrackSvc { type Response = super::GetTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1231,9 +1431,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeTrack" => { #[allow(non_camel_case_types)] struct LikeTrackSvc(pub Arc); - impl tonic::server::UnaryService for LikeTrackSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeTrackSvc { type Response = super::LikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1270,11 +1476,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { #[allow(non_camel_case_types)] struct UnlikeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeTrackSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeTrackSvc { type Response = super::UnlikeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1311,9 +1521,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { #[allow(non_camel_case_types)] struct LikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService for LikeAlbumSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for LikeAlbumSvc { type Response = super::LikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1350,11 +1566,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { #[allow(non_camel_case_types)] struct UnlikeAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for UnlikeAlbumSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for UnlikeAlbumSvc { type Response = super::UnlikeAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1391,19 +1611,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { #[allow(non_camel_case_types)] struct GetLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedTracksSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedTracksSvc { type Response = super::GetLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_tracks(&inner, request).await + ::get_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -1433,19 +1657,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { #[allow(non_camel_case_types)] struct GetLikedAlbumsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetLikedAlbumsSvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for GetLikedAlbumsSvc { type Response = super::GetLikedAlbumsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_liked_albums(&inner, request).await + ::get_liked_albums(&inner, request) + .await }; Box::pin(fut) } @@ -1475,11 +1703,15 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { #[allow(non_camel_case_types)] struct ScanLibrarySvc(pub Arc); - impl tonic::server::UnaryService - for ScanLibrarySvc - { + impl< + T: LibraryService, + > tonic::server::UnaryService + for ScanLibrarySvc { type Response = super::ScanLibraryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1516,16 +1748,23 @@ pub mod library_service_server { "/rockbox.v1alpha1.LibraryService/Search" => { #[allow(non_camel_case_types)] struct SearchSvc(pub Arc); - impl tonic::server::UnaryService for SearchSvc { + impl< + T: LibraryService, + > tonic::server::UnaryService + for SearchSvc { type Response = super::SearchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::search(&inner, request).await }; + let fut = async move { + ::search(&inner, request).await + }; Box::pin(fut) } } @@ -1551,19 +1790,23 @@ pub mod library_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -1592,10 +1835,10 @@ pub mod metadata_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct MetadataServiceClient { inner: tonic::client::Grpc, @@ -1639,8 +1882,9 @@ pub mod metadata_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -1684,7 +1928,7 @@ pub mod metadata_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. @@ -1711,7 +1955,10 @@ pub mod metadata_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1763,19 +2010,23 @@ pub mod metadata_service_server { } fn call(&mut self, req: http::Request) -> Self::Future { match req.uri().path() { - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -2044,10 +2295,10 @@ pub mod playback_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaybackServiceClient { inner: tonic::client::Grpc, @@ -2091,8 +2342,9 @@ pub mod playback_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -2131,12 +2383,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Play", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); @@ -2146,12 +2404,18 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Pause", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); @@ -2161,29 +2425,39 @@ pub mod playback_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Resume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Resume", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); self.inner.unary(req, path, codec).await } pub async fn next( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Next", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); @@ -2192,274 +2466,397 @@ pub mod playback_service_client { pub async fn previous( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Previous", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Previous", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); self.inner.unary(req, path, codec).await } pub async fn fast_forward_rewind( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FastForwardRewind", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FastForwardRewind", + ), + ); self.inner.unary(req, path, codec).await } pub async fn status( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/Status", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "Status", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); self.inner.unary(req, path, codec).await } pub async fn current_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/CurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "CurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn next_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/NextTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "NextTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn flush_and_reload_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "FlushAndReloadTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "FlushAndReloadTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_file_position( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/GetFilePosition", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "GetFilePosition", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "GetFilePosition", + ), + ); self.inner.unary(req, path, codec).await } pub async fn hard_stop( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/HardStop", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "HardStop", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); self.inner.unary(req, path, codec).await } pub async fn play_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayAlbum", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn play_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn play_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), + ); self.inner.unary(req, path, codec).await } pub async fn play_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaybackService/PlayTrack", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn play_liked_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayLikedTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "PlayLikedTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn play_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "PlayAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn stream_current_track( @@ -2469,18 +2866,26 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamCurrentTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaybackService", + "StreamCurrentTrack", + ), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_status( @@ -2490,18 +2895,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), + ); self.inner.server_streaming(req, path, codec).await } pub async fn stream_playlist( @@ -2511,18 +2921,23 @@ pub mod playback_service_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaybackService", - "StreamPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), + ); self.inner.server_streaming(req, path, codec).await } } @@ -2534,7 +2949,7 @@ pub mod playback_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. @@ -2559,11 +2974,17 @@ pub mod playback_service_server { async fn previous( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn fast_forward_rewind( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn status( &self, request: tonic::Request, @@ -2571,78 +2992,126 @@ pub mod playback_service_server { async fn current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn next_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn flush_and_reload_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_file_position( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn hard_stop( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_liked_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn play_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamCurrentTrack method. type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_current_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamStatus method. type StreamStatusStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the StreamPlaylist method. type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + std::marker::Send + > + + std::marker::Send + 'static; async fn stream_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaybackServiceServer { @@ -2665,7 +3134,10 @@ pub mod playback_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -2720,16 +3192,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Play" => { #[allow(non_camel_case_types)] struct PlaySvc(pub Arc); - impl tonic::server::UnaryService for PlaySvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PlaySvc { type Response = super::PlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::play(&inner, request).await }; + let fut = async move { + ::play(&inner, request).await + }; Box::pin(fut) } } @@ -2758,16 +3236,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Pause" => { #[allow(non_camel_case_types)] struct PauseSvc(pub Arc); - impl tonic::server::UnaryService for PauseSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for PauseSvc { type Response = super::PauseResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::pause(&inner, request).await }; + let fut = async move { + ::pause(&inner, request).await + }; Box::pin(fut) } } @@ -2796,9 +3280,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Resume" => { #[allow(non_camel_case_types)] struct ResumeSvc(pub Arc); - impl tonic::server::UnaryService for ResumeSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for ResumeSvc { type Response = super::ResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2835,16 +3325,22 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Next" => { #[allow(non_camel_case_types)] struct NextSvc(pub Arc); - impl tonic::server::UnaryService for NextSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService for NextSvc { type Response = super::NextResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::next(&inner, request).await }; + let fut = async move { + ::next(&inner, request).await + }; Box::pin(fut) } } @@ -2873,9 +3369,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Previous" => { #[allow(non_camel_case_types)] struct PreviousSvc(pub Arc); - impl tonic::server::UnaryService for PreviousSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PreviousSvc { type Response = super::PreviousResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2912,19 +3414,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { #[allow(non_camel_case_types)] struct FastForwardRewindSvc(pub Arc); - impl - tonic::server::UnaryService - for FastForwardRewindSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FastForwardRewindSvc { type Response = super::FastForwardRewindResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::fast_forward_rewind(&inner, request).await + ::fast_forward_rewind(&inner, request) + .await }; Box::pin(fut) } @@ -2954,9 +3460,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/Status" => { #[allow(non_camel_case_types)] struct StatusSvc(pub Arc); - impl tonic::server::UnaryService for StatusSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for StatusSvc { type Response = super::StatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -2993,11 +3505,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { #[allow(non_camel_case_types)] struct CurrentTrackSvc(pub Arc); - impl tonic::server::UnaryService - for CurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for CurrentTrackSvc { type Response = super::CurrentTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3034,9 +3550,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/NextTrack" => { #[allow(non_camel_case_types)] struct NextTrackSvc(pub Arc); - impl tonic::server::UnaryService for NextTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for NextTrackSvc { type Response = super::NextTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3073,19 +3595,25 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { #[allow(non_camel_case_types)] struct FlushAndReloadTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for FlushAndReloadTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for FlushAndReloadTracksSvc { type Response = super::FlushAndReloadTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::flush_and_reload_tracks(&inner, request) + ::flush_and_reload_tracks( + &inner, + request, + ) .await }; Box::pin(fut) @@ -3116,19 +3644,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { #[allow(non_camel_case_types)] struct GetFilePositionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFilePositionSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for GetFilePositionSvc { type Response = super::GetFilePositionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_file_position(&inner, request).await + ::get_file_position(&inner, request) + .await }; Box::pin(fut) } @@ -3158,9 +3690,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/HardStop" => { #[allow(non_camel_case_types)] struct HardStopSvc(pub Arc); - impl tonic::server::UnaryService for HardStopSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for HardStopSvc { type Response = super::HardStopResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3197,9 +3735,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { #[allow(non_camel_case_types)] struct PlayAlbumSvc(pub Arc); - impl tonic::server::UnaryService for PlayAlbumSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAlbumSvc { type Response = super::PlayAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3236,19 +3780,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { #[allow(non_camel_case_types)] struct PlayArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayArtistTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayArtistTracksSvc { type Response = super::PlayArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_artist_tracks(&inner, request).await + ::play_artist_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3278,11 +3826,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { #[allow(non_camel_case_types)] struct PlayPlaylistSvc(pub Arc); - impl tonic::server::UnaryService - for PlayPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayPlaylistSvc { type Response = super::PlayPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3319,19 +3871,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { #[allow(non_camel_case_types)] struct PlayDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for PlayDirectorySvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayDirectorySvc { type Response = super::PlayDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_directory(&inner, request).await + ::play_directory(&inner, request) + .await }; Box::pin(fut) } @@ -3361,9 +3917,15 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { #[allow(non_camel_case_types)] struct PlayTrackSvc(pub Arc); - impl tonic::server::UnaryService for PlayTrackSvc { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayTrackSvc { type Response = super::PlayTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3400,19 +3962,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { #[allow(non_camel_case_types)] struct PlayLikedTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayLikedTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayLikedTracksSvc { type Response = super::PlayLikedTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_liked_tracks(&inner, request).await + ::play_liked_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3442,19 +4008,23 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { #[allow(non_camel_case_types)] struct PlayAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for PlayAllTracksSvc - { + impl< + T: PlaybackService, + > tonic::server::UnaryService + for PlayAllTracksSvc { type Response = super::PlayAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::play_all_tracks(&inner, request).await + ::play_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -3484,21 +4054,28 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { #[allow(non_camel_case_types)] struct StreamCurrentTrackSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamCurrentTrackSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService< + super::StreamCurrentTrackRequest, + > for StreamCurrentTrackSvc { type Response = super::CurrentTrackResponse; type ResponseStream = T::StreamCurrentTrackStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_current_track(&inner, request).await + ::stream_current_track( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -3528,14 +4105,16 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { #[allow(non_camel_case_types)] struct StreamStatusSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamStatusSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamStatusSvc { type Response = super::StatusResponse; type ResponseStream = T::StreamStatusStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -3572,21 +4151,24 @@ pub mod playback_service_server { "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { #[allow(non_camel_case_types)] struct StreamPlaylistSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for StreamPlaylistSvc - { + impl< + T: PlaybackService, + > tonic::server::ServerStreamingService + for StreamPlaylistSvc { type Response = super::PlaylistResponse; type ResponseStream = T::StreamPlaylistStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::stream_playlist(&inner, request).await + ::stream_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -3613,19 +4195,23 @@ pub mod playback_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -3830,10 +4416,10 @@ pub mod playlist_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct PlaylistServiceClient { inner: tonic::client::Grpc, @@ -3877,8 +4463,9 @@ pub mod playlist_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -3916,182 +4503,251 @@ pub mod playlist_service_client { pub async fn get_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetCurrent", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn get_resume_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetResumeInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_track_info( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetTrackInfo", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), + ); self.inner.unary(req, path, codec).await } pub async fn get_first_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetFirstIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), + ); self.inner.unary(req, path, codec).await } pub async fn get_display_index( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "GetDisplayIndex", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "GetDisplayIndex", + ), + ); self.inner.unary(req, path, codec).await } pub async fn amount( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Amount", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "Amount", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); self.inner.unary(req, path, codec).await } pub async fn playlist_resume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/PlaylistResume", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "PlaylistResume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), + ); self.inner.unary(req, path, codec).await } pub async fn resume_track( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ResumeTrack", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ResumeTrack", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), + ); self.inner.unary(req, path, codec).await } pub async fn set_modified( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/SetModified", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "SetModified", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), + ); self.inner.unary(req, path, codec).await } pub async fn start( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Start", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); @@ -4101,12 +4757,18 @@ pub mod playlist_service_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.PlaylistService/Sync", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); @@ -4115,172 +4777,247 @@ pub mod playlist_service_client { pub async fn remove_all_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveAllTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "RemoveAllTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn remove_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/RemoveTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "RemoveTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn create_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "CreatePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_directory( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertDirectory", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertDirectory", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertDirectory", + ), + ); self.inner.unary(req, path, codec).await } pub async fn insert_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertPlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_album( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertAlbum", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertAlbum", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), + ); self.inner.unary(req, path, codec).await } pub async fn insert_artist_tracks( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "InsertArtistTracks", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "InsertArtistTracks", + ), + ); self.inner.unary(req, path, codec).await } pub async fn shuffle_playlist( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.PlaylistService", - "ShufflePlaylist", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.PlaylistService", + "ShufflePlaylist", + ), + ); self.inner.unary(req, path, codec).await } } @@ -4292,7 +5029,7 @@ pub mod playlist_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. @@ -4301,23 +5038,38 @@ pub mod playlist_service_server { async fn get_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_resume_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_track_info( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_first_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_display_index( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn amount( &self, request: tonic::Request, @@ -4325,15 +5077,24 @@ pub mod playlist_service_server { async fn playlist_resume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn resume_track( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_modified( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn start( &self, request: tonic::Request, @@ -4345,39 +5106,66 @@ pub mod playlist_service_server { async fn remove_all_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn remove_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn create_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_directory( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_album( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn insert_artist_tracks( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn shuffle_playlist( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PlaylistServiceServer { @@ -4400,7 +5188,10 @@ pub mod playlist_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -4455,11 +5246,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { #[allow(non_camel_case_types)] struct GetCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for GetCurrentSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetCurrentSvc { type Response = super::GetCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4496,19 +5291,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { #[allow(non_camel_case_types)] struct GetResumeInfoSvc(pub Arc); - impl - tonic::server::UnaryService - for GetResumeInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetResumeInfoSvc { type Response = super::GetResumeInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_resume_info(&inner, request).await + ::get_resume_info(&inner, request) + .await }; Box::pin(fut) } @@ -4538,18 +5337,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { #[allow(non_camel_case_types)] struct GetTrackInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GetTrackInfoSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetTrackInfoSvc { type Response = super::GetTrackInfoResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_track_info(&inner, request).await + ::get_track_info(&inner, request) + .await }; Box::pin(fut) } @@ -4579,19 +5383,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { #[allow(non_camel_case_types)] struct GetFirstIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetFirstIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetFirstIndexSvc { type Response = super::GetFirstIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_first_index(&inner, request).await + ::get_first_index(&inner, request) + .await }; Box::pin(fut) } @@ -4621,19 +5429,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { #[allow(non_camel_case_types)] struct GetDisplayIndexSvc(pub Arc); - impl - tonic::server::UnaryService - for GetDisplayIndexSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for GetDisplayIndexSvc { type Response = super::GetDisplayIndexResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_display_index(&inner, request).await + ::get_display_index(&inner, request) + .await }; Box::pin(fut) } @@ -4663,9 +5475,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Amount" => { #[allow(non_camel_case_types)] struct AmountSvc(pub Arc); - impl tonic::server::UnaryService for AmountSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for AmountSvc { type Response = super::AmountResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4702,19 +5520,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { #[allow(non_camel_case_types)] struct PlaylistResumeSvc(pub Arc); - impl - tonic::server::UnaryService - for PlaylistResumeSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for PlaylistResumeSvc { type Response = super::PlaylistResumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::playlist_resume(&inner, request).await + ::playlist_resume(&inner, request) + .await }; Box::pin(fut) } @@ -4744,11 +5566,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { #[allow(non_camel_case_types)] struct ResumeTrackSvc(pub Arc); - impl tonic::server::UnaryService - for ResumeTrackSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ResumeTrackSvc { type Response = super::ResumeTrackResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4785,11 +5611,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/SetModified" => { #[allow(non_camel_case_types)] struct SetModifiedSvc(pub Arc); - impl tonic::server::UnaryService - for SetModifiedSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for SetModifiedSvc { type Response = super::SetModifiedResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4826,16 +5656,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Start" => { #[allow(non_camel_case_types)] struct StartSvc(pub Arc); - impl tonic::server::UnaryService for StartSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for StartSvc { type Response = super::StartResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::start(&inner, request).await }; + let fut = async move { + ::start(&inner, request).await + }; Box::pin(fut) } } @@ -4864,16 +5700,22 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/Sync" => { #[allow(non_camel_case_types)] struct SyncSvc(pub Arc); - impl tonic::server::UnaryService for SyncSvc { + impl< + T: PlaylistService, + > tonic::server::UnaryService for SyncSvc { type Response = super::SyncResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::sync(&inner, request).await }; + let fut = async move { + ::sync(&inner, request).await + }; Box::pin(fut) } } @@ -4902,19 +5744,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { #[allow(non_camel_case_types)] struct RemoveAllTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for RemoveAllTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveAllTracksSvc { type Response = super::RemoveAllTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::remove_all_tracks(&inner, request).await + ::remove_all_tracks(&inner, request) + .await }; Box::pin(fut) } @@ -4944,11 +5790,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { #[allow(non_camel_case_types)] struct RemoveTracksSvc(pub Arc); - impl tonic::server::UnaryService - for RemoveTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for RemoveTracksSvc { type Response = super::RemoveTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -4985,19 +5835,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { #[allow(non_camel_case_types)] struct CreatePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for CreatePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for CreatePlaylistSvc { type Response = super::CreatePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::create_playlist(&inner, request).await + ::create_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5027,11 +5881,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { #[allow(non_camel_case_types)] struct InsertTracksSvc(pub Arc); - impl tonic::server::UnaryService - for InsertTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertTracksSvc { type Response = super::InsertTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5068,19 +5926,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { #[allow(non_camel_case_types)] struct InsertDirectorySvc(pub Arc); - impl - tonic::server::UnaryService - for InsertDirectorySvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertDirectorySvc { type Response = super::InsertDirectoryResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_directory(&inner, request).await + ::insert_directory(&inner, request) + .await }; Box::pin(fut) } @@ -5110,19 +5972,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { #[allow(non_camel_case_types)] struct InsertPlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertPlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertPlaylistSvc { type Response = super::InsertPlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_playlist(&inner, request).await + ::insert_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5152,11 +6018,15 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { #[allow(non_camel_case_types)] struct InsertAlbumSvc(pub Arc); - impl tonic::server::UnaryService - for InsertAlbumSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertAlbumSvc { type Response = super::InsertAlbumResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5193,19 +6063,26 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { #[allow(non_camel_case_types)] struct InsertArtistTracksSvc(pub Arc); - impl - tonic::server::UnaryService - for InsertArtistTracksSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for InsertArtistTracksSvc { type Response = super::InsertArtistTracksResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::insert_artist_tracks(&inner, request).await + ::insert_artist_tracks( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -5235,19 +6112,23 @@ pub mod playlist_service_server { "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { #[allow(non_camel_case_types)] struct ShufflePlaylistSvc(pub Arc); - impl - tonic::server::UnaryService - for ShufflePlaylistSvc - { + impl< + T: PlaylistService, + > tonic::server::UnaryService + for ShufflePlaylistSvc { type Response = super::ShufflePlaylistResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::shuffle_playlist(&inner, request).await + ::shuffle_playlist(&inner, request) + .await }; Box::pin(fut) } @@ -5274,19 +6155,23 @@ pub mod playlist_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -5794,10 +6679,10 @@ pub mod settings_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SettingsServiceClient { inner: tonic::client::Grpc, @@ -5841,8 +6726,9 @@ pub mod settings_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -5880,58 +6766,85 @@ pub mod settings_service_client { pub async fn get_settings_list( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetSettingsList", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetSettingsList", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetSettingsList", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "GetGlobalSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SettingsService", + "GetGlobalSettings", + ), + ); self.inner.unary(req, path, codec).await } pub async fn save_settings( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SettingsService/SaveSettings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SettingsService", - "SaveSettings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), + ); self.inner.unary(req, path, codec).await } } @@ -5943,7 +6856,7 @@ pub mod settings_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. @@ -5952,15 +6865,24 @@ pub mod settings_service_server { async fn get_settings_list( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn save_settings( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SettingsServiceServer { @@ -5983,7 +6905,10 @@ pub mod settings_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6038,19 +6963,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { #[allow(non_camel_case_types)] struct GetSettingsListSvc(pub Arc); - impl - tonic::server::UnaryService - for GetSettingsListSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetSettingsListSvc { type Response = super::GetSettingsListResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_settings_list(&inner, request).await + ::get_settings_list(&inner, request) + .await }; Box::pin(fut) } @@ -6080,19 +7009,23 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { #[allow(non_camel_case_types)] struct GetGlobalSettingsSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for GetGlobalSettingsSvc { type Response = super::GetGlobalSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_settings(&inner, request).await + ::get_global_settings(&inner, request) + .await }; Box::pin(fut) } @@ -6122,11 +7055,15 @@ pub mod settings_service_server { "/rockbox.v1alpha1.SettingsService/SaveSettings" => { #[allow(non_camel_case_types)] struct SaveSettingsSvc(pub Arc); - impl tonic::server::UnaryService - for SaveSettingsSvc - { + impl< + T: SettingsService, + > tonic::server::UnaryService + for SaveSettingsSvc { type Response = super::SaveSettingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6160,19 +7097,23 @@ pub mod settings_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -6330,10 +7271,10 @@ pub mod sound_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SoundServiceClient { inner: tonic::client::Grpc, @@ -6377,8 +7318,9 @@ pub mod sound_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SoundServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -6416,31 +7358,48 @@ pub mod sound_service_client { pub async fn adjust_volume( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/AdjustVolume", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "AdjustVolume", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_set( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundSet", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); @@ -6449,49 +7408,74 @@ pub mod sound_service_client { pub async fn sound_current( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundCurrent", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundCurrent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_default( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundDefault", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundDefault", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), + ); self.inner.unary(req, path, codec).await } pub async fn sound_min( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMin", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); @@ -6500,13 +7484,22 @@ pub mod sound_service_client { pub async fn sound_max( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundMax", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); @@ -6515,49 +7508,72 @@ pub mod sound_service_client { pub async fn sound_unit( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SoundUnit", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundUnit", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); self.inner.unary(req, path, codec).await } pub async fn sound_val2_phys( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SoundVal2Phys", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SoundVal2Phys", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), + ); self.inner.unary(req, path, codec).await } pub async fn get_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/GetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); @@ -6566,13 +7582,22 @@ pub mod sound_service_client { pub async fn set_pitch( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/SetPitch", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); @@ -6581,13 +7606,22 @@ pub mod sound_service_client { pub async fn beep_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/BeepPlay", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); @@ -6596,76 +7630,106 @@ pub mod sound_service_client { pub async fn pcmbuf_fade( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); + let path = http::uri::PathAndQuery::from_static( + "/rockbox.v1alpha1.SoundService/PcmbufFade", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufFade", - )); + req.extensions_mut() + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); self.inner.unary(req, path, codec).await } pub async fn pcmbuf_set_low_latency( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "PcmbufSetLowLatency", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SoundService", + "PcmbufSetLowLatency", + ), + ); self.inner.unary(req, path, codec).await } pub async fn system_sound_play( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/SystemSoundPlay", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "SystemSoundPlay", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), + ); self.inner.unary(req, path, codec).await } pub async fn keyclick_click( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SoundService/KeyclickClick", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SoundService", - "KeyclickClick", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), + ); self.inner.unary(req, path, codec).await } } @@ -6677,7 +7741,7 @@ pub mod sound_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. @@ -6686,63 +7750,108 @@ pub mod sound_service_server { async fn adjust_volume( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_set( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_current( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_default( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_min( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_max( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_unit( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn sound_val2_phys( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn set_pitch( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn beep_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_fade( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn pcmbuf_set_low_latency( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn system_sound_play( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn keyclick_click( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SoundServiceServer { @@ -6765,7 +7874,10 @@ pub mod sound_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -6820,11 +7932,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/AdjustVolume" => { #[allow(non_camel_case_types)] struct AdjustVolumeSvc(pub Arc); - impl tonic::server::UnaryService - for AdjustVolumeSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for AdjustVolumeSvc { type Response = super::AdjustVolumeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6861,9 +7977,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundSet" => { #[allow(non_camel_case_types)] struct SoundSetSvc(pub Arc); - impl tonic::server::UnaryService for SoundSetSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundSetSvc { type Response = super::SoundSetResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6900,11 +8022,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundCurrent" => { #[allow(non_camel_case_types)] struct SoundCurrentSvc(pub Arc); - impl tonic::server::UnaryService - for SoundCurrentSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundCurrentSvc { type Response = super::SoundCurrentResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6941,11 +8067,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundDefault" => { #[allow(non_camel_case_types)] struct SoundDefaultSvc(pub Arc); - impl tonic::server::UnaryService - for SoundDefaultSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundDefaultSvc { type Response = super::SoundDefaultResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6982,9 +8112,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMin" => { #[allow(non_camel_case_types)] struct SoundMinSvc(pub Arc); - impl tonic::server::UnaryService for SoundMinSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMinSvc { type Response = super::SoundMinResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7021,9 +8157,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundMax" => { #[allow(non_camel_case_types)] struct SoundMaxSvc(pub Arc); - impl tonic::server::UnaryService for SoundMaxSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundMaxSvc { type Response = super::SoundMaxResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7060,9 +8202,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundUnit" => { #[allow(non_camel_case_types)] struct SoundUnitSvc(pub Arc); - impl tonic::server::UnaryService for SoundUnitSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundUnitSvc { type Response = super::SoundUnitResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7099,11 +8247,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { #[allow(non_camel_case_types)] struct SoundVal2PhysSvc(pub Arc); - impl tonic::server::UnaryService - for SoundVal2PhysSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SoundVal2PhysSvc { type Response = super::SoundVal2PhysResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7140,9 +8292,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/GetPitch" => { #[allow(non_camel_case_types)] struct GetPitchSvc(pub Arc); - impl tonic::server::UnaryService for GetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for GetPitchSvc { type Response = super::GetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7179,9 +8337,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SetPitch" => { #[allow(non_camel_case_types)] struct SetPitchSvc(pub Arc); - impl tonic::server::UnaryService for SetPitchSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for SetPitchSvc { type Response = super::SetPitchResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7218,9 +8382,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/BeepPlay" => { #[allow(non_camel_case_types)] struct BeepPlaySvc(pub Arc); - impl tonic::server::UnaryService for BeepPlaySvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for BeepPlaySvc { type Response = super::BeepPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7257,9 +8427,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufFade" => { #[allow(non_camel_case_types)] struct PcmbufFadeSvc(pub Arc); - impl tonic::server::UnaryService for PcmbufFadeSvc { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufFadeSvc { type Response = super::PcmbufFadeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7296,19 +8472,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { #[allow(non_camel_case_types)] struct PcmbufSetLowLatencySvc(pub Arc); - impl - tonic::server::UnaryService - for PcmbufSetLowLatencySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for PcmbufSetLowLatencySvc { type Response = super::PcmbufSetLowLatencyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::pcmbuf_set_low_latency(&inner, request).await + ::pcmbuf_set_low_latency(&inner, request) + .await }; Box::pin(fut) } @@ -7338,18 +8518,23 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { #[allow(non_camel_case_types)] struct SystemSoundPlaySvc(pub Arc); - impl tonic::server::UnaryService - for SystemSoundPlaySvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for SystemSoundPlaySvc { type Response = super::SystemSoundPlayResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::system_sound_play(&inner, request).await + ::system_sound_play(&inner, request) + .await }; Box::pin(fut) } @@ -7379,11 +8564,15 @@ pub mod sound_service_server { "/rockbox.v1alpha1.SoundService/KeyclickClick" => { #[allow(non_camel_case_types)] struct KeyclickClickSvc(pub Arc); - impl tonic::server::UnaryService - for KeyclickClickSvc - { + impl< + T: SoundService, + > tonic::server::UnaryService + for KeyclickClickSvc { type Response = super::KeyclickClickResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7417,19 +8606,23 @@ pub mod sound_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } @@ -7490,10 +8683,10 @@ pub mod system_service_client { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct SystemServiceClient { inner: tonic::client::Grpc, @@ -7537,8 +8730,9 @@ pub mod system_service_client { >::ResponseBody, >, >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { SystemServiceClient::new(InterceptedService::new(inner, interceptor)) } @@ -7576,39 +8770,56 @@ pub mod system_service_client { pub async fn get_rockbox_version( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetRockboxVersion", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetRockboxVersion", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "rockbox.v1alpha1.SystemService", + "GetRockboxVersion", + ), + ); self.inner.unary(req, path, codec).await } pub async fn get_global_status( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rockbox.v1alpha1.SystemService/GetGlobalStatus", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "rockbox.v1alpha1.SystemService", - "GetGlobalStatus", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), + ); self.inner.unary(req, path, codec).await } } @@ -7620,7 +8831,7 @@ pub mod system_service_server { dead_code, missing_docs, clippy::wildcard_imports, - clippy::let_unit_value + clippy::let_unit_value, )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. @@ -7629,11 +8840,17 @@ pub mod system_service_server { async fn get_rockbox_version( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_global_status( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct SystemServiceServer { @@ -7656,7 +8873,10 @@ pub mod system_service_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -7711,19 +8931,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { #[allow(non_camel_case_types)] struct GetRockboxVersionSvc(pub Arc); - impl - tonic::server::UnaryService - for GetRockboxVersionSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetRockboxVersionSvc { type Response = super::GetRockboxVersionResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_rockbox_version(&inner, request).await + ::get_rockbox_version(&inner, request) + .await }; Box::pin(fut) } @@ -7753,19 +8977,23 @@ pub mod system_service_server { "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { #[allow(non_camel_case_types)] struct GetGlobalStatusSvc(pub Arc); - impl - tonic::server::UnaryService - for GetGlobalStatusSvc - { + impl< + T: SystemService, + > tonic::server::UnaryService + for GetGlobalStatusSvc { type Response = super::GetGlobalStatusResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::get_global_status(&inner, request).await + ::get_global_status(&inner, request) + .await }; Box::pin(fut) } @@ -7792,19 +9020,23 @@ pub mod system_service_server { }; Box::pin(fut) } - _ => Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers.insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers.insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } -- 2.51.2