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

Configure Feed

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

Add threading model doc and fix server thread

Add THREADING.md describing the Rockbox cooperative scheduler,
yield contract, and rules for mixing Rockbox kernel threads with
Rust OS threads. Update server::start_server to spawn the HTTP
server and periodically call rb::system::sleep(rb::HZ) with a short
thread::sleep to yield the Rockbox scheduler instead of joining the
spawned handle. Include regenerated tonic/upnp code formatting tweaks.

+2789 -1265
+242
THREADING.md
··· 1 + # Rockbox Threading Model & Rust Integration 2 + 3 + ## Overview 4 + 5 + Rockboxd has two distinct classes of threads that must coexist: 6 + 7 + 1. **Rockbox kernel threads** — created via `create_thread()` in C, managed by the Rockbox cooperative scheduler, **must yield explicitly**. 8 + 2. **Rust OS threads** — created via `std::thread::spawn`, fully preemptive OS threads, completely independent of the Rockbox scheduler. 9 + 10 + Understanding the boundary between these two classes is critical. Crossing it incorrectly (e.g. doing a plain OS-level block inside a Rockbox kernel thread) will silently starve every other Rockbox kernel thread. 11 + 12 + --- 13 + 14 + ## The SDL Cooperative Scheduler 15 + 16 + On the `sdlapp` hosted target (macOS / Linux desktop), each Rockbox kernel thread is backed by a real SDL OS thread (`SDL_CreateThread`). However, Rockbox layers a **cooperative scheduler** on top of those OS threads using a single global SDL mutex: 17 + 18 + ```c 19 + // firmware/target/hosted/sdl/thread-sdl.c 20 + static SDL_mutex *m; // THE global Rockbox scheduler mutex 21 + ``` 22 + 23 + **Only the thread that holds `m` is considered "running" by the Rockbox kernel.** All other Rockbox kernel threads are blocked in `SDL_LockMutex(m)`. 24 + 25 + `switch_thread()` is the scheduler's yield primitive: 26 + ```c 27 + void switch_thread(void) { 28 + SDL_UnlockMutex(m); // release the token — let another thread run 29 + SDL_LockMutex(m); // re-acquire when it's our turn again 30 + } 31 + ``` 32 + 33 + Every Rockbox sleep / block call eventually calls `switch_thread()`, which is the only way to hand the scheduler token to another thread. 34 + 35 + ### What happens without yielding 36 + 37 + If a Rockbox kernel thread calls any long-running operation — including a plain Rust `thread::sleep`, `join()`, or a `tokio::block_on` — **without first releasing the mutex via `rb::system::sleep`**, the global mutex is never released. Every other Rockbox kernel thread is stuck forever in `SDL_LockMutex(m)`. 38 + 39 + ### The yield contract 40 + 41 + Any code running in a Rockbox kernel thread that may block for more than a few milliseconds must include a yield loop: 42 + 43 + ```rust 44 + loop { 45 + thread::sleep(std::time::Duration::from_millis(100)); // OS-level rest 46 + rb::system::sleep(rb::HZ); // release Rockbox mutex 47 + } 48 + ``` 49 + 50 + `rb::HZ` is 100 (ticks per second on the hosted target), so `sleep(rb::HZ)` sleeps for ~1 second and releases the mutex for that duration. 51 + 52 + ### Stack size note 53 + 54 + The `stack` and `stack_size` arguments to `create_thread()` are **ignored** on the SDL hosted target (see `thread-sdl.c`: `(void)stack; (void)stack_size;`). SDL threads receive the OS default stack size (typically 8 MB on macOS). Stack overflow is not a concern on hosted. 55 + 56 + --- 57 + 58 + ## Thread Map 59 + 60 + ### Rockbox kernel threads (must yield) 61 + 62 + | Thread | C entry point | What it does | 63 + |--------|---------------|--------------| 64 + | `server_thread` | `server_thread.c` → `start_server()` | Spawns the actix HTTP server in a Rust OS thread, then loops yielding to the Rockbox scheduler | 65 + | `broker_thread` | `broker_thread.c` → `start_broker()` | Event loop: publishes playback state to GraphQL subscriptions, scrobbles tracks, restores playlist | 66 + 67 + Both threads must call `rb::system::sleep(rb::HZ)` on every loop iteration. 68 + 69 + **`server_thread` pattern** (`crates/server/src/lib.rs`): 70 + ```rust 71 + pub extern "C" fn start_server() { 72 + rockbox_settings::load_settings(None).ok(); 73 + rockbox_upnp::init(); 74 + 75 + // Spawn HTTP server in its own Rust OS thread — does NOT hold the 76 + // Rockbox mutex, so it can block freely in actix/tokio. 77 + thread::spawn(|| { 78 + match actix_rt::System::new().block_on(run_http_server()) { ... } 79 + }); 80 + 81 + // Keep the Rockbox kernel thread alive and cooperative. 82 + loop { 83 + thread::sleep(std::time::Duration::from_millis(100)); 84 + rb::system::sleep(rb::HZ); 85 + } 86 + } 87 + ``` 88 + 89 + **`broker_thread` pattern** (`crates/server/src/lib.rs`): 90 + ```rust 91 + pub extern "C" fn start_broker() { 92 + // ... setup ... 93 + loop { 94 + // ... do work (check playback, publish events) ... 95 + thread::sleep(std::time::Duration::from_millis(100)); 96 + rb::system::sleep(rb::HZ); // yield the Rockbox mutex 97 + } 98 + } 99 + ``` 100 + 101 + ### Rust OS threads (no Rockbox scheduler involvement) 102 + 103 + These are spawned with `std::thread::spawn` — they are pure OS threads and never interact with the Rockbox mutex. They are free to block indefinitely. 104 + 105 + | Thread / component | Spawned from | Runtime | 106 + |--------------------|--------------|---------| 107 + | **HTTP server** (actix-web, port 6063) | `start_server()` via `thread::spawn` | `actix_rt::System` (single-thread + LocalSet per arbiter) | 108 + | **gRPC server** (tonic, port 6061) | `start_servers()` via `thread::spawn` | `tokio::Builder::new_current_thread` | 109 + | **GraphQL server** (async-graphql, port 6062) | `start_servers()` via `thread::spawn` | `tokio::Builder::new_current_thread` | 110 + | **MPD server** (port 6600) | `start_servers()` via `thread::spawn` | `tokio::Builder::new_current_thread` | 111 + | **MPRIS server** (Linux, D-Bus) | `start_servers()` via `thread::spawn` | `async_std` task | 112 + | **UPnP runtime** | `rockbox_upnp::init()` (static `OnceLock`) | `tokio::runtime::Runtime::new()` (multi-thread) | 113 + | **Device scanners** (Chromecast, AirPlay, Snapcast, UPnP, Squeezelite) | `run_http_server()` via `thread::spawn` | each creates its own `tokio::runtime::Runtime::new()` | 114 + | **Player event listener** | `run_http_server()` via `thread::spawn` | `tokio::runtime::Runtime::new()` (multi-thread) | 115 + | **Command relay** | `start_servers()` via `thread::spawn` | `reqwest::blocking` (creates its own tokio internally) | 116 + 117 + --- 118 + 119 + ## Startup Sequence 120 + 121 + ``` 122 + main.c: server_init() 123 + 124 + ├── create_thread(server_thread) ← Rockbox kernel thread 125 + │ └── start_server() 126 + │ ├── load_settings() 127 + │ ├── rockbox_upnp::init() ← creates static UPnP multi-thread runtime 128 + │ ├── thread::spawn(actix) ← Rust OS thread (free to block) 129 + │ └── loop { sleep + rb::system::sleep(HZ) } ← yields Rockbox mutex 130 + 131 + ├── sleep(HZ) ← Rockbox scheduler sleep on main thread (~1 s) 132 + 133 + └── start_servers() ← called on main C thread after 1 s 134 + ├── thread::spawn(gRPC server) ← Rust OS thread, new_current_thread runtime 135 + ├── thread::spawn(GraphQL server) ← Rust OS thread, new_current_thread runtime 136 + ├── thread::spawn(MPD server) ← Rust OS thread, new_current_thread runtime 137 + ├── thread::spawn(MPRIS, Linux) ← Rust OS thread, async_std 138 + └── thread::spawn(command relay) ← Rust OS thread, reqwest blocking 139 + 140 + main.c: broker_init() 141 + 142 + └── create_thread(broker_thread) ← Rockbox kernel thread 143 + └── start_broker() 144 + └── loop { work + sleep + rb::system::sleep(HZ) } 145 + ``` 146 + 147 + --- 148 + 149 + ## Tokio Runtime Layout 150 + 151 + Multiple independent tokio runtimes coexist; they do not share thread pools or event loops. 152 + 153 + ``` 154 + ┌─────────────────────────────────────────────────────┐ 155 + │ UPnP Runtime (static, multi-thread) │ 156 + │ Owns: mDNS/SSDP, UPnP HTTP, UPnP renderer │ 157 + └─────────────────────────────────────────────────────┘ 158 + 159 + ┌─────────────────────────────────────────────────────┐ 160 + │ actix-rt System (current-thread + LocalSet) │ 161 + │ Owns: HTTP REST API handlers (port 6063) │ 162 + │ Workers: actix arbiters, each on their own thread │ 163 + └─────────────────────────────────────────────────────┘ 164 + 165 + ┌─────────────────────────────────────────────────────┐ 166 + │ gRPC Runtime (current-thread) │ 167 + │ Owns: tonic server (port 6061) │ 168 + └─────────────────────────────────────────────────────┘ 169 + 170 + ┌─────────────────────────────────────────────────────┐ 171 + │ GraphQL Runtime (current-thread) │ 172 + │ Owns: async-graphql + subscriptions (port 6062) │ 173 + └─────────────────────────────────────────────────────┘ 174 + 175 + ┌─────────────────────────────────────────────────────┐ 176 + │ MPD Runtime (current-thread) │ 177 + │ Owns: MPD protocol server (port 6600) │ 178 + └─────────────────────────────────────────────────────┘ 179 + 180 + ┌─────────────────────────────────────────────────────┐ 181 + │ Scanner / player-event runtimes (multi-thread each)│ 182 + │ Short-lived, one per background scanning thread │ 183 + └─────────────────────────────────────────────────────┘ 184 + ``` 185 + 186 + All runtimes share a single **SQLite database** (`~/.config/rockbox.org/rockbox-library.db`). The connection pool is configured with: 187 + - WAL journal mode (concurrent readers + one writer) 188 + - `busy_timeout = 30 s` (serialize concurrent writers instead of failing) 189 + 190 + --- 191 + 192 + ## Rules & Pitfalls 193 + 194 + ### Rule 1: Never do a plain OS block inside a Rockbox kernel thread 195 + 196 + Wrong — starves every other Rockbox thread: 197 + ```rust 198 + pub extern "C" fn start_server() { 199 + let rt = tokio::runtime::Builder::new_current_thread().build().unwrap(); 200 + rt.block_on(run_server()); // WRONG: holds Rockbox mutex, nothing else runs 201 + } 202 + ``` 203 + 204 + Wrong — same problem: 205 + ```rust 206 + let handle = thread::spawn(|| { run_server() }); 207 + handle.join().unwrap(); // WRONG: OS-level block, Rockbox mutex never released 208 + ``` 209 + 210 + Correct — spawn work out, yield in the Rockbox thread: 211 + ```rust 212 + thread::spawn(|| { run_server() }); 213 + loop { 214 + thread::sleep(Duration::from_millis(100)); 215 + rb::system::sleep(rb::HZ); // releases Rockbox mutex 216 + } 217 + ``` 218 + 219 + ### Rule 2: Use `actix_rt::System` for the HTTP server, not a raw tokio runtime 220 + 221 + Wrong — actix detects "existing Tokio runtime" and collapses all workers onto one thread: 222 + ```rust 223 + let rt = tokio::runtime::Builder::new_current_thread().build().unwrap(); 224 + rt.block_on(HttpServer::new(...).run()); // "starting in existing Tokio runtime" 225 + ``` 226 + 227 + Correct: 228 + ```rust 229 + actix_rt::System::new().block_on(run_http_server()); 230 + ``` 231 + 232 + ### Rule 3: Never call `tokio::runtime::Runtime::new()` from inside an active `block_on` 233 + 234 + Calling `Runtime::new()` from within a `block_on` context (e.g. inside an async actix handler) panics in tokio 1.27+. This is why `rockbox_upnp::init()` is called **before** any runtime is started in `start_server()`. 235 + 236 + ### Rule 4: `reqwest::blocking` creates its own tokio runtime internally 237 + 238 + The command-relay thread in `start_servers()` uses `reqwest::blocking::Client`. This internally creates a multi-thread tokio runtime. It must run in a plain Rust OS thread, never inside an existing async context. 239 + 240 + ### Rule 5: `SimpleBroker` is runtime-agnostic 241 + 242 + `rockbox_graphql::simplebroker::SimpleBroker` uses `futures_channel::mpsc::UnboundedSender` for pub/sub. `publish()` is a synchronous call — it does not require or interact with any tokio runtime. It is safe to call from any thread, including Rockbox kernel threads and scanner threads with their own runtimes.
+15 -10
crates/server/src/lib.rs
··· 80 80 // Pre-initialize the UPnP tokio runtime before any other runtime starts. 81 81 rockbox_upnp::init(); 82 82 83 - // Run the HTTP server in a dedicated Rust OS thread — exactly like gRPC 84 - // and GraphQL are run from start_servers(). This avoids actix detecting an 85 - // "existing Tokio runtime" on the Rockbox C server_thread, which would 86 - // collapse all actix workers onto a single thread. 87 - let handle = thread::spawn( 88 - || match actix_rt::System::new().block_on(run_http_server()) { 83 + // Run the HTTP server in its own Rust OS thread so actix gets a proper 84 + // multi-worker runtime instead of collapsing onto the Rockbox C thread. 85 + thread::spawn(|| { 86 + match actix_rt::System::new().block_on(run_http_server()) { 89 87 Ok(_) => {} 90 88 Err(e) => { 91 89 error!("Error starting HTTP server: {}", e); 92 90 } 93 - }, 94 - ); 91 + } 92 + }); 95 93 96 - // Keep the Rockbox C server_thread alive while the HTTP server runs. 97 - let _ = handle.join(); 94 + // Yield to the Rockbox cooperative scheduler periodically. Without this 95 + // the server_thread holds the Rockbox CPU token indefinitely and starves 96 + // every other kernel thread (broker, gRPC, etc.). The old accept loop 97 + // called rb::system::sleep(rb::HZ) on every idle iteration; we replicate 98 + // that contract here. 99 + loop { 100 + thread::sleep(std::time::Duration::from_millis(100)); 101 + rb::system::sleep(rb::HZ); 102 + } 98 103 } 99 104 100 105 async fn run_http_server() -> Result<(), Error> {
+2532 -1255
crates/upnp/src/api/rockbox.v1alpha1.rs
··· 45 45 dead_code, 46 46 missing_docs, 47 47 clippy::wildcard_imports, 48 - clippy::let_unit_value 48 + clippy::let_unit_value, 49 49 )] 50 - use tonic::codegen::http::Uri; 51 50 use tonic::codegen::*; 51 + use tonic::codegen::http::Uri; 52 52 #[derive(Debug, Clone)] 53 53 pub struct BrowseServiceClient<T> { 54 54 inner: tonic::client::Grpc<T>, ··· 92 92 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 93 93 >, 94 94 >, 95 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 96 - Into<StdError> + std::marker::Send + std::marker::Sync, 95 + <T as tonic::codegen::Service< 96 + http::Request<tonic::body::BoxBody>, 97 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 97 98 { 98 99 BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) 99 100 } ··· 131 132 pub async fn tree_get_entries( 132 133 &mut self, 133 134 request: impl tonic::IntoRequest<super::TreeGetEntriesRequest>, 134 - ) -> std::result::Result<tonic::Response<super::TreeGetEntriesResponse>, tonic::Status> 135 - { 136 - self.inner.ready().await.map_err(|e| { 137 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 138 - })?; 135 + ) -> std::result::Result< 136 + tonic::Response<super::TreeGetEntriesResponse>, 137 + tonic::Status, 138 + > { 139 + self.inner 140 + .ready() 141 + .await 142 + .map_err(|e| { 143 + tonic::Status::unknown( 144 + format!("Service was not ready: {}", e.into()), 145 + ) 146 + })?; 139 147 let codec = tonic::codec::ProstCodec::default(); 140 148 let path = http::uri::PathAndQuery::from_static( 141 149 "/rockbox.v1alpha1.BrowseService/TreeGetEntries", 142 150 ); 143 151 let mut req = request.into_request(); 144 - req.extensions_mut().insert(GrpcMethod::new( 145 - "rockbox.v1alpha1.BrowseService", 146 - "TreeGetEntries", 147 - )); 152 + req.extensions_mut() 153 + .insert( 154 + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), 155 + ); 148 156 self.inner.unary(req, path, codec).await 149 157 } 150 158 } ··· 156 164 dead_code, 157 165 missing_docs, 158 166 clippy::wildcard_imports, 159 - clippy::let_unit_value 167 + clippy::let_unit_value, 160 168 )] 161 169 use tonic::codegen::*; 162 170 /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. ··· 165 173 async fn tree_get_entries( 166 174 &self, 167 175 request: tonic::Request<super::TreeGetEntriesRequest>, 168 - ) -> std::result::Result<tonic::Response<super::TreeGetEntriesResponse>, tonic::Status>; 176 + ) -> std::result::Result< 177 + tonic::Response<super::TreeGetEntriesResponse>, 178 + tonic::Status, 179 + >; 169 180 } 170 181 #[derive(Debug)] 171 182 pub struct BrowseServiceServer<T> { ··· 188 199 max_encoding_message_size: None, 189 200 } 190 201 } 191 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 202 + pub fn with_interceptor<F>( 203 + inner: T, 204 + interceptor: F, 205 + ) -> InterceptedService<Self, F> 192 206 where 193 207 F: tonic::service::Interceptor, 194 208 { ··· 243 257 "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { 244 258 #[allow(non_camel_case_types)] 245 259 struct TreeGetEntriesSvc<T: BrowseService>(pub Arc<T>); 246 - impl<T: BrowseService> tonic::server::UnaryService<super::TreeGetEntriesRequest> 247 - for TreeGetEntriesSvc<T> 248 - { 260 + impl< 261 + T: BrowseService, 262 + > tonic::server::UnaryService<super::TreeGetEntriesRequest> 263 + for TreeGetEntriesSvc<T> { 249 264 type Response = super::TreeGetEntriesResponse; 250 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 265 + type Future = BoxFuture< 266 + tonic::Response<Self::Response>, 267 + tonic::Status, 268 + >; 251 269 fn call( 252 270 &mut self, 253 271 request: tonic::Request<super::TreeGetEntriesRequest>, 254 272 ) -> Self::Future { 255 273 let inner = Arc::clone(&self.0); 256 274 let fut = async move { 257 - <T as BrowseService>::tree_get_entries(&inner, request).await 275 + <T as BrowseService>::tree_get_entries(&inner, request) 276 + .await 258 277 }; 259 278 Box::pin(fut) 260 279 } ··· 281 300 }; 282 301 Box::pin(fut) 283 302 } 284 - _ => Box::pin(async move { 285 - let mut response = http::Response::new(empty_body()); 286 - let headers = response.headers_mut(); 287 - headers.insert( 288 - tonic::Status::GRPC_STATUS, 289 - (tonic::Code::Unimplemented as i32).into(), 290 - ); 291 - headers.insert( 292 - http::header::CONTENT_TYPE, 293 - tonic::metadata::GRPC_CONTENT_TYPE, 294 - ); 295 - Ok(response) 296 - }), 303 + _ => { 304 + Box::pin(async move { 305 + let mut response = http::Response::new(empty_body()); 306 + let headers = response.headers_mut(); 307 + headers 308 + .insert( 309 + tonic::Status::GRPC_STATUS, 310 + (tonic::Code::Unimplemented as i32).into(), 311 + ); 312 + headers 313 + .insert( 314 + http::header::CONTENT_TYPE, 315 + tonic::metadata::GRPC_CONTENT_TYPE, 316 + ); 317 + Ok(response) 318 + }) 319 + } 297 320 } 298 321 } 299 322 } ··· 550 573 dead_code, 551 574 missing_docs, 552 575 clippy::wildcard_imports, 553 - clippy::let_unit_value 576 + clippy::let_unit_value, 554 577 )] 555 - use tonic::codegen::http::Uri; 556 578 use tonic::codegen::*; 579 + use tonic::codegen::http::Uri; 557 580 #[derive(Debug, Clone)] 558 581 pub struct LibraryServiceClient<T> { 559 582 inner: tonic::client::Grpc<T>, ··· 597 620 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 598 621 >, 599 622 >, 600 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 601 - Into<StdError> + std::marker::Send + std::marker::Sync, 623 + <T as tonic::codegen::Service< 624 + http::Request<tonic::body::BoxBody>, 625 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 602 626 { 603 627 LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) 604 628 } ··· 636 660 pub async fn get_albums( 637 661 &mut self, 638 662 request: impl tonic::IntoRequest<super::GetAlbumsRequest>, 639 - ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status> { 640 - self.inner.ready().await.map_err(|e| { 641 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 642 - })?; 663 + ) -> std::result::Result< 664 + tonic::Response<super::GetAlbumsResponse>, 665 + tonic::Status, 666 + > { 667 + self.inner 668 + .ready() 669 + .await 670 + .map_err(|e| { 671 + tonic::Status::unknown( 672 + format!("Service was not ready: {}", e.into()), 673 + ) 674 + })?; 643 675 let codec = tonic::codec::ProstCodec::default(); 644 - let path = 645 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); 676 + let path = http::uri::PathAndQuery::from_static( 677 + "/rockbox.v1alpha1.LibraryService/GetAlbums", 678 + ); 646 679 let mut req = request.into_request(); 647 - req.extensions_mut().insert(GrpcMethod::new( 648 - "rockbox.v1alpha1.LibraryService", 649 - "GetAlbums", 650 - )); 680 + req.extensions_mut() 681 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); 651 682 self.inner.unary(req, path, codec).await 652 683 } 653 684 pub async fn get_artists( 654 685 &mut self, 655 686 request: impl tonic::IntoRequest<super::GetArtistsRequest>, 656 - ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status> 657 - { 658 - self.inner.ready().await.map_err(|e| { 659 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 660 - })?; 687 + ) -> std::result::Result< 688 + tonic::Response<super::GetArtistsResponse>, 689 + tonic::Status, 690 + > { 691 + self.inner 692 + .ready() 693 + .await 694 + .map_err(|e| { 695 + tonic::Status::unknown( 696 + format!("Service was not ready: {}", e.into()), 697 + ) 698 + })?; 661 699 let codec = tonic::codec::ProstCodec::default(); 662 - let path = 663 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); 700 + let path = http::uri::PathAndQuery::from_static( 701 + "/rockbox.v1alpha1.LibraryService/GetArtists", 702 + ); 664 703 let mut req = request.into_request(); 665 - req.extensions_mut().insert(GrpcMethod::new( 666 - "rockbox.v1alpha1.LibraryService", 667 - "GetArtists", 668 - )); 704 + req.extensions_mut() 705 + .insert( 706 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), 707 + ); 669 708 self.inner.unary(req, path, codec).await 670 709 } 671 710 pub async fn get_tracks( 672 711 &mut self, 673 712 request: impl tonic::IntoRequest<super::GetTracksRequest>, 674 - ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status> { 675 - self.inner.ready().await.map_err(|e| { 676 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 677 - })?; 713 + ) -> std::result::Result< 714 + tonic::Response<super::GetTracksResponse>, 715 + tonic::Status, 716 + > { 717 + self.inner 718 + .ready() 719 + .await 720 + .map_err(|e| { 721 + tonic::Status::unknown( 722 + format!("Service was not ready: {}", e.into()), 723 + ) 724 + })?; 678 725 let codec = tonic::codec::ProstCodec::default(); 679 - let path = 680 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); 726 + let path = http::uri::PathAndQuery::from_static( 727 + "/rockbox.v1alpha1.LibraryService/GetTracks", 728 + ); 681 729 let mut req = request.into_request(); 682 - req.extensions_mut().insert(GrpcMethod::new( 683 - "rockbox.v1alpha1.LibraryService", 684 - "GetTracks", 685 - )); 730 + req.extensions_mut() 731 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); 686 732 self.inner.unary(req, path, codec).await 687 733 } 688 734 pub async fn get_album( 689 735 &mut self, 690 736 request: impl tonic::IntoRequest<super::GetAlbumRequest>, 691 - ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status> { 692 - self.inner.ready().await.map_err(|e| { 693 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 694 - })?; 737 + ) -> std::result::Result< 738 + tonic::Response<super::GetAlbumResponse>, 739 + tonic::Status, 740 + > { 741 + self.inner 742 + .ready() 743 + .await 744 + .map_err(|e| { 745 + tonic::Status::unknown( 746 + format!("Service was not ready: {}", e.into()), 747 + ) 748 + })?; 695 749 let codec = tonic::codec::ProstCodec::default(); 696 - let path = 697 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); 750 + let path = http::uri::PathAndQuery::from_static( 751 + "/rockbox.v1alpha1.LibraryService/GetAlbum", 752 + ); 698 753 let mut req = request.into_request(); 699 - req.extensions_mut().insert(GrpcMethod::new( 700 - "rockbox.v1alpha1.LibraryService", 701 - "GetAlbum", 702 - )); 754 + req.extensions_mut() 755 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); 703 756 self.inner.unary(req, path, codec).await 704 757 } 705 758 pub async fn get_artist( 706 759 &mut self, 707 760 request: impl tonic::IntoRequest<super::GetArtistRequest>, 708 - ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status> { 709 - self.inner.ready().await.map_err(|e| { 710 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 711 - })?; 761 + ) -> std::result::Result< 762 + tonic::Response<super::GetArtistResponse>, 763 + tonic::Status, 764 + > { 765 + self.inner 766 + .ready() 767 + .await 768 + .map_err(|e| { 769 + tonic::Status::unknown( 770 + format!("Service was not ready: {}", e.into()), 771 + ) 772 + })?; 712 773 let codec = tonic::codec::ProstCodec::default(); 713 - let path = 714 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); 774 + let path = http::uri::PathAndQuery::from_static( 775 + "/rockbox.v1alpha1.LibraryService/GetArtist", 776 + ); 715 777 let mut req = request.into_request(); 716 - req.extensions_mut().insert(GrpcMethod::new( 717 - "rockbox.v1alpha1.LibraryService", 718 - "GetArtist", 719 - )); 778 + req.extensions_mut() 779 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); 720 780 self.inner.unary(req, path, codec).await 721 781 } 722 782 pub async fn get_track( 723 783 &mut self, 724 784 request: impl tonic::IntoRequest<super::GetTrackRequest>, 725 - ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status> { 726 - self.inner.ready().await.map_err(|e| { 727 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 728 - })?; 785 + ) -> std::result::Result< 786 + tonic::Response<super::GetTrackResponse>, 787 + tonic::Status, 788 + > { 789 + self.inner 790 + .ready() 791 + .await 792 + .map_err(|e| { 793 + tonic::Status::unknown( 794 + format!("Service was not ready: {}", e.into()), 795 + ) 796 + })?; 729 797 let codec = tonic::codec::ProstCodec::default(); 730 - let path = 731 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); 798 + let path = http::uri::PathAndQuery::from_static( 799 + "/rockbox.v1alpha1.LibraryService/GetTrack", 800 + ); 732 801 let mut req = request.into_request(); 733 - req.extensions_mut().insert(GrpcMethod::new( 734 - "rockbox.v1alpha1.LibraryService", 735 - "GetTrack", 736 - )); 802 + req.extensions_mut() 803 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); 737 804 self.inner.unary(req, path, codec).await 738 805 } 739 806 pub async fn like_track( 740 807 &mut self, 741 808 request: impl tonic::IntoRequest<super::LikeTrackRequest>, 742 - ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status> { 743 - self.inner.ready().await.map_err(|e| { 744 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 745 - })?; 809 + ) -> std::result::Result< 810 + tonic::Response<super::LikeTrackResponse>, 811 + tonic::Status, 812 + > { 813 + self.inner 814 + .ready() 815 + .await 816 + .map_err(|e| { 817 + tonic::Status::unknown( 818 + format!("Service was not ready: {}", e.into()), 819 + ) 820 + })?; 746 821 let codec = tonic::codec::ProstCodec::default(); 747 - let path = 748 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); 822 + let path = http::uri::PathAndQuery::from_static( 823 + "/rockbox.v1alpha1.LibraryService/LikeTrack", 824 + ); 749 825 let mut req = request.into_request(); 750 - req.extensions_mut().insert(GrpcMethod::new( 751 - "rockbox.v1alpha1.LibraryService", 752 - "LikeTrack", 753 - )); 826 + req.extensions_mut() 827 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); 754 828 self.inner.unary(req, path, codec).await 755 829 } 756 830 pub async fn unlike_track( 757 831 &mut self, 758 832 request: impl tonic::IntoRequest<super::UnlikeTrackRequest>, 759 - ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status> 760 - { 761 - self.inner.ready().await.map_err(|e| { 762 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 763 - })?; 833 + ) -> std::result::Result< 834 + tonic::Response<super::UnlikeTrackResponse>, 835 + tonic::Status, 836 + > { 837 + self.inner 838 + .ready() 839 + .await 840 + .map_err(|e| { 841 + tonic::Status::unknown( 842 + format!("Service was not ready: {}", e.into()), 843 + ) 844 + })?; 764 845 let codec = tonic::codec::ProstCodec::default(); 765 846 let path = http::uri::PathAndQuery::from_static( 766 847 "/rockbox.v1alpha1.LibraryService/UnlikeTrack", 767 848 ); 768 849 let mut req = request.into_request(); 769 - req.extensions_mut().insert(GrpcMethod::new( 770 - "rockbox.v1alpha1.LibraryService", 771 - "UnlikeTrack", 772 - )); 850 + req.extensions_mut() 851 + .insert( 852 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), 853 + ); 773 854 self.inner.unary(req, path, codec).await 774 855 } 775 856 pub async fn like_album( 776 857 &mut self, 777 858 request: impl tonic::IntoRequest<super::LikeAlbumRequest>, 778 - ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status> { 779 - self.inner.ready().await.map_err(|e| { 780 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 781 - })?; 859 + ) -> std::result::Result< 860 + tonic::Response<super::LikeAlbumResponse>, 861 + tonic::Status, 862 + > { 863 + self.inner 864 + .ready() 865 + .await 866 + .map_err(|e| { 867 + tonic::Status::unknown( 868 + format!("Service was not ready: {}", e.into()), 869 + ) 870 + })?; 782 871 let codec = tonic::codec::ProstCodec::default(); 783 - let path = 784 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); 872 + let path = http::uri::PathAndQuery::from_static( 873 + "/rockbox.v1alpha1.LibraryService/LikeAlbum", 874 + ); 785 875 let mut req = request.into_request(); 786 - req.extensions_mut().insert(GrpcMethod::new( 787 - "rockbox.v1alpha1.LibraryService", 788 - "LikeAlbum", 789 - )); 876 + req.extensions_mut() 877 + .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); 790 878 self.inner.unary(req, path, codec).await 791 879 } 792 880 pub async fn unlike_album( 793 881 &mut self, 794 882 request: impl tonic::IntoRequest<super::UnlikeAlbumRequest>, 795 - ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status> 796 - { 797 - self.inner.ready().await.map_err(|e| { 798 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 799 - })?; 883 + ) -> std::result::Result< 884 + tonic::Response<super::UnlikeAlbumResponse>, 885 + tonic::Status, 886 + > { 887 + self.inner 888 + .ready() 889 + .await 890 + .map_err(|e| { 891 + tonic::Status::unknown( 892 + format!("Service was not ready: {}", e.into()), 893 + ) 894 + })?; 800 895 let codec = tonic::codec::ProstCodec::default(); 801 896 let path = http::uri::PathAndQuery::from_static( 802 897 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", 803 898 ); 804 899 let mut req = request.into_request(); 805 - req.extensions_mut().insert(GrpcMethod::new( 806 - "rockbox.v1alpha1.LibraryService", 807 - "UnlikeAlbum", 808 - )); 900 + req.extensions_mut() 901 + .insert( 902 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), 903 + ); 809 904 self.inner.unary(req, path, codec).await 810 905 } 811 906 pub async fn get_liked_tracks( 812 907 &mut self, 813 908 request: impl tonic::IntoRequest<super::GetLikedTracksRequest>, 814 - ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status> 815 - { 816 - self.inner.ready().await.map_err(|e| { 817 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 818 - })?; 909 + ) -> std::result::Result< 910 + tonic::Response<super::GetLikedTracksResponse>, 911 + tonic::Status, 912 + > { 913 + self.inner 914 + .ready() 915 + .await 916 + .map_err(|e| { 917 + tonic::Status::unknown( 918 + format!("Service was not ready: {}", e.into()), 919 + ) 920 + })?; 819 921 let codec = tonic::codec::ProstCodec::default(); 820 922 let path = http::uri::PathAndQuery::from_static( 821 923 "/rockbox.v1alpha1.LibraryService/GetLikedTracks", 822 924 ); 823 925 let mut req = request.into_request(); 824 - req.extensions_mut().insert(GrpcMethod::new( 825 - "rockbox.v1alpha1.LibraryService", 826 - "GetLikedTracks", 827 - )); 926 + req.extensions_mut() 927 + .insert( 928 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), 929 + ); 828 930 self.inner.unary(req, path, codec).await 829 931 } 830 932 pub async fn get_liked_albums( 831 933 &mut self, 832 934 request: impl tonic::IntoRequest<super::GetLikedAlbumsRequest>, 833 - ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status> 834 - { 835 - self.inner.ready().await.map_err(|e| { 836 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 837 - })?; 935 + ) -> std::result::Result< 936 + tonic::Response<super::GetLikedAlbumsResponse>, 937 + tonic::Status, 938 + > { 939 + self.inner 940 + .ready() 941 + .await 942 + .map_err(|e| { 943 + tonic::Status::unknown( 944 + format!("Service was not ready: {}", e.into()), 945 + ) 946 + })?; 838 947 let codec = tonic::codec::ProstCodec::default(); 839 948 let path = http::uri::PathAndQuery::from_static( 840 949 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", 841 950 ); 842 951 let mut req = request.into_request(); 843 - req.extensions_mut().insert(GrpcMethod::new( 844 - "rockbox.v1alpha1.LibraryService", 845 - "GetLikedAlbums", 846 - )); 952 + req.extensions_mut() 953 + .insert( 954 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), 955 + ); 847 956 self.inner.unary(req, path, codec).await 848 957 } 849 958 pub async fn scan_library( 850 959 &mut self, 851 960 request: impl tonic::IntoRequest<super::ScanLibraryRequest>, 852 - ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status> 853 - { 854 - self.inner.ready().await.map_err(|e| { 855 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 856 - })?; 961 + ) -> std::result::Result< 962 + tonic::Response<super::ScanLibraryResponse>, 963 + tonic::Status, 964 + > { 965 + self.inner 966 + .ready() 967 + .await 968 + .map_err(|e| { 969 + tonic::Status::unknown( 970 + format!("Service was not ready: {}", e.into()), 971 + ) 972 + })?; 857 973 let codec = tonic::codec::ProstCodec::default(); 858 974 let path = http::uri::PathAndQuery::from_static( 859 975 "/rockbox.v1alpha1.LibraryService/ScanLibrary", 860 976 ); 861 977 let mut req = request.into_request(); 862 - req.extensions_mut().insert(GrpcMethod::new( 863 - "rockbox.v1alpha1.LibraryService", 864 - "ScanLibrary", 865 - )); 978 + req.extensions_mut() 979 + .insert( 980 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), 981 + ); 866 982 self.inner.unary(req, path, codec).await 867 983 } 868 984 pub async fn stream_library( ··· 872 988 tonic::Response<tonic::codec::Streaming<super::StreamLibraryResponse>>, 873 989 tonic::Status, 874 990 > { 875 - self.inner.ready().await.map_err(|e| { 876 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 877 - })?; 991 + self.inner 992 + .ready() 993 + .await 994 + .map_err(|e| { 995 + tonic::Status::unknown( 996 + format!("Service was not ready: {}", e.into()), 997 + ) 998 + })?; 878 999 let codec = tonic::codec::ProstCodec::default(); 879 1000 let path = http::uri::PathAndQuery::from_static( 880 1001 "/rockbox.v1alpha1.LibraryService/StreamLibrary", 881 1002 ); 882 1003 let mut req = request.into_request(); 883 - req.extensions_mut().insert(GrpcMethod::new( 884 - "rockbox.v1alpha1.LibraryService", 885 - "StreamLibrary", 886 - )); 1004 + req.extensions_mut() 1005 + .insert( 1006 + GrpcMethod::new("rockbox.v1alpha1.LibraryService", "StreamLibrary"), 1007 + ); 887 1008 self.inner.server_streaming(req, path, codec).await 888 1009 } 889 1010 pub async fn search( 890 1011 &mut self, 891 1012 request: impl tonic::IntoRequest<super::SearchRequest>, 892 1013 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> { 893 - self.inner.ready().await.map_err(|e| { 894 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 895 - })?; 1014 + self.inner 1015 + .ready() 1016 + .await 1017 + .map_err(|e| { 1018 + tonic::Status::unknown( 1019 + format!("Service was not ready: {}", e.into()), 1020 + ) 1021 + })?; 896 1022 let codec = tonic::codec::ProstCodec::default(); 897 - let path = 898 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); 1023 + let path = http::uri::PathAndQuery::from_static( 1024 + "/rockbox.v1alpha1.LibraryService/Search", 1025 + ); 899 1026 let mut req = request.into_request(); 900 1027 req.extensions_mut() 901 1028 .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); ··· 910 1037 dead_code, 911 1038 missing_docs, 912 1039 clippy::wildcard_imports, 913 - clippy::let_unit_value 1040 + clippy::let_unit_value, 914 1041 )] 915 1042 use tonic::codegen::*; 916 1043 /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. ··· 919 1046 async fn get_albums( 920 1047 &self, 921 1048 request: tonic::Request<super::GetAlbumsRequest>, 922 - ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status>; 1049 + ) -> std::result::Result< 1050 + tonic::Response<super::GetAlbumsResponse>, 1051 + tonic::Status, 1052 + >; 923 1053 async fn get_artists( 924 1054 &self, 925 1055 request: tonic::Request<super::GetArtistsRequest>, 926 - ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status>; 1056 + ) -> std::result::Result< 1057 + tonic::Response<super::GetArtistsResponse>, 1058 + tonic::Status, 1059 + >; 927 1060 async fn get_tracks( 928 1061 &self, 929 1062 request: tonic::Request<super::GetTracksRequest>, 930 - ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status>; 1063 + ) -> std::result::Result< 1064 + tonic::Response<super::GetTracksResponse>, 1065 + tonic::Status, 1066 + >; 931 1067 async fn get_album( 932 1068 &self, 933 1069 request: tonic::Request<super::GetAlbumRequest>, 934 - ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status>; 1070 + ) -> std::result::Result< 1071 + tonic::Response<super::GetAlbumResponse>, 1072 + tonic::Status, 1073 + >; 935 1074 async fn get_artist( 936 1075 &self, 937 1076 request: tonic::Request<super::GetArtistRequest>, 938 - ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status>; 1077 + ) -> std::result::Result< 1078 + tonic::Response<super::GetArtistResponse>, 1079 + tonic::Status, 1080 + >; 939 1081 async fn get_track( 940 1082 &self, 941 1083 request: tonic::Request<super::GetTrackRequest>, 942 - ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status>; 1084 + ) -> std::result::Result< 1085 + tonic::Response<super::GetTrackResponse>, 1086 + tonic::Status, 1087 + >; 943 1088 async fn like_track( 944 1089 &self, 945 1090 request: tonic::Request<super::LikeTrackRequest>, 946 - ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status>; 1091 + ) -> std::result::Result< 1092 + tonic::Response<super::LikeTrackResponse>, 1093 + tonic::Status, 1094 + >; 947 1095 async fn unlike_track( 948 1096 &self, 949 1097 request: tonic::Request<super::UnlikeTrackRequest>, 950 - ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status>; 1098 + ) -> std::result::Result< 1099 + tonic::Response<super::UnlikeTrackResponse>, 1100 + tonic::Status, 1101 + >; 951 1102 async fn like_album( 952 1103 &self, 953 1104 request: tonic::Request<super::LikeAlbumRequest>, 954 - ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status>; 1105 + ) -> std::result::Result< 1106 + tonic::Response<super::LikeAlbumResponse>, 1107 + tonic::Status, 1108 + >; 955 1109 async fn unlike_album( 956 1110 &self, 957 1111 request: tonic::Request<super::UnlikeAlbumRequest>, 958 - ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status>; 1112 + ) -> std::result::Result< 1113 + tonic::Response<super::UnlikeAlbumResponse>, 1114 + tonic::Status, 1115 + >; 959 1116 async fn get_liked_tracks( 960 1117 &self, 961 1118 request: tonic::Request<super::GetLikedTracksRequest>, 962 - ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status>; 1119 + ) -> std::result::Result< 1120 + tonic::Response<super::GetLikedTracksResponse>, 1121 + tonic::Status, 1122 + >; 963 1123 async fn get_liked_albums( 964 1124 &self, 965 1125 request: tonic::Request<super::GetLikedAlbumsRequest>, 966 - ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status>; 1126 + ) -> std::result::Result< 1127 + tonic::Response<super::GetLikedAlbumsResponse>, 1128 + tonic::Status, 1129 + >; 967 1130 async fn scan_library( 968 1131 &self, 969 1132 request: tonic::Request<super::ScanLibraryRequest>, 970 - ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status>; 1133 + ) -> std::result::Result< 1134 + tonic::Response<super::ScanLibraryResponse>, 1135 + tonic::Status, 1136 + >; 971 1137 /// Server streaming response type for the StreamLibrary method. 972 1138 type StreamLibraryStream: tonic::codegen::tokio_stream::Stream< 973 1139 Item = std::result::Result<super::StreamLibraryResponse, tonic::Status>, 974 - > + std::marker::Send 1140 + > 1141 + + std::marker::Send 975 1142 + 'static; 976 1143 async fn stream_library( 977 1144 &self, 978 1145 request: tonic::Request<super::StreamLibraryRequest>, 979 - ) -> std::result::Result<tonic::Response<Self::StreamLibraryStream>, tonic::Status>; 1146 + ) -> std::result::Result< 1147 + tonic::Response<Self::StreamLibraryStream>, 1148 + tonic::Status, 1149 + >; 980 1150 async fn search( 981 1151 &self, 982 1152 request: tonic::Request<super::SearchRequest>, ··· 1003 1173 max_encoding_message_size: None, 1004 1174 } 1005 1175 } 1006 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 1176 + pub fn with_interceptor<F>( 1177 + inner: T, 1178 + interceptor: F, 1179 + ) -> InterceptedService<Self, F> 1007 1180 where 1008 1181 F: tonic::service::Interceptor, 1009 1182 { ··· 1058 1231 "/rockbox.v1alpha1.LibraryService/GetAlbums" => { 1059 1232 #[allow(non_camel_case_types)] 1060 1233 struct GetAlbumsSvc<T: LibraryService>(pub Arc<T>); 1061 - impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumsRequest> for GetAlbumsSvc<T> { 1234 + impl< 1235 + T: LibraryService, 1236 + > tonic::server::UnaryService<super::GetAlbumsRequest> 1237 + for GetAlbumsSvc<T> { 1062 1238 type Response = super::GetAlbumsResponse; 1063 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1239 + type Future = BoxFuture< 1240 + tonic::Response<Self::Response>, 1241 + tonic::Status, 1242 + >; 1064 1243 fn call( 1065 1244 &mut self, 1066 1245 request: tonic::Request<super::GetAlbumsRequest>, ··· 1097 1276 "/rockbox.v1alpha1.LibraryService/GetArtists" => { 1098 1277 #[allow(non_camel_case_types)] 1099 1278 struct GetArtistsSvc<T: LibraryService>(pub Arc<T>); 1100 - impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistsRequest> for GetArtistsSvc<T> { 1279 + impl< 1280 + T: LibraryService, 1281 + > tonic::server::UnaryService<super::GetArtistsRequest> 1282 + for GetArtistsSvc<T> { 1101 1283 type Response = super::GetArtistsResponse; 1102 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1284 + type Future = BoxFuture< 1285 + tonic::Response<Self::Response>, 1286 + tonic::Status, 1287 + >; 1103 1288 fn call( 1104 1289 &mut self, 1105 1290 request: tonic::Request<super::GetArtistsRequest>, ··· 1136 1321 "/rockbox.v1alpha1.LibraryService/GetTracks" => { 1137 1322 #[allow(non_camel_case_types)] 1138 1323 struct GetTracksSvc<T: LibraryService>(pub Arc<T>); 1139 - impl<T: LibraryService> tonic::server::UnaryService<super::GetTracksRequest> for GetTracksSvc<T> { 1324 + impl< 1325 + T: LibraryService, 1326 + > tonic::server::UnaryService<super::GetTracksRequest> 1327 + for GetTracksSvc<T> { 1140 1328 type Response = super::GetTracksResponse; 1141 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1329 + type Future = BoxFuture< 1330 + tonic::Response<Self::Response>, 1331 + tonic::Status, 1332 + >; 1142 1333 fn call( 1143 1334 &mut self, 1144 1335 request: tonic::Request<super::GetTracksRequest>, ··· 1175 1366 "/rockbox.v1alpha1.LibraryService/GetAlbum" => { 1176 1367 #[allow(non_camel_case_types)] 1177 1368 struct GetAlbumSvc<T: LibraryService>(pub Arc<T>); 1178 - impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumRequest> for GetAlbumSvc<T> { 1369 + impl< 1370 + T: LibraryService, 1371 + > tonic::server::UnaryService<super::GetAlbumRequest> 1372 + for GetAlbumSvc<T> { 1179 1373 type Response = super::GetAlbumResponse; 1180 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1374 + type Future = BoxFuture< 1375 + tonic::Response<Self::Response>, 1376 + tonic::Status, 1377 + >; 1181 1378 fn call( 1182 1379 &mut self, 1183 1380 request: tonic::Request<super::GetAlbumRequest>, ··· 1214 1411 "/rockbox.v1alpha1.LibraryService/GetArtist" => { 1215 1412 #[allow(non_camel_case_types)] 1216 1413 struct GetArtistSvc<T: LibraryService>(pub Arc<T>); 1217 - impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistRequest> for GetArtistSvc<T> { 1414 + impl< 1415 + T: LibraryService, 1416 + > tonic::server::UnaryService<super::GetArtistRequest> 1417 + for GetArtistSvc<T> { 1218 1418 type Response = super::GetArtistResponse; 1219 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1419 + type Future = BoxFuture< 1420 + tonic::Response<Self::Response>, 1421 + tonic::Status, 1422 + >; 1220 1423 fn call( 1221 1424 &mut self, 1222 1425 request: tonic::Request<super::GetArtistRequest>, ··· 1253 1456 "/rockbox.v1alpha1.LibraryService/GetTrack" => { 1254 1457 #[allow(non_camel_case_types)] 1255 1458 struct GetTrackSvc<T: LibraryService>(pub Arc<T>); 1256 - impl<T: LibraryService> tonic::server::UnaryService<super::GetTrackRequest> for GetTrackSvc<T> { 1459 + impl< 1460 + T: LibraryService, 1461 + > tonic::server::UnaryService<super::GetTrackRequest> 1462 + for GetTrackSvc<T> { 1257 1463 type Response = super::GetTrackResponse; 1258 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1464 + type Future = BoxFuture< 1465 + tonic::Response<Self::Response>, 1466 + tonic::Status, 1467 + >; 1259 1468 fn call( 1260 1469 &mut self, 1261 1470 request: tonic::Request<super::GetTrackRequest>, ··· 1292 1501 "/rockbox.v1alpha1.LibraryService/LikeTrack" => { 1293 1502 #[allow(non_camel_case_types)] 1294 1503 struct LikeTrackSvc<T: LibraryService>(pub Arc<T>); 1295 - impl<T: LibraryService> tonic::server::UnaryService<super::LikeTrackRequest> for LikeTrackSvc<T> { 1504 + impl< 1505 + T: LibraryService, 1506 + > tonic::server::UnaryService<super::LikeTrackRequest> 1507 + for LikeTrackSvc<T> { 1296 1508 type Response = super::LikeTrackResponse; 1297 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1509 + type Future = BoxFuture< 1510 + tonic::Response<Self::Response>, 1511 + tonic::Status, 1512 + >; 1298 1513 fn call( 1299 1514 &mut self, 1300 1515 request: tonic::Request<super::LikeTrackRequest>, ··· 1331 1546 "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { 1332 1547 #[allow(non_camel_case_types)] 1333 1548 struct UnlikeTrackSvc<T: LibraryService>(pub Arc<T>); 1334 - impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeTrackRequest> 1335 - for UnlikeTrackSvc<T> 1336 - { 1549 + impl< 1550 + T: LibraryService, 1551 + > tonic::server::UnaryService<super::UnlikeTrackRequest> 1552 + for UnlikeTrackSvc<T> { 1337 1553 type Response = super::UnlikeTrackResponse; 1338 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1554 + type Future = BoxFuture< 1555 + tonic::Response<Self::Response>, 1556 + tonic::Status, 1557 + >; 1339 1558 fn call( 1340 1559 &mut self, 1341 1560 request: tonic::Request<super::UnlikeTrackRequest>, ··· 1372 1591 "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { 1373 1592 #[allow(non_camel_case_types)] 1374 1593 struct LikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1375 - impl<T: LibraryService> tonic::server::UnaryService<super::LikeAlbumRequest> for LikeAlbumSvc<T> { 1594 + impl< 1595 + T: LibraryService, 1596 + > tonic::server::UnaryService<super::LikeAlbumRequest> 1597 + for LikeAlbumSvc<T> { 1376 1598 type Response = super::LikeAlbumResponse; 1377 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1599 + type Future = BoxFuture< 1600 + tonic::Response<Self::Response>, 1601 + tonic::Status, 1602 + >; 1378 1603 fn call( 1379 1604 &mut self, 1380 1605 request: tonic::Request<super::LikeAlbumRequest>, ··· 1411 1636 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { 1412 1637 #[allow(non_camel_case_types)] 1413 1638 struct UnlikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1414 - impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeAlbumRequest> 1415 - for UnlikeAlbumSvc<T> 1416 - { 1639 + impl< 1640 + T: LibraryService, 1641 + > tonic::server::UnaryService<super::UnlikeAlbumRequest> 1642 + for UnlikeAlbumSvc<T> { 1417 1643 type Response = super::UnlikeAlbumResponse; 1418 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1644 + type Future = BoxFuture< 1645 + tonic::Response<Self::Response>, 1646 + tonic::Status, 1647 + >; 1419 1648 fn call( 1420 1649 &mut self, 1421 1650 request: tonic::Request<super::UnlikeAlbumRequest>, ··· 1452 1681 "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { 1453 1682 #[allow(non_camel_case_types)] 1454 1683 struct GetLikedTracksSvc<T: LibraryService>(pub Arc<T>); 1455 - impl<T: LibraryService> 1456 - tonic::server::UnaryService<super::GetLikedTracksRequest> 1457 - for GetLikedTracksSvc<T> 1458 - { 1684 + impl< 1685 + T: LibraryService, 1686 + > tonic::server::UnaryService<super::GetLikedTracksRequest> 1687 + for GetLikedTracksSvc<T> { 1459 1688 type Response = super::GetLikedTracksResponse; 1460 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1689 + type Future = BoxFuture< 1690 + tonic::Response<Self::Response>, 1691 + tonic::Status, 1692 + >; 1461 1693 fn call( 1462 1694 &mut self, 1463 1695 request: tonic::Request<super::GetLikedTracksRequest>, 1464 1696 ) -> Self::Future { 1465 1697 let inner = Arc::clone(&self.0); 1466 1698 let fut = async move { 1467 - <T as LibraryService>::get_liked_tracks(&inner, request).await 1699 + <T as LibraryService>::get_liked_tracks(&inner, request) 1700 + .await 1468 1701 }; 1469 1702 Box::pin(fut) 1470 1703 } ··· 1494 1727 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { 1495 1728 #[allow(non_camel_case_types)] 1496 1729 struct GetLikedAlbumsSvc<T: LibraryService>(pub Arc<T>); 1497 - impl<T: LibraryService> 1498 - tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1499 - for GetLikedAlbumsSvc<T> 1500 - { 1730 + impl< 1731 + T: LibraryService, 1732 + > tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1733 + for GetLikedAlbumsSvc<T> { 1501 1734 type Response = super::GetLikedAlbumsResponse; 1502 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1735 + type Future = BoxFuture< 1736 + tonic::Response<Self::Response>, 1737 + tonic::Status, 1738 + >; 1503 1739 fn call( 1504 1740 &mut self, 1505 1741 request: tonic::Request<super::GetLikedAlbumsRequest>, 1506 1742 ) -> Self::Future { 1507 1743 let inner = Arc::clone(&self.0); 1508 1744 let fut = async move { 1509 - <T as LibraryService>::get_liked_albums(&inner, request).await 1745 + <T as LibraryService>::get_liked_albums(&inner, request) 1746 + .await 1510 1747 }; 1511 1748 Box::pin(fut) 1512 1749 } ··· 1536 1773 "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { 1537 1774 #[allow(non_camel_case_types)] 1538 1775 struct ScanLibrarySvc<T: LibraryService>(pub Arc<T>); 1539 - impl<T: LibraryService> tonic::server::UnaryService<super::ScanLibraryRequest> 1540 - for ScanLibrarySvc<T> 1541 - { 1776 + impl< 1777 + T: LibraryService, 1778 + > tonic::server::UnaryService<super::ScanLibraryRequest> 1779 + for ScanLibrarySvc<T> { 1542 1780 type Response = super::ScanLibraryResponse; 1543 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1781 + type Future = BoxFuture< 1782 + tonic::Response<Self::Response>, 1783 + tonic::Status, 1784 + >; 1544 1785 fn call( 1545 1786 &mut self, 1546 1787 request: tonic::Request<super::ScanLibraryRequest>, ··· 1577 1818 "/rockbox.v1alpha1.LibraryService/StreamLibrary" => { 1578 1819 #[allow(non_camel_case_types)] 1579 1820 struct StreamLibrarySvc<T: LibraryService>(pub Arc<T>); 1580 - impl<T: LibraryService> 1581 - tonic::server::ServerStreamingService<super::StreamLibraryRequest> 1582 - for StreamLibrarySvc<T> 1583 - { 1821 + impl< 1822 + T: LibraryService, 1823 + > tonic::server::ServerStreamingService<super::StreamLibraryRequest> 1824 + for StreamLibrarySvc<T> { 1584 1825 type Response = super::StreamLibraryResponse; 1585 1826 type ResponseStream = T::StreamLibraryStream; 1586 - type Future = 1587 - BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 1827 + type Future = BoxFuture< 1828 + tonic::Response<Self::ResponseStream>, 1829 + tonic::Status, 1830 + >; 1588 1831 fn call( 1589 1832 &mut self, 1590 1833 request: tonic::Request<super::StreamLibraryRequest>, ··· 1621 1864 "/rockbox.v1alpha1.LibraryService/Search" => { 1622 1865 #[allow(non_camel_case_types)] 1623 1866 struct SearchSvc<T: LibraryService>(pub Arc<T>); 1624 - impl<T: LibraryService> tonic::server::UnaryService<super::SearchRequest> for SearchSvc<T> { 1867 + impl< 1868 + T: LibraryService, 1869 + > tonic::server::UnaryService<super::SearchRequest> 1870 + for SearchSvc<T> { 1625 1871 type Response = super::SearchResponse; 1626 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1872 + type Future = BoxFuture< 1873 + tonic::Response<Self::Response>, 1874 + tonic::Status, 1875 + >; 1627 1876 fn call( 1628 1877 &mut self, 1629 1878 request: tonic::Request<super::SearchRequest>, 1630 1879 ) -> Self::Future { 1631 1880 let inner = Arc::clone(&self.0); 1632 - let fut = 1633 - async move { <T as LibraryService>::search(&inner, request).await }; 1881 + let fut = async move { 1882 + <T as LibraryService>::search(&inner, request).await 1883 + }; 1634 1884 Box::pin(fut) 1635 1885 } 1636 1886 } ··· 1656 1906 }; 1657 1907 Box::pin(fut) 1658 1908 } 1659 - _ => Box::pin(async move { 1660 - let mut response = http::Response::new(empty_body()); 1661 - let headers = response.headers_mut(); 1662 - headers.insert( 1663 - tonic::Status::GRPC_STATUS, 1664 - (tonic::Code::Unimplemented as i32).into(), 1665 - ); 1666 - headers.insert( 1667 - http::header::CONTENT_TYPE, 1668 - tonic::metadata::GRPC_CONTENT_TYPE, 1669 - ); 1670 - Ok(response) 1671 - }), 1909 + _ => { 1910 + Box::pin(async move { 1911 + let mut response = http::Response::new(empty_body()); 1912 + let headers = response.headers_mut(); 1913 + headers 1914 + .insert( 1915 + tonic::Status::GRPC_STATUS, 1916 + (tonic::Code::Unimplemented as i32).into(), 1917 + ); 1918 + headers 1919 + .insert( 1920 + http::header::CONTENT_TYPE, 1921 + tonic::metadata::GRPC_CONTENT_TYPE, 1922 + ); 1923 + Ok(response) 1924 + }) 1925 + } 1672 1926 } 1673 1927 } 1674 1928 } ··· 1697 1951 dead_code, 1698 1952 missing_docs, 1699 1953 clippy::wildcard_imports, 1700 - clippy::let_unit_value 1954 + clippy::let_unit_value, 1701 1955 )] 1702 - use tonic::codegen::http::Uri; 1703 1956 use tonic::codegen::*; 1957 + use tonic::codegen::http::Uri; 1704 1958 #[derive(Debug, Clone)] 1705 1959 pub struct MetadataServiceClient<T> { 1706 1960 inner: tonic::client::Grpc<T>, ··· 1744 1998 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 1745 1999 >, 1746 2000 >, 1747 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 1748 - Into<StdError> + std::marker::Send + std::marker::Sync, 2001 + <T as tonic::codegen::Service< 2002 + http::Request<tonic::body::BoxBody>, 2003 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 1749 2004 { 1750 2005 MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) 1751 2006 } ··· 1789 2044 dead_code, 1790 2045 missing_docs, 1791 2046 clippy::wildcard_imports, 1792 - clippy::let_unit_value 2047 + clippy::let_unit_value, 1793 2048 )] 1794 2049 use tonic::codegen::*; 1795 2050 /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. ··· 1816 2071 max_encoding_message_size: None, 1817 2072 } 1818 2073 } 1819 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 2074 + pub fn with_interceptor<F>( 2075 + inner: T, 2076 + interceptor: F, 2077 + ) -> InterceptedService<Self, F> 1820 2078 where 1821 2079 F: tonic::service::Interceptor, 1822 2080 { ··· 1868 2126 } 1869 2127 fn call(&mut self, req: http::Request<B>) -> Self::Future { 1870 2128 match req.uri().path() { 1871 - _ => Box::pin(async move { 1872 - let mut response = http::Response::new(empty_body()); 1873 - let headers = response.headers_mut(); 1874 - headers.insert( 1875 - tonic::Status::GRPC_STATUS, 1876 - (tonic::Code::Unimplemented as i32).into(), 1877 - ); 1878 - headers.insert( 1879 - http::header::CONTENT_TYPE, 1880 - tonic::metadata::GRPC_CONTENT_TYPE, 1881 - ); 1882 - Ok(response) 1883 - }), 2129 + _ => { 2130 + Box::pin(async move { 2131 + let mut response = http::Response::new(empty_body()); 2132 + let headers = response.headers_mut(); 2133 + headers 2134 + .insert( 2135 + tonic::Status::GRPC_STATUS, 2136 + (tonic::Code::Unimplemented as i32).into(), 2137 + ); 2138 + headers 2139 + .insert( 2140 + http::header::CONTENT_TYPE, 2141 + tonic::metadata::GRPC_CONTENT_TYPE, 2142 + ); 2143 + Ok(response) 2144 + }) 2145 + } 1884 2146 } 1885 2147 } 1886 2148 } ··· 2164 2426 dead_code, 2165 2427 missing_docs, 2166 2428 clippy::wildcard_imports, 2167 - clippy::let_unit_value 2429 + clippy::let_unit_value, 2168 2430 )] 2169 - use tonic::codegen::http::Uri; 2170 2431 use tonic::codegen::*; 2432 + use tonic::codegen::http::Uri; 2171 2433 #[derive(Debug, Clone)] 2172 2434 pub struct PlaybackServiceClient<T> { 2173 2435 inner: tonic::client::Grpc<T>, ··· 2211 2473 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 2212 2474 >, 2213 2475 >, 2214 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 2215 - Into<StdError> + std::marker::Send + std::marker::Sync, 2476 + <T as tonic::codegen::Service< 2477 + http::Request<tonic::body::BoxBody>, 2478 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 2216 2479 { 2217 2480 PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) 2218 2481 } ··· 2251 2514 &mut self, 2252 2515 request: impl tonic::IntoRequest<super::PlayRequest>, 2253 2516 ) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> { 2254 - self.inner.ready().await.map_err(|e| { 2255 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2256 - })?; 2517 + self.inner 2518 + .ready() 2519 + .await 2520 + .map_err(|e| { 2521 + tonic::Status::unknown( 2522 + format!("Service was not ready: {}", e.into()), 2523 + ) 2524 + })?; 2257 2525 let codec = tonic::codec::ProstCodec::default(); 2258 - let path = 2259 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); 2526 + let path = http::uri::PathAndQuery::from_static( 2527 + "/rockbox.v1alpha1.PlaybackService/Play", 2528 + ); 2260 2529 let mut req = request.into_request(); 2261 2530 req.extensions_mut() 2262 2531 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); ··· 2266 2535 &mut self, 2267 2536 request: impl tonic::IntoRequest<super::PauseRequest>, 2268 2537 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> { 2269 - self.inner.ready().await.map_err(|e| { 2270 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2271 - })?; 2538 + self.inner 2539 + .ready() 2540 + .await 2541 + .map_err(|e| { 2542 + tonic::Status::unknown( 2543 + format!("Service was not ready: {}", e.into()), 2544 + ) 2545 + })?; 2272 2546 let codec = tonic::codec::ProstCodec::default(); 2273 - let path = 2274 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); 2547 + let path = http::uri::PathAndQuery::from_static( 2548 + "/rockbox.v1alpha1.PlaybackService/Pause", 2549 + ); 2275 2550 let mut req = request.into_request(); 2276 2551 req.extensions_mut() 2277 2552 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); ··· 2280 2555 pub async fn play_or_pause( 2281 2556 &mut self, 2282 2557 request: impl tonic::IntoRequest<super::PlayOrPauseRequest>, 2283 - ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status> 2284 - { 2285 - self.inner.ready().await.map_err(|e| { 2286 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2287 - })?; 2558 + ) -> std::result::Result< 2559 + tonic::Response<super::PlayOrPauseResponse>, 2560 + tonic::Status, 2561 + > { 2562 + self.inner 2563 + .ready() 2564 + .await 2565 + .map_err(|e| { 2566 + tonic::Status::unknown( 2567 + format!("Service was not ready: {}", e.into()), 2568 + ) 2569 + })?; 2288 2570 let codec = tonic::codec::ProstCodec::default(); 2289 2571 let path = http::uri::PathAndQuery::from_static( 2290 2572 "/rockbox.v1alpha1.PlaybackService/PlayOrPause", 2291 2573 ); 2292 2574 let mut req = request.into_request(); 2293 - req.extensions_mut().insert(GrpcMethod::new( 2294 - "rockbox.v1alpha1.PlaybackService", 2295 - "PlayOrPause", 2296 - )); 2575 + req.extensions_mut() 2576 + .insert( 2577 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), 2578 + ); 2297 2579 self.inner.unary(req, path, codec).await 2298 2580 } 2299 2581 pub async fn resume( 2300 2582 &mut self, 2301 2583 request: impl tonic::IntoRequest<super::ResumeRequest>, 2302 2584 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> { 2303 - self.inner.ready().await.map_err(|e| { 2304 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2305 - })?; 2585 + self.inner 2586 + .ready() 2587 + .await 2588 + .map_err(|e| { 2589 + tonic::Status::unknown( 2590 + format!("Service was not ready: {}", e.into()), 2591 + ) 2592 + })?; 2306 2593 let codec = tonic::codec::ProstCodec::default(); 2307 - let path = 2308 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); 2594 + let path = http::uri::PathAndQuery::from_static( 2595 + "/rockbox.v1alpha1.PlaybackService/Resume", 2596 + ); 2309 2597 let mut req = request.into_request(); 2310 - req.extensions_mut().insert(GrpcMethod::new( 2311 - "rockbox.v1alpha1.PlaybackService", 2312 - "Resume", 2313 - )); 2598 + req.extensions_mut() 2599 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); 2314 2600 self.inner.unary(req, path, codec).await 2315 2601 } 2316 2602 pub async fn next( 2317 2603 &mut self, 2318 2604 request: impl tonic::IntoRequest<super::NextRequest>, 2319 2605 ) -> std::result::Result<tonic::Response<super::NextResponse>, tonic::Status> { 2320 - self.inner.ready().await.map_err(|e| { 2321 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2322 - })?; 2606 + self.inner 2607 + .ready() 2608 + .await 2609 + .map_err(|e| { 2610 + tonic::Status::unknown( 2611 + format!("Service was not ready: {}", e.into()), 2612 + ) 2613 + })?; 2323 2614 let codec = tonic::codec::ProstCodec::default(); 2324 - let path = 2325 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); 2615 + let path = http::uri::PathAndQuery::from_static( 2616 + "/rockbox.v1alpha1.PlaybackService/Next", 2617 + ); 2326 2618 let mut req = request.into_request(); 2327 2619 req.extensions_mut() 2328 2620 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); ··· 2331 2623 pub async fn previous( 2332 2624 &mut self, 2333 2625 request: impl tonic::IntoRequest<super::PreviousRequest>, 2334 - ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status> { 2335 - self.inner.ready().await.map_err(|e| { 2336 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2337 - })?; 2626 + ) -> std::result::Result< 2627 + tonic::Response<super::PreviousResponse>, 2628 + tonic::Status, 2629 + > { 2630 + self.inner 2631 + .ready() 2632 + .await 2633 + .map_err(|e| { 2634 + tonic::Status::unknown( 2635 + format!("Service was not ready: {}", e.into()), 2636 + ) 2637 + })?; 2338 2638 let codec = tonic::codec::ProstCodec::default(); 2339 - let path = 2340 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); 2639 + let path = http::uri::PathAndQuery::from_static( 2640 + "/rockbox.v1alpha1.PlaybackService/Previous", 2641 + ); 2341 2642 let mut req = request.into_request(); 2342 - req.extensions_mut().insert(GrpcMethod::new( 2343 - "rockbox.v1alpha1.PlaybackService", 2344 - "Previous", 2345 - )); 2643 + req.extensions_mut() 2644 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); 2346 2645 self.inner.unary(req, path, codec).await 2347 2646 } 2348 2647 pub async fn fast_forward_rewind( 2349 2648 &mut self, 2350 2649 request: impl tonic::IntoRequest<super::FastForwardRewindRequest>, 2351 - ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status> 2352 - { 2353 - self.inner.ready().await.map_err(|e| { 2354 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2355 - })?; 2650 + ) -> std::result::Result< 2651 + tonic::Response<super::FastForwardRewindResponse>, 2652 + tonic::Status, 2653 + > { 2654 + self.inner 2655 + .ready() 2656 + .await 2657 + .map_err(|e| { 2658 + tonic::Status::unknown( 2659 + format!("Service was not ready: {}", e.into()), 2660 + ) 2661 + })?; 2356 2662 let codec = tonic::codec::ProstCodec::default(); 2357 2663 let path = http::uri::PathAndQuery::from_static( 2358 2664 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", 2359 2665 ); 2360 2666 let mut req = request.into_request(); 2361 - req.extensions_mut().insert(GrpcMethod::new( 2362 - "rockbox.v1alpha1.PlaybackService", 2363 - "FastForwardRewind", 2364 - )); 2667 + req.extensions_mut() 2668 + .insert( 2669 + GrpcMethod::new( 2670 + "rockbox.v1alpha1.PlaybackService", 2671 + "FastForwardRewind", 2672 + ), 2673 + ); 2365 2674 self.inner.unary(req, path, codec).await 2366 2675 } 2367 2676 pub async fn status( 2368 2677 &mut self, 2369 2678 request: impl tonic::IntoRequest<super::StatusRequest>, 2370 2679 ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status> { 2371 - self.inner.ready().await.map_err(|e| { 2372 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2373 - })?; 2680 + self.inner 2681 + .ready() 2682 + .await 2683 + .map_err(|e| { 2684 + tonic::Status::unknown( 2685 + format!("Service was not ready: {}", e.into()), 2686 + ) 2687 + })?; 2374 2688 let codec = tonic::codec::ProstCodec::default(); 2375 - let path = 2376 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); 2689 + let path = http::uri::PathAndQuery::from_static( 2690 + "/rockbox.v1alpha1.PlaybackService/Status", 2691 + ); 2377 2692 let mut req = request.into_request(); 2378 - req.extensions_mut().insert(GrpcMethod::new( 2379 - "rockbox.v1alpha1.PlaybackService", 2380 - "Status", 2381 - )); 2693 + req.extensions_mut() 2694 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); 2382 2695 self.inner.unary(req, path, codec).await 2383 2696 } 2384 2697 pub async fn current_track( 2385 2698 &mut self, 2386 2699 request: impl tonic::IntoRequest<super::CurrentTrackRequest>, 2387 - ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status> 2388 - { 2389 - self.inner.ready().await.map_err(|e| { 2390 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2391 - })?; 2700 + ) -> std::result::Result< 2701 + tonic::Response<super::CurrentTrackResponse>, 2702 + tonic::Status, 2703 + > { 2704 + self.inner 2705 + .ready() 2706 + .await 2707 + .map_err(|e| { 2708 + tonic::Status::unknown( 2709 + format!("Service was not ready: {}", e.into()), 2710 + ) 2711 + })?; 2392 2712 let codec = tonic::codec::ProstCodec::default(); 2393 2713 let path = http::uri::PathAndQuery::from_static( 2394 2714 "/rockbox.v1alpha1.PlaybackService/CurrentTrack", 2395 2715 ); 2396 2716 let mut req = request.into_request(); 2397 - req.extensions_mut().insert(GrpcMethod::new( 2398 - "rockbox.v1alpha1.PlaybackService", 2399 - "CurrentTrack", 2400 - )); 2717 + req.extensions_mut() 2718 + .insert( 2719 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), 2720 + ); 2401 2721 self.inner.unary(req, path, codec).await 2402 2722 } 2403 2723 pub async fn next_track( 2404 2724 &mut self, 2405 2725 request: impl tonic::IntoRequest<super::NextTrackRequest>, 2406 - ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status> { 2407 - self.inner.ready().await.map_err(|e| { 2408 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2409 - })?; 2726 + ) -> std::result::Result< 2727 + tonic::Response<super::NextTrackResponse>, 2728 + tonic::Status, 2729 + > { 2730 + self.inner 2731 + .ready() 2732 + .await 2733 + .map_err(|e| { 2734 + tonic::Status::unknown( 2735 + format!("Service was not ready: {}", e.into()), 2736 + ) 2737 + })?; 2410 2738 let codec = tonic::codec::ProstCodec::default(); 2411 - let path = 2412 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); 2739 + let path = http::uri::PathAndQuery::from_static( 2740 + "/rockbox.v1alpha1.PlaybackService/NextTrack", 2741 + ); 2413 2742 let mut req = request.into_request(); 2414 - req.extensions_mut().insert(GrpcMethod::new( 2415 - "rockbox.v1alpha1.PlaybackService", 2416 - "NextTrack", 2417 - )); 2743 + req.extensions_mut() 2744 + .insert( 2745 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), 2746 + ); 2418 2747 self.inner.unary(req, path, codec).await 2419 2748 } 2420 2749 pub async fn flush_and_reload_tracks( 2421 2750 &mut self, 2422 2751 request: impl tonic::IntoRequest<super::FlushAndReloadTracksRequest>, 2423 - ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status> 2424 - { 2425 - self.inner.ready().await.map_err(|e| { 2426 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2427 - })?; 2752 + ) -> std::result::Result< 2753 + tonic::Response<super::FlushAndReloadTracksResponse>, 2754 + tonic::Status, 2755 + > { 2756 + self.inner 2757 + .ready() 2758 + .await 2759 + .map_err(|e| { 2760 + tonic::Status::unknown( 2761 + format!("Service was not ready: {}", e.into()), 2762 + ) 2763 + })?; 2428 2764 let codec = tonic::codec::ProstCodec::default(); 2429 2765 let path = http::uri::PathAndQuery::from_static( 2430 2766 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", 2431 2767 ); 2432 2768 let mut req = request.into_request(); 2433 - req.extensions_mut().insert(GrpcMethod::new( 2434 - "rockbox.v1alpha1.PlaybackService", 2435 - "FlushAndReloadTracks", 2436 - )); 2769 + req.extensions_mut() 2770 + .insert( 2771 + GrpcMethod::new( 2772 + "rockbox.v1alpha1.PlaybackService", 2773 + "FlushAndReloadTracks", 2774 + ), 2775 + ); 2437 2776 self.inner.unary(req, path, codec).await 2438 2777 } 2439 2778 pub async fn get_file_position( 2440 2779 &mut self, 2441 2780 request: impl tonic::IntoRequest<super::GetFilePositionRequest>, 2442 - ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status> 2443 - { 2444 - self.inner.ready().await.map_err(|e| { 2445 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2446 - })?; 2781 + ) -> std::result::Result< 2782 + tonic::Response<super::GetFilePositionResponse>, 2783 + tonic::Status, 2784 + > { 2785 + self.inner 2786 + .ready() 2787 + .await 2788 + .map_err(|e| { 2789 + tonic::Status::unknown( 2790 + format!("Service was not ready: {}", e.into()), 2791 + ) 2792 + })?; 2447 2793 let codec = tonic::codec::ProstCodec::default(); 2448 2794 let path = http::uri::PathAndQuery::from_static( 2449 2795 "/rockbox.v1alpha1.PlaybackService/GetFilePosition", 2450 2796 ); 2451 2797 let mut req = request.into_request(); 2452 - req.extensions_mut().insert(GrpcMethod::new( 2453 - "rockbox.v1alpha1.PlaybackService", 2454 - "GetFilePosition", 2455 - )); 2798 + req.extensions_mut() 2799 + .insert( 2800 + GrpcMethod::new( 2801 + "rockbox.v1alpha1.PlaybackService", 2802 + "GetFilePosition", 2803 + ), 2804 + ); 2456 2805 self.inner.unary(req, path, codec).await 2457 2806 } 2458 2807 pub async fn hard_stop( 2459 2808 &mut self, 2460 2809 request: impl tonic::IntoRequest<super::HardStopRequest>, 2461 - ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status> { 2462 - self.inner.ready().await.map_err(|e| { 2463 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2464 - })?; 2810 + ) -> std::result::Result< 2811 + tonic::Response<super::HardStopResponse>, 2812 + tonic::Status, 2813 + > { 2814 + self.inner 2815 + .ready() 2816 + .await 2817 + .map_err(|e| { 2818 + tonic::Status::unknown( 2819 + format!("Service was not ready: {}", e.into()), 2820 + ) 2821 + })?; 2465 2822 let codec = tonic::codec::ProstCodec::default(); 2466 - let path = 2467 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); 2823 + let path = http::uri::PathAndQuery::from_static( 2824 + "/rockbox.v1alpha1.PlaybackService/HardStop", 2825 + ); 2468 2826 let mut req = request.into_request(); 2469 - req.extensions_mut().insert(GrpcMethod::new( 2470 - "rockbox.v1alpha1.PlaybackService", 2471 - "HardStop", 2472 - )); 2827 + req.extensions_mut() 2828 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); 2473 2829 self.inner.unary(req, path, codec).await 2474 2830 } 2475 2831 pub async fn play_album( 2476 2832 &mut self, 2477 2833 request: impl tonic::IntoRequest<super::PlayAlbumRequest>, 2478 - ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status> { 2479 - self.inner.ready().await.map_err(|e| { 2480 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2481 - })?; 2834 + ) -> std::result::Result< 2835 + tonic::Response<super::PlayAlbumResponse>, 2836 + tonic::Status, 2837 + > { 2838 + self.inner 2839 + .ready() 2840 + .await 2841 + .map_err(|e| { 2842 + tonic::Status::unknown( 2843 + format!("Service was not ready: {}", e.into()), 2844 + ) 2845 + })?; 2482 2846 let codec = tonic::codec::ProstCodec::default(); 2483 - let path = 2484 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); 2847 + let path = http::uri::PathAndQuery::from_static( 2848 + "/rockbox.v1alpha1.PlaybackService/PlayAlbum", 2849 + ); 2485 2850 let mut req = request.into_request(); 2486 - req.extensions_mut().insert(GrpcMethod::new( 2487 - "rockbox.v1alpha1.PlaybackService", 2488 - "PlayAlbum", 2489 - )); 2851 + req.extensions_mut() 2852 + .insert( 2853 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), 2854 + ); 2490 2855 self.inner.unary(req, path, codec).await 2491 2856 } 2492 2857 pub async fn play_artist_tracks( 2493 2858 &mut self, 2494 2859 request: impl tonic::IntoRequest<super::PlayArtistTracksRequest>, 2495 - ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status> 2496 - { 2497 - self.inner.ready().await.map_err(|e| { 2498 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2499 - })?; 2860 + ) -> std::result::Result< 2861 + tonic::Response<super::PlayArtistTracksResponse>, 2862 + tonic::Status, 2863 + > { 2864 + self.inner 2865 + .ready() 2866 + .await 2867 + .map_err(|e| { 2868 + tonic::Status::unknown( 2869 + format!("Service was not ready: {}", e.into()), 2870 + ) 2871 + })?; 2500 2872 let codec = tonic::codec::ProstCodec::default(); 2501 2873 let path = http::uri::PathAndQuery::from_static( 2502 2874 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", 2503 2875 ); 2504 2876 let mut req = request.into_request(); 2505 - req.extensions_mut().insert(GrpcMethod::new( 2506 - "rockbox.v1alpha1.PlaybackService", 2507 - "PlayArtistTracks", 2508 - )); 2877 + req.extensions_mut() 2878 + .insert( 2879 + GrpcMethod::new( 2880 + "rockbox.v1alpha1.PlaybackService", 2881 + "PlayArtistTracks", 2882 + ), 2883 + ); 2509 2884 self.inner.unary(req, path, codec).await 2510 2885 } 2511 2886 pub async fn play_playlist( 2512 2887 &mut self, 2513 2888 request: impl tonic::IntoRequest<super::PlayPlaylistRequest>, 2514 - ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status> 2515 - { 2516 - self.inner.ready().await.map_err(|e| { 2517 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2518 - })?; 2889 + ) -> std::result::Result< 2890 + tonic::Response<super::PlayPlaylistResponse>, 2891 + tonic::Status, 2892 + > { 2893 + self.inner 2894 + .ready() 2895 + .await 2896 + .map_err(|e| { 2897 + tonic::Status::unknown( 2898 + format!("Service was not ready: {}", e.into()), 2899 + ) 2900 + })?; 2519 2901 let codec = tonic::codec::ProstCodec::default(); 2520 2902 let path = http::uri::PathAndQuery::from_static( 2521 2903 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", 2522 2904 ); 2523 2905 let mut req = request.into_request(); 2524 - req.extensions_mut().insert(GrpcMethod::new( 2525 - "rockbox.v1alpha1.PlaybackService", 2526 - "PlayPlaylist", 2527 - )); 2906 + req.extensions_mut() 2907 + .insert( 2908 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), 2909 + ); 2528 2910 self.inner.unary(req, path, codec).await 2529 2911 } 2530 2912 pub async fn play_directory( 2531 2913 &mut self, 2532 2914 request: impl tonic::IntoRequest<super::PlayDirectoryRequest>, 2533 - ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status> 2534 - { 2535 - self.inner.ready().await.map_err(|e| { 2536 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2537 - })?; 2915 + ) -> std::result::Result< 2916 + tonic::Response<super::PlayDirectoryResponse>, 2917 + tonic::Status, 2918 + > { 2919 + self.inner 2920 + .ready() 2921 + .await 2922 + .map_err(|e| { 2923 + tonic::Status::unknown( 2924 + format!("Service was not ready: {}", e.into()), 2925 + ) 2926 + })?; 2538 2927 let codec = tonic::codec::ProstCodec::default(); 2539 2928 let path = http::uri::PathAndQuery::from_static( 2540 2929 "/rockbox.v1alpha1.PlaybackService/PlayDirectory", 2541 2930 ); 2542 2931 let mut req = request.into_request(); 2543 - req.extensions_mut().insert(GrpcMethod::new( 2544 - "rockbox.v1alpha1.PlaybackService", 2545 - "PlayDirectory", 2546 - )); 2932 + req.extensions_mut() 2933 + .insert( 2934 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), 2935 + ); 2547 2936 self.inner.unary(req, path, codec).await 2548 2937 } 2549 2938 pub async fn play_music_directory( 2550 2939 &mut self, 2551 2940 request: impl tonic::IntoRequest<super::PlayMusicDirectoryRequest>, 2552 - ) -> std::result::Result<tonic::Response<super::PlayMusicDirectoryResponse>, tonic::Status> 2553 - { 2554 - self.inner.ready().await.map_err(|e| { 2555 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2556 - })?; 2941 + ) -> std::result::Result< 2942 + tonic::Response<super::PlayMusicDirectoryResponse>, 2943 + tonic::Status, 2944 + > { 2945 + self.inner 2946 + .ready() 2947 + .await 2948 + .map_err(|e| { 2949 + tonic::Status::unknown( 2950 + format!("Service was not ready: {}", e.into()), 2951 + ) 2952 + })?; 2557 2953 let codec = tonic::codec::ProstCodec::default(); 2558 2954 let path = http::uri::PathAndQuery::from_static( 2559 2955 "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory", 2560 2956 ); 2561 2957 let mut req = request.into_request(); 2562 - req.extensions_mut().insert(GrpcMethod::new( 2563 - "rockbox.v1alpha1.PlaybackService", 2564 - "PlayMusicDirectory", 2565 - )); 2958 + req.extensions_mut() 2959 + .insert( 2960 + GrpcMethod::new( 2961 + "rockbox.v1alpha1.PlaybackService", 2962 + "PlayMusicDirectory", 2963 + ), 2964 + ); 2566 2965 self.inner.unary(req, path, codec).await 2567 2966 } 2568 2967 pub async fn play_track( 2569 2968 &mut self, 2570 2969 request: impl tonic::IntoRequest<super::PlayTrackRequest>, 2571 - ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status> { 2572 - self.inner.ready().await.map_err(|e| { 2573 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2574 - })?; 2970 + ) -> std::result::Result< 2971 + tonic::Response<super::PlayTrackResponse>, 2972 + tonic::Status, 2973 + > { 2974 + self.inner 2975 + .ready() 2976 + .await 2977 + .map_err(|e| { 2978 + tonic::Status::unknown( 2979 + format!("Service was not ready: {}", e.into()), 2980 + ) 2981 + })?; 2575 2982 let codec = tonic::codec::ProstCodec::default(); 2576 - let path = 2577 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); 2983 + let path = http::uri::PathAndQuery::from_static( 2984 + "/rockbox.v1alpha1.PlaybackService/PlayTrack", 2985 + ); 2578 2986 let mut req = request.into_request(); 2579 - req.extensions_mut().insert(GrpcMethod::new( 2580 - "rockbox.v1alpha1.PlaybackService", 2581 - "PlayTrack", 2582 - )); 2987 + req.extensions_mut() 2988 + .insert( 2989 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), 2990 + ); 2583 2991 self.inner.unary(req, path, codec).await 2584 2992 } 2585 2993 pub async fn play_liked_tracks( 2586 2994 &mut self, 2587 2995 request: impl tonic::IntoRequest<super::PlayLikedTracksRequest>, 2588 - ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status> 2589 - { 2590 - self.inner.ready().await.map_err(|e| { 2591 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2592 - })?; 2996 + ) -> std::result::Result< 2997 + tonic::Response<super::PlayLikedTracksResponse>, 2998 + tonic::Status, 2999 + > { 3000 + self.inner 3001 + .ready() 3002 + .await 3003 + .map_err(|e| { 3004 + tonic::Status::unknown( 3005 + format!("Service was not ready: {}", e.into()), 3006 + ) 3007 + })?; 2593 3008 let codec = tonic::codec::ProstCodec::default(); 2594 3009 let path = http::uri::PathAndQuery::from_static( 2595 3010 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", 2596 3011 ); 2597 3012 let mut req = request.into_request(); 2598 - req.extensions_mut().insert(GrpcMethod::new( 2599 - "rockbox.v1alpha1.PlaybackService", 2600 - "PlayLikedTracks", 2601 - )); 3013 + req.extensions_mut() 3014 + .insert( 3015 + GrpcMethod::new( 3016 + "rockbox.v1alpha1.PlaybackService", 3017 + "PlayLikedTracks", 3018 + ), 3019 + ); 2602 3020 self.inner.unary(req, path, codec).await 2603 3021 } 2604 3022 pub async fn play_all_tracks( 2605 3023 &mut self, 2606 3024 request: impl tonic::IntoRequest<super::PlayAllTracksRequest>, 2607 - ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status> 2608 - { 2609 - self.inner.ready().await.map_err(|e| { 2610 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2611 - })?; 3025 + ) -> std::result::Result< 3026 + tonic::Response<super::PlayAllTracksResponse>, 3027 + tonic::Status, 3028 + > { 3029 + self.inner 3030 + .ready() 3031 + .await 3032 + .map_err(|e| { 3033 + tonic::Status::unknown( 3034 + format!("Service was not ready: {}", e.into()), 3035 + ) 3036 + })?; 2612 3037 let codec = tonic::codec::ProstCodec::default(); 2613 3038 let path = http::uri::PathAndQuery::from_static( 2614 3039 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", 2615 3040 ); 2616 3041 let mut req = request.into_request(); 2617 - req.extensions_mut().insert(GrpcMethod::new( 2618 - "rockbox.v1alpha1.PlaybackService", 2619 - "PlayAllTracks", 2620 - )); 3042 + req.extensions_mut() 3043 + .insert( 3044 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), 3045 + ); 2621 3046 self.inner.unary(req, path, codec).await 2622 3047 } 2623 3048 pub async fn stream_current_track( ··· 2627 3052 tonic::Response<tonic::codec::Streaming<super::CurrentTrackResponse>>, 2628 3053 tonic::Status, 2629 3054 > { 2630 - self.inner.ready().await.map_err(|e| { 2631 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2632 - })?; 3055 + self.inner 3056 + .ready() 3057 + .await 3058 + .map_err(|e| { 3059 + tonic::Status::unknown( 3060 + format!("Service was not ready: {}", e.into()), 3061 + ) 3062 + })?; 2633 3063 let codec = tonic::codec::ProstCodec::default(); 2634 3064 let path = http::uri::PathAndQuery::from_static( 2635 3065 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", 2636 3066 ); 2637 3067 let mut req = request.into_request(); 2638 - req.extensions_mut().insert(GrpcMethod::new( 2639 - "rockbox.v1alpha1.PlaybackService", 2640 - "StreamCurrentTrack", 2641 - )); 3068 + req.extensions_mut() 3069 + .insert( 3070 + GrpcMethod::new( 3071 + "rockbox.v1alpha1.PlaybackService", 3072 + "StreamCurrentTrack", 3073 + ), 3074 + ); 2642 3075 self.inner.server_streaming(req, path, codec).await 2643 3076 } 2644 3077 pub async fn stream_status( ··· 2648 3081 tonic::Response<tonic::codec::Streaming<super::StatusResponse>>, 2649 3082 tonic::Status, 2650 3083 > { 2651 - self.inner.ready().await.map_err(|e| { 2652 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2653 - })?; 3084 + self.inner 3085 + .ready() 3086 + .await 3087 + .map_err(|e| { 3088 + tonic::Status::unknown( 3089 + format!("Service was not ready: {}", e.into()), 3090 + ) 3091 + })?; 2654 3092 let codec = tonic::codec::ProstCodec::default(); 2655 3093 let path = http::uri::PathAndQuery::from_static( 2656 3094 "/rockbox.v1alpha1.PlaybackService/StreamStatus", 2657 3095 ); 2658 3096 let mut req = request.into_request(); 2659 - req.extensions_mut().insert(GrpcMethod::new( 2660 - "rockbox.v1alpha1.PlaybackService", 2661 - "StreamStatus", 2662 - )); 3097 + req.extensions_mut() 3098 + .insert( 3099 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), 3100 + ); 2663 3101 self.inner.server_streaming(req, path, codec).await 2664 3102 } 2665 3103 pub async fn stream_playlist( ··· 2669 3107 tonic::Response<tonic::codec::Streaming<super::PlaylistResponse>>, 2670 3108 tonic::Status, 2671 3109 > { 2672 - self.inner.ready().await.map_err(|e| { 2673 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2674 - })?; 3110 + self.inner 3111 + .ready() 3112 + .await 3113 + .map_err(|e| { 3114 + tonic::Status::unknown( 3115 + format!("Service was not ready: {}", e.into()), 3116 + ) 3117 + })?; 2675 3118 let codec = tonic::codec::ProstCodec::default(); 2676 3119 let path = http::uri::PathAndQuery::from_static( 2677 3120 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", 2678 3121 ); 2679 3122 let mut req = request.into_request(); 2680 - req.extensions_mut().insert(GrpcMethod::new( 2681 - "rockbox.v1alpha1.PlaybackService", 2682 - "StreamPlaylist", 2683 - )); 3123 + req.extensions_mut() 3124 + .insert( 3125 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), 3126 + ); 2684 3127 self.inner.server_streaming(req, path, codec).await 2685 3128 } 2686 3129 } ··· 2692 3135 dead_code, 2693 3136 missing_docs, 2694 3137 clippy::wildcard_imports, 2695 - clippy::let_unit_value 3138 + clippy::let_unit_value, 2696 3139 )] 2697 3140 use tonic::codegen::*; 2698 3141 /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. ··· 2709 3152 async fn play_or_pause( 2710 3153 &self, 2711 3154 request: tonic::Request<super::PlayOrPauseRequest>, 2712 - ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status>; 3155 + ) -> std::result::Result< 3156 + tonic::Response<super::PlayOrPauseResponse>, 3157 + tonic::Status, 3158 + >; 2713 3159 async fn resume( 2714 3160 &self, 2715 3161 request: tonic::Request<super::ResumeRequest>, ··· 2721 3167 async fn previous( 2722 3168 &self, 2723 3169 request: tonic::Request<super::PreviousRequest>, 2724 - ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status>; 3170 + ) -> std::result::Result< 3171 + tonic::Response<super::PreviousResponse>, 3172 + tonic::Status, 3173 + >; 2725 3174 async fn fast_forward_rewind( 2726 3175 &self, 2727 3176 request: tonic::Request<super::FastForwardRewindRequest>, 2728 - ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status>; 3177 + ) -> std::result::Result< 3178 + tonic::Response<super::FastForwardRewindResponse>, 3179 + tonic::Status, 3180 + >; 2729 3181 async fn status( 2730 3182 &self, 2731 3183 request: tonic::Request<super::StatusRequest>, ··· 2733 3185 async fn current_track( 2734 3186 &self, 2735 3187 request: tonic::Request<super::CurrentTrackRequest>, 2736 - ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status>; 3188 + ) -> std::result::Result< 3189 + tonic::Response<super::CurrentTrackResponse>, 3190 + tonic::Status, 3191 + >; 2737 3192 async fn next_track( 2738 3193 &self, 2739 3194 request: tonic::Request<super::NextTrackRequest>, 2740 - ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status>; 3195 + ) -> std::result::Result< 3196 + tonic::Response<super::NextTrackResponse>, 3197 + tonic::Status, 3198 + >; 2741 3199 async fn flush_and_reload_tracks( 2742 3200 &self, 2743 3201 request: tonic::Request<super::FlushAndReloadTracksRequest>, 2744 - ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status>; 3202 + ) -> std::result::Result< 3203 + tonic::Response<super::FlushAndReloadTracksResponse>, 3204 + tonic::Status, 3205 + >; 2745 3206 async fn get_file_position( 2746 3207 &self, 2747 3208 request: tonic::Request<super::GetFilePositionRequest>, 2748 - ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status>; 3209 + ) -> std::result::Result< 3210 + tonic::Response<super::GetFilePositionResponse>, 3211 + tonic::Status, 3212 + >; 2749 3213 async fn hard_stop( 2750 3214 &self, 2751 3215 request: tonic::Request<super::HardStopRequest>, 2752 - ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status>; 3216 + ) -> std::result::Result< 3217 + tonic::Response<super::HardStopResponse>, 3218 + tonic::Status, 3219 + >; 2753 3220 async fn play_album( 2754 3221 &self, 2755 3222 request: tonic::Request<super::PlayAlbumRequest>, 2756 - ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status>; 3223 + ) -> std::result::Result< 3224 + tonic::Response<super::PlayAlbumResponse>, 3225 + tonic::Status, 3226 + >; 2757 3227 async fn play_artist_tracks( 2758 3228 &self, 2759 3229 request: tonic::Request<super::PlayArtistTracksRequest>, 2760 - ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status>; 3230 + ) -> std::result::Result< 3231 + tonic::Response<super::PlayArtistTracksResponse>, 3232 + tonic::Status, 3233 + >; 2761 3234 async fn play_playlist( 2762 3235 &self, 2763 3236 request: tonic::Request<super::PlayPlaylistRequest>, 2764 - ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status>; 3237 + ) -> std::result::Result< 3238 + tonic::Response<super::PlayPlaylistResponse>, 3239 + tonic::Status, 3240 + >; 2765 3241 async fn play_directory( 2766 3242 &self, 2767 3243 request: tonic::Request<super::PlayDirectoryRequest>, 2768 - ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status>; 3244 + ) -> std::result::Result< 3245 + tonic::Response<super::PlayDirectoryResponse>, 3246 + tonic::Status, 3247 + >; 2769 3248 async fn play_music_directory( 2770 3249 &self, 2771 3250 request: tonic::Request<super::PlayMusicDirectoryRequest>, 2772 - ) -> std::result::Result<tonic::Response<super::PlayMusicDirectoryResponse>, tonic::Status>; 3251 + ) -> std::result::Result< 3252 + tonic::Response<super::PlayMusicDirectoryResponse>, 3253 + tonic::Status, 3254 + >; 2773 3255 async fn play_track( 2774 3256 &self, 2775 3257 request: tonic::Request<super::PlayTrackRequest>, 2776 - ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status>; 3258 + ) -> std::result::Result< 3259 + tonic::Response<super::PlayTrackResponse>, 3260 + tonic::Status, 3261 + >; 2777 3262 async fn play_liked_tracks( 2778 3263 &self, 2779 3264 request: tonic::Request<super::PlayLikedTracksRequest>, 2780 - ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status>; 3265 + ) -> std::result::Result< 3266 + tonic::Response<super::PlayLikedTracksResponse>, 3267 + tonic::Status, 3268 + >; 2781 3269 async fn play_all_tracks( 2782 3270 &self, 2783 3271 request: tonic::Request<super::PlayAllTracksRequest>, 2784 - ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status>; 3272 + ) -> std::result::Result< 3273 + tonic::Response<super::PlayAllTracksResponse>, 3274 + tonic::Status, 3275 + >; 2785 3276 /// Server streaming response type for the StreamCurrentTrack method. 2786 3277 type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< 2787 3278 Item = std::result::Result<super::CurrentTrackResponse, tonic::Status>, 2788 - > + std::marker::Send 3279 + > 3280 + + std::marker::Send 2789 3281 + 'static; 2790 3282 async fn stream_current_track( 2791 3283 &self, 2792 3284 request: tonic::Request<super::StreamCurrentTrackRequest>, 2793 - ) -> std::result::Result<tonic::Response<Self::StreamCurrentTrackStream>, tonic::Status>; 3285 + ) -> std::result::Result< 3286 + tonic::Response<Self::StreamCurrentTrackStream>, 3287 + tonic::Status, 3288 + >; 2794 3289 /// Server streaming response type for the StreamStatus method. 2795 3290 type StreamStatusStream: tonic::codegen::tokio_stream::Stream< 2796 3291 Item = std::result::Result<super::StatusResponse, tonic::Status>, 2797 - > + std::marker::Send 3292 + > 3293 + + std::marker::Send 2798 3294 + 'static; 2799 3295 async fn stream_status( 2800 3296 &self, 2801 3297 request: tonic::Request<super::StreamStatusRequest>, 2802 - ) -> std::result::Result<tonic::Response<Self::StreamStatusStream>, tonic::Status>; 3298 + ) -> std::result::Result< 3299 + tonic::Response<Self::StreamStatusStream>, 3300 + tonic::Status, 3301 + >; 2803 3302 /// Server streaming response type for the StreamPlaylist method. 2804 3303 type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< 2805 3304 Item = std::result::Result<super::PlaylistResponse, tonic::Status>, 2806 - > + std::marker::Send 3305 + > 3306 + + std::marker::Send 2807 3307 + 'static; 2808 3308 async fn stream_playlist( 2809 3309 &self, 2810 3310 request: tonic::Request<super::StreamPlaylistRequest>, 2811 - ) -> std::result::Result<tonic::Response<Self::StreamPlaylistStream>, tonic::Status>; 3311 + ) -> std::result::Result< 3312 + tonic::Response<Self::StreamPlaylistStream>, 3313 + tonic::Status, 3314 + >; 2812 3315 } 2813 3316 #[derive(Debug)] 2814 3317 pub struct PlaybackServiceServer<T> { ··· 2831 3334 max_encoding_message_size: None, 2832 3335 } 2833 3336 } 2834 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 3337 + pub fn with_interceptor<F>( 3338 + inner: T, 3339 + interceptor: F, 3340 + ) -> InterceptedService<Self, F> 2835 3341 where 2836 3342 F: tonic::service::Interceptor, 2837 3343 { ··· 2886 3392 "/rockbox.v1alpha1.PlaybackService/Play" => { 2887 3393 #[allow(non_camel_case_types)] 2888 3394 struct PlaySvc<T: PlaybackService>(pub Arc<T>); 2889 - impl<T: PlaybackService> tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 3395 + impl< 3396 + T: PlaybackService, 3397 + > tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 2890 3398 type Response = super::PlayResponse; 2891 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3399 + type Future = BoxFuture< 3400 + tonic::Response<Self::Response>, 3401 + tonic::Status, 3402 + >; 2892 3403 fn call( 2893 3404 &mut self, 2894 3405 request: tonic::Request<super::PlayRequest>, 2895 3406 ) -> Self::Future { 2896 3407 let inner = Arc::clone(&self.0); 2897 - let fut = 2898 - async move { <T as PlaybackService>::play(&inner, request).await }; 3408 + let fut = async move { 3409 + <T as PlaybackService>::play(&inner, request).await 3410 + }; 2899 3411 Box::pin(fut) 2900 3412 } 2901 3413 } ··· 2924 3436 "/rockbox.v1alpha1.PlaybackService/Pause" => { 2925 3437 #[allow(non_camel_case_types)] 2926 3438 struct PauseSvc<T: PlaybackService>(pub Arc<T>); 2927 - impl<T: PlaybackService> tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 3439 + impl< 3440 + T: PlaybackService, 3441 + > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 2928 3442 type Response = super::PauseResponse; 2929 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3443 + type Future = BoxFuture< 3444 + tonic::Response<Self::Response>, 3445 + tonic::Status, 3446 + >; 2930 3447 fn call( 2931 3448 &mut self, 2932 3449 request: tonic::Request<super::PauseRequest>, 2933 3450 ) -> Self::Future { 2934 3451 let inner = Arc::clone(&self.0); 2935 - let fut = 2936 - async move { <T as PlaybackService>::pause(&inner, request).await }; 3452 + let fut = async move { 3453 + <T as PlaybackService>::pause(&inner, request).await 3454 + }; 2937 3455 Box::pin(fut) 2938 3456 } 2939 3457 } ··· 2962 3480 "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { 2963 3481 #[allow(non_camel_case_types)] 2964 3482 struct PlayOrPauseSvc<T: PlaybackService>(pub Arc<T>); 2965 - impl<T: PlaybackService> tonic::server::UnaryService<super::PlayOrPauseRequest> 2966 - for PlayOrPauseSvc<T> 2967 - { 3483 + impl< 3484 + T: PlaybackService, 3485 + > tonic::server::UnaryService<super::PlayOrPauseRequest> 3486 + for PlayOrPauseSvc<T> { 2968 3487 type Response = super::PlayOrPauseResponse; 2969 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3488 + type Future = BoxFuture< 3489 + tonic::Response<Self::Response>, 3490 + tonic::Status, 3491 + >; 2970 3492 fn call( 2971 3493 &mut self, 2972 3494 request: tonic::Request<super::PlayOrPauseRequest>, ··· 3003 3525 "/rockbox.v1alpha1.PlaybackService/Resume" => { 3004 3526 #[allow(non_camel_case_types)] 3005 3527 struct ResumeSvc<T: PlaybackService>(pub Arc<T>); 3006 - impl<T: PlaybackService> tonic::server::UnaryService<super::ResumeRequest> for ResumeSvc<T> { 3528 + impl< 3529 + T: PlaybackService, 3530 + > tonic::server::UnaryService<super::ResumeRequest> 3531 + for ResumeSvc<T> { 3007 3532 type Response = super::ResumeResponse; 3008 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3533 + type Future = BoxFuture< 3534 + tonic::Response<Self::Response>, 3535 + tonic::Status, 3536 + >; 3009 3537 fn call( 3010 3538 &mut self, 3011 3539 request: tonic::Request<super::ResumeRequest>, ··· 3042 3570 "/rockbox.v1alpha1.PlaybackService/Next" => { 3043 3571 #[allow(non_camel_case_types)] 3044 3572 struct NextSvc<T: PlaybackService>(pub Arc<T>); 3045 - impl<T: PlaybackService> tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 3573 + impl< 3574 + T: PlaybackService, 3575 + > tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 3046 3576 type Response = super::NextResponse; 3047 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3577 + type Future = BoxFuture< 3578 + tonic::Response<Self::Response>, 3579 + tonic::Status, 3580 + >; 3048 3581 fn call( 3049 3582 &mut self, 3050 3583 request: tonic::Request<super::NextRequest>, 3051 3584 ) -> Self::Future { 3052 3585 let inner = Arc::clone(&self.0); 3053 - let fut = 3054 - async move { <T as PlaybackService>::next(&inner, request).await }; 3586 + let fut = async move { 3587 + <T as PlaybackService>::next(&inner, request).await 3588 + }; 3055 3589 Box::pin(fut) 3056 3590 } 3057 3591 } ··· 3080 3614 "/rockbox.v1alpha1.PlaybackService/Previous" => { 3081 3615 #[allow(non_camel_case_types)] 3082 3616 struct PreviousSvc<T: PlaybackService>(pub Arc<T>); 3083 - impl<T: PlaybackService> tonic::server::UnaryService<super::PreviousRequest> for PreviousSvc<T> { 3617 + impl< 3618 + T: PlaybackService, 3619 + > tonic::server::UnaryService<super::PreviousRequest> 3620 + for PreviousSvc<T> { 3084 3621 type Response = super::PreviousResponse; 3085 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3622 + type Future = BoxFuture< 3623 + tonic::Response<Self::Response>, 3624 + tonic::Status, 3625 + >; 3086 3626 fn call( 3087 3627 &mut self, 3088 3628 request: tonic::Request<super::PreviousRequest>, ··· 3119 3659 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { 3120 3660 #[allow(non_camel_case_types)] 3121 3661 struct FastForwardRewindSvc<T: PlaybackService>(pub Arc<T>); 3122 - impl<T: PlaybackService> 3123 - tonic::server::UnaryService<super::FastForwardRewindRequest> 3124 - for FastForwardRewindSvc<T> 3125 - { 3662 + impl< 3663 + T: PlaybackService, 3664 + > tonic::server::UnaryService<super::FastForwardRewindRequest> 3665 + for FastForwardRewindSvc<T> { 3126 3666 type Response = super::FastForwardRewindResponse; 3127 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3667 + type Future = BoxFuture< 3668 + tonic::Response<Self::Response>, 3669 + tonic::Status, 3670 + >; 3128 3671 fn call( 3129 3672 &mut self, 3130 3673 request: tonic::Request<super::FastForwardRewindRequest>, 3131 3674 ) -> Self::Future { 3132 3675 let inner = Arc::clone(&self.0); 3133 3676 let fut = async move { 3134 - <T as PlaybackService>::fast_forward_rewind(&inner, request).await 3677 + <T as PlaybackService>::fast_forward_rewind(&inner, request) 3678 + .await 3135 3679 }; 3136 3680 Box::pin(fut) 3137 3681 } ··· 3161 3705 "/rockbox.v1alpha1.PlaybackService/Status" => { 3162 3706 #[allow(non_camel_case_types)] 3163 3707 struct StatusSvc<T: PlaybackService>(pub Arc<T>); 3164 - impl<T: PlaybackService> tonic::server::UnaryService<super::StatusRequest> for StatusSvc<T> { 3708 + impl< 3709 + T: PlaybackService, 3710 + > tonic::server::UnaryService<super::StatusRequest> 3711 + for StatusSvc<T> { 3165 3712 type Response = super::StatusResponse; 3166 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3713 + type Future = BoxFuture< 3714 + tonic::Response<Self::Response>, 3715 + tonic::Status, 3716 + >; 3167 3717 fn call( 3168 3718 &mut self, 3169 3719 request: tonic::Request<super::StatusRequest>, ··· 3200 3750 "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { 3201 3751 #[allow(non_camel_case_types)] 3202 3752 struct CurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 3203 - impl<T: PlaybackService> tonic::server::UnaryService<super::CurrentTrackRequest> 3204 - for CurrentTrackSvc<T> 3205 - { 3753 + impl< 3754 + T: PlaybackService, 3755 + > tonic::server::UnaryService<super::CurrentTrackRequest> 3756 + for CurrentTrackSvc<T> { 3206 3757 type Response = super::CurrentTrackResponse; 3207 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3758 + type Future = BoxFuture< 3759 + tonic::Response<Self::Response>, 3760 + tonic::Status, 3761 + >; 3208 3762 fn call( 3209 3763 &mut self, 3210 3764 request: tonic::Request<super::CurrentTrackRequest>, ··· 3241 3795 "/rockbox.v1alpha1.PlaybackService/NextTrack" => { 3242 3796 #[allow(non_camel_case_types)] 3243 3797 struct NextTrackSvc<T: PlaybackService>(pub Arc<T>); 3244 - impl<T: PlaybackService> tonic::server::UnaryService<super::NextTrackRequest> for NextTrackSvc<T> { 3798 + impl< 3799 + T: PlaybackService, 3800 + > tonic::server::UnaryService<super::NextTrackRequest> 3801 + for NextTrackSvc<T> { 3245 3802 type Response = super::NextTrackResponse; 3246 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3803 + type Future = BoxFuture< 3804 + tonic::Response<Self::Response>, 3805 + tonic::Status, 3806 + >; 3247 3807 fn call( 3248 3808 &mut self, 3249 3809 request: tonic::Request<super::NextTrackRequest>, ··· 3280 3840 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { 3281 3841 #[allow(non_camel_case_types)] 3282 3842 struct FlushAndReloadTracksSvc<T: PlaybackService>(pub Arc<T>); 3283 - impl<T: PlaybackService> 3284 - tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3285 - for FlushAndReloadTracksSvc<T> 3286 - { 3843 + impl< 3844 + T: PlaybackService, 3845 + > tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3846 + for FlushAndReloadTracksSvc<T> { 3287 3847 type Response = super::FlushAndReloadTracksResponse; 3288 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3848 + type Future = BoxFuture< 3849 + tonic::Response<Self::Response>, 3850 + tonic::Status, 3851 + >; 3289 3852 fn call( 3290 3853 &mut self, 3291 3854 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3292 3855 ) -> Self::Future { 3293 3856 let inner = Arc::clone(&self.0); 3294 3857 let fut = async move { 3295 - <T as PlaybackService>::flush_and_reload_tracks(&inner, request) 3858 + <T as PlaybackService>::flush_and_reload_tracks( 3859 + &inner, 3860 + request, 3861 + ) 3296 3862 .await 3297 3863 }; 3298 3864 Box::pin(fut) ··· 3323 3889 "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { 3324 3890 #[allow(non_camel_case_types)] 3325 3891 struct GetFilePositionSvc<T: PlaybackService>(pub Arc<T>); 3326 - impl<T: PlaybackService> 3327 - tonic::server::UnaryService<super::GetFilePositionRequest> 3328 - for GetFilePositionSvc<T> 3329 - { 3892 + impl< 3893 + T: PlaybackService, 3894 + > tonic::server::UnaryService<super::GetFilePositionRequest> 3895 + for GetFilePositionSvc<T> { 3330 3896 type Response = super::GetFilePositionResponse; 3331 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3897 + type Future = BoxFuture< 3898 + tonic::Response<Self::Response>, 3899 + tonic::Status, 3900 + >; 3332 3901 fn call( 3333 3902 &mut self, 3334 3903 request: tonic::Request<super::GetFilePositionRequest>, 3335 3904 ) -> Self::Future { 3336 3905 let inner = Arc::clone(&self.0); 3337 3906 let fut = async move { 3338 - <T as PlaybackService>::get_file_position(&inner, request).await 3907 + <T as PlaybackService>::get_file_position(&inner, request) 3908 + .await 3339 3909 }; 3340 3910 Box::pin(fut) 3341 3911 } ··· 3365 3935 "/rockbox.v1alpha1.PlaybackService/HardStop" => { 3366 3936 #[allow(non_camel_case_types)] 3367 3937 struct HardStopSvc<T: PlaybackService>(pub Arc<T>); 3368 - impl<T: PlaybackService> tonic::server::UnaryService<super::HardStopRequest> for HardStopSvc<T> { 3938 + impl< 3939 + T: PlaybackService, 3940 + > tonic::server::UnaryService<super::HardStopRequest> 3941 + for HardStopSvc<T> { 3369 3942 type Response = super::HardStopResponse; 3370 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3943 + type Future = BoxFuture< 3944 + tonic::Response<Self::Response>, 3945 + tonic::Status, 3946 + >; 3371 3947 fn call( 3372 3948 &mut self, 3373 3949 request: tonic::Request<super::HardStopRequest>, ··· 3404 3980 "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { 3405 3981 #[allow(non_camel_case_types)] 3406 3982 struct PlayAlbumSvc<T: PlaybackService>(pub Arc<T>); 3407 - impl<T: PlaybackService> tonic::server::UnaryService<super::PlayAlbumRequest> for PlayAlbumSvc<T> { 3983 + impl< 3984 + T: PlaybackService, 3985 + > tonic::server::UnaryService<super::PlayAlbumRequest> 3986 + for PlayAlbumSvc<T> { 3408 3987 type Response = super::PlayAlbumResponse; 3409 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3988 + type Future = BoxFuture< 3989 + tonic::Response<Self::Response>, 3990 + tonic::Status, 3991 + >; 3410 3992 fn call( 3411 3993 &mut self, 3412 3994 request: tonic::Request<super::PlayAlbumRequest>, ··· 3443 4025 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { 3444 4026 #[allow(non_camel_case_types)] 3445 4027 struct PlayArtistTracksSvc<T: PlaybackService>(pub Arc<T>); 3446 - impl<T: PlaybackService> 3447 - tonic::server::UnaryService<super::PlayArtistTracksRequest> 3448 - for PlayArtistTracksSvc<T> 3449 - { 4028 + impl< 4029 + T: PlaybackService, 4030 + > tonic::server::UnaryService<super::PlayArtistTracksRequest> 4031 + for PlayArtistTracksSvc<T> { 3450 4032 type Response = super::PlayArtistTracksResponse; 3451 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4033 + type Future = BoxFuture< 4034 + tonic::Response<Self::Response>, 4035 + tonic::Status, 4036 + >; 3452 4037 fn call( 3453 4038 &mut self, 3454 4039 request: tonic::Request<super::PlayArtistTracksRequest>, 3455 4040 ) -> Self::Future { 3456 4041 let inner = Arc::clone(&self.0); 3457 4042 let fut = async move { 3458 - <T as PlaybackService>::play_artist_tracks(&inner, request).await 4043 + <T as PlaybackService>::play_artist_tracks(&inner, request) 4044 + .await 3459 4045 }; 3460 4046 Box::pin(fut) 3461 4047 } ··· 3485 4071 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { 3486 4072 #[allow(non_camel_case_types)] 3487 4073 struct PlayPlaylistSvc<T: PlaybackService>(pub Arc<T>); 3488 - impl<T: PlaybackService> tonic::server::UnaryService<super::PlayPlaylistRequest> 3489 - for PlayPlaylistSvc<T> 3490 - { 4074 + impl< 4075 + T: PlaybackService, 4076 + > tonic::server::UnaryService<super::PlayPlaylistRequest> 4077 + for PlayPlaylistSvc<T> { 3491 4078 type Response = super::PlayPlaylistResponse; 3492 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4079 + type Future = BoxFuture< 4080 + tonic::Response<Self::Response>, 4081 + tonic::Status, 4082 + >; 3493 4083 fn call( 3494 4084 &mut self, 3495 4085 request: tonic::Request<super::PlayPlaylistRequest>, ··· 3526 4116 "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { 3527 4117 #[allow(non_camel_case_types)] 3528 4118 struct PlayDirectorySvc<T: PlaybackService>(pub Arc<T>); 3529 - impl<T: PlaybackService> 3530 - tonic::server::UnaryService<super::PlayDirectoryRequest> 3531 - for PlayDirectorySvc<T> 3532 - { 4119 + impl< 4120 + T: PlaybackService, 4121 + > tonic::server::UnaryService<super::PlayDirectoryRequest> 4122 + for PlayDirectorySvc<T> { 3533 4123 type Response = super::PlayDirectoryResponse; 3534 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4124 + type Future = BoxFuture< 4125 + tonic::Response<Self::Response>, 4126 + tonic::Status, 4127 + >; 3535 4128 fn call( 3536 4129 &mut self, 3537 4130 request: tonic::Request<super::PlayDirectoryRequest>, 3538 4131 ) -> Self::Future { 3539 4132 let inner = Arc::clone(&self.0); 3540 4133 let fut = async move { 3541 - <T as PlaybackService>::play_directory(&inner, request).await 4134 + <T as PlaybackService>::play_directory(&inner, request) 4135 + .await 3542 4136 }; 3543 4137 Box::pin(fut) 3544 4138 } ··· 3568 4162 "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory" => { 3569 4163 #[allow(non_camel_case_types)] 3570 4164 struct PlayMusicDirectorySvc<T: PlaybackService>(pub Arc<T>); 3571 - impl<T: PlaybackService> 3572 - tonic::server::UnaryService<super::PlayMusicDirectoryRequest> 3573 - for PlayMusicDirectorySvc<T> 3574 - { 4165 + impl< 4166 + T: PlaybackService, 4167 + > tonic::server::UnaryService<super::PlayMusicDirectoryRequest> 4168 + for PlayMusicDirectorySvc<T> { 3575 4169 type Response = super::PlayMusicDirectoryResponse; 3576 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4170 + type Future = BoxFuture< 4171 + tonic::Response<Self::Response>, 4172 + tonic::Status, 4173 + >; 3577 4174 fn call( 3578 4175 &mut self, 3579 4176 request: tonic::Request<super::PlayMusicDirectoryRequest>, 3580 4177 ) -> Self::Future { 3581 4178 let inner = Arc::clone(&self.0); 3582 4179 let fut = async move { 3583 - <T as PlaybackService>::play_music_directory(&inner, request).await 4180 + <T as PlaybackService>::play_music_directory( 4181 + &inner, 4182 + request, 4183 + ) 4184 + .await 3584 4185 }; 3585 4186 Box::pin(fut) 3586 4187 } ··· 3610 4211 "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { 3611 4212 #[allow(non_camel_case_types)] 3612 4213 struct PlayTrackSvc<T: PlaybackService>(pub Arc<T>); 3613 - impl<T: PlaybackService> tonic::server::UnaryService<super::PlayTrackRequest> for PlayTrackSvc<T> { 4214 + impl< 4215 + T: PlaybackService, 4216 + > tonic::server::UnaryService<super::PlayTrackRequest> 4217 + for PlayTrackSvc<T> { 3614 4218 type Response = super::PlayTrackResponse; 3615 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4219 + type Future = BoxFuture< 4220 + tonic::Response<Self::Response>, 4221 + tonic::Status, 4222 + >; 3616 4223 fn call( 3617 4224 &mut self, 3618 4225 request: tonic::Request<super::PlayTrackRequest>, ··· 3649 4256 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { 3650 4257 #[allow(non_camel_case_types)] 3651 4258 struct PlayLikedTracksSvc<T: PlaybackService>(pub Arc<T>); 3652 - impl<T: PlaybackService> 3653 - tonic::server::UnaryService<super::PlayLikedTracksRequest> 3654 - for PlayLikedTracksSvc<T> 3655 - { 4259 + impl< 4260 + T: PlaybackService, 4261 + > tonic::server::UnaryService<super::PlayLikedTracksRequest> 4262 + for PlayLikedTracksSvc<T> { 3656 4263 type Response = super::PlayLikedTracksResponse; 3657 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4264 + type Future = BoxFuture< 4265 + tonic::Response<Self::Response>, 4266 + tonic::Status, 4267 + >; 3658 4268 fn call( 3659 4269 &mut self, 3660 4270 request: tonic::Request<super::PlayLikedTracksRequest>, 3661 4271 ) -> Self::Future { 3662 4272 let inner = Arc::clone(&self.0); 3663 4273 let fut = async move { 3664 - <T as PlaybackService>::play_liked_tracks(&inner, request).await 4274 + <T as PlaybackService>::play_liked_tracks(&inner, request) 4275 + .await 3665 4276 }; 3666 4277 Box::pin(fut) 3667 4278 } ··· 3691 4302 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { 3692 4303 #[allow(non_camel_case_types)] 3693 4304 struct PlayAllTracksSvc<T: PlaybackService>(pub Arc<T>); 3694 - impl<T: PlaybackService> 3695 - tonic::server::UnaryService<super::PlayAllTracksRequest> 3696 - for PlayAllTracksSvc<T> 3697 - { 4305 + impl< 4306 + T: PlaybackService, 4307 + > tonic::server::UnaryService<super::PlayAllTracksRequest> 4308 + for PlayAllTracksSvc<T> { 3698 4309 type Response = super::PlayAllTracksResponse; 3699 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4310 + type Future = BoxFuture< 4311 + tonic::Response<Self::Response>, 4312 + tonic::Status, 4313 + >; 3700 4314 fn call( 3701 4315 &mut self, 3702 4316 request: tonic::Request<super::PlayAllTracksRequest>, 3703 4317 ) -> Self::Future { 3704 4318 let inner = Arc::clone(&self.0); 3705 4319 let fut = async move { 3706 - <T as PlaybackService>::play_all_tracks(&inner, request).await 4320 + <T as PlaybackService>::play_all_tracks(&inner, request) 4321 + .await 3707 4322 }; 3708 4323 Box::pin(fut) 3709 4324 } ··· 3733 4348 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { 3734 4349 #[allow(non_camel_case_types)] 3735 4350 struct StreamCurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 3736 - impl<T: PlaybackService> 3737 - tonic::server::ServerStreamingService<super::StreamCurrentTrackRequest> 3738 - for StreamCurrentTrackSvc<T> 3739 - { 4351 + impl< 4352 + T: PlaybackService, 4353 + > tonic::server::ServerStreamingService< 4354 + super::StreamCurrentTrackRequest, 4355 + > for StreamCurrentTrackSvc<T> { 3740 4356 type Response = super::CurrentTrackResponse; 3741 4357 type ResponseStream = T::StreamCurrentTrackStream; 3742 - type Future = 3743 - BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4358 + type Future = BoxFuture< 4359 + tonic::Response<Self::ResponseStream>, 4360 + tonic::Status, 4361 + >; 3744 4362 fn call( 3745 4363 &mut self, 3746 4364 request: tonic::Request<super::StreamCurrentTrackRequest>, 3747 4365 ) -> Self::Future { 3748 4366 let inner = Arc::clone(&self.0); 3749 4367 let fut = async move { 3750 - <T as PlaybackService>::stream_current_track(&inner, request).await 4368 + <T as PlaybackService>::stream_current_track( 4369 + &inner, 4370 + request, 4371 + ) 4372 + .await 3751 4373 }; 3752 4374 Box::pin(fut) 3753 4375 } ··· 3777 4399 "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { 3778 4400 #[allow(non_camel_case_types)] 3779 4401 struct StreamStatusSvc<T: PlaybackService>(pub Arc<T>); 3780 - impl<T: PlaybackService> 3781 - tonic::server::ServerStreamingService<super::StreamStatusRequest> 3782 - for StreamStatusSvc<T> 3783 - { 4402 + impl< 4403 + T: PlaybackService, 4404 + > tonic::server::ServerStreamingService<super::StreamStatusRequest> 4405 + for StreamStatusSvc<T> { 3784 4406 type Response = super::StatusResponse; 3785 4407 type ResponseStream = T::StreamStatusStream; 3786 - type Future = 3787 - BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4408 + type Future = BoxFuture< 4409 + tonic::Response<Self::ResponseStream>, 4410 + tonic::Status, 4411 + >; 3788 4412 fn call( 3789 4413 &mut self, 3790 4414 request: tonic::Request<super::StreamStatusRequest>, ··· 3821 4445 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { 3822 4446 #[allow(non_camel_case_types)] 3823 4447 struct StreamPlaylistSvc<T: PlaybackService>(pub Arc<T>); 3824 - impl<T: PlaybackService> 3825 - tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 3826 - for StreamPlaylistSvc<T> 3827 - { 4448 + impl< 4449 + T: PlaybackService, 4450 + > tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 4451 + for StreamPlaylistSvc<T> { 3828 4452 type Response = super::PlaylistResponse; 3829 4453 type ResponseStream = T::StreamPlaylistStream; 3830 - type Future = 3831 - BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4454 + type Future = BoxFuture< 4455 + tonic::Response<Self::ResponseStream>, 4456 + tonic::Status, 4457 + >; 3832 4458 fn call( 3833 4459 &mut self, 3834 4460 request: tonic::Request<super::StreamPlaylistRequest>, 3835 4461 ) -> Self::Future { 3836 4462 let inner = Arc::clone(&self.0); 3837 4463 let fut = async move { 3838 - <T as PlaybackService>::stream_playlist(&inner, request).await 4464 + <T as PlaybackService>::stream_playlist(&inner, request) 4465 + .await 3839 4466 }; 3840 4467 Box::pin(fut) 3841 4468 } ··· 3862 4489 }; 3863 4490 Box::pin(fut) 3864 4491 } 3865 - _ => Box::pin(async move { 3866 - let mut response = http::Response::new(empty_body()); 3867 - let headers = response.headers_mut(); 3868 - headers.insert( 3869 - tonic::Status::GRPC_STATUS, 3870 - (tonic::Code::Unimplemented as i32).into(), 3871 - ); 3872 - headers.insert( 3873 - http::header::CONTENT_TYPE, 3874 - tonic::metadata::GRPC_CONTENT_TYPE, 3875 - ); 3876 - Ok(response) 3877 - }), 4492 + _ => { 4493 + Box::pin(async move { 4494 + let mut response = http::Response::new(empty_body()); 4495 + let headers = response.headers_mut(); 4496 + headers 4497 + .insert( 4498 + tonic::Status::GRPC_STATUS, 4499 + (tonic::Code::Unimplemented as i32).into(), 4500 + ); 4501 + headers 4502 + .insert( 4503 + http::header::CONTENT_TYPE, 4504 + tonic::metadata::GRPC_CONTENT_TYPE, 4505 + ); 4506 + Ok(response) 4507 + }) 4508 + } 3878 4509 } 3879 4510 } 3880 4511 } ··· 4081 4712 dead_code, 4082 4713 missing_docs, 4083 4714 clippy::wildcard_imports, 4084 - clippy::let_unit_value 4715 + clippy::let_unit_value, 4085 4716 )] 4086 - use tonic::codegen::http::Uri; 4087 4717 use tonic::codegen::*; 4718 + use tonic::codegen::http::Uri; 4088 4719 #[derive(Debug, Clone)] 4089 4720 pub struct PlaylistServiceClient<T> { 4090 4721 inner: tonic::client::Grpc<T>, ··· 4128 4759 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 4129 4760 >, 4130 4761 >, 4131 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 4132 - Into<StdError> + std::marker::Send + std::marker::Sync, 4762 + <T as tonic::codegen::Service< 4763 + http::Request<tonic::body::BoxBody>, 4764 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 4133 4765 { 4134 4766 PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) 4135 4767 } ··· 4167 4799 pub async fn get_current( 4168 4800 &mut self, 4169 4801 request: impl tonic::IntoRequest<super::GetCurrentRequest>, 4170 - ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status> 4171 - { 4172 - self.inner.ready().await.map_err(|e| { 4173 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4174 - })?; 4802 + ) -> std::result::Result< 4803 + tonic::Response<super::GetCurrentResponse>, 4804 + tonic::Status, 4805 + > { 4806 + self.inner 4807 + .ready() 4808 + .await 4809 + .map_err(|e| { 4810 + tonic::Status::unknown( 4811 + format!("Service was not ready: {}", e.into()), 4812 + ) 4813 + })?; 4175 4814 let codec = tonic::codec::ProstCodec::default(); 4176 4815 let path = http::uri::PathAndQuery::from_static( 4177 4816 "/rockbox.v1alpha1.PlaylistService/GetCurrent", 4178 4817 ); 4179 4818 let mut req = request.into_request(); 4180 - req.extensions_mut().insert(GrpcMethod::new( 4181 - "rockbox.v1alpha1.PlaylistService", 4182 - "GetCurrent", 4183 - )); 4819 + req.extensions_mut() 4820 + .insert( 4821 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), 4822 + ); 4184 4823 self.inner.unary(req, path, codec).await 4185 4824 } 4186 4825 pub async fn get_resume_info( 4187 4826 &mut self, 4188 4827 request: impl tonic::IntoRequest<super::GetResumeInfoRequest>, 4189 - ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status> 4190 - { 4191 - self.inner.ready().await.map_err(|e| { 4192 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4193 - })?; 4828 + ) -> std::result::Result< 4829 + tonic::Response<super::GetResumeInfoResponse>, 4830 + tonic::Status, 4831 + > { 4832 + self.inner 4833 + .ready() 4834 + .await 4835 + .map_err(|e| { 4836 + tonic::Status::unknown( 4837 + format!("Service was not ready: {}", e.into()), 4838 + ) 4839 + })?; 4194 4840 let codec = tonic::codec::ProstCodec::default(); 4195 4841 let path = http::uri::PathAndQuery::from_static( 4196 4842 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", 4197 4843 ); 4198 4844 let mut req = request.into_request(); 4199 - req.extensions_mut().insert(GrpcMethod::new( 4200 - "rockbox.v1alpha1.PlaylistService", 4201 - "GetResumeInfo", 4202 - )); 4845 + req.extensions_mut() 4846 + .insert( 4847 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), 4848 + ); 4203 4849 self.inner.unary(req, path, codec).await 4204 4850 } 4205 4851 pub async fn get_track_info( 4206 4852 &mut self, 4207 4853 request: impl tonic::IntoRequest<super::GetTrackInfoRequest>, 4208 - ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status> 4209 - { 4210 - self.inner.ready().await.map_err(|e| { 4211 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4212 - })?; 4854 + ) -> std::result::Result< 4855 + tonic::Response<super::GetTrackInfoResponse>, 4856 + tonic::Status, 4857 + > { 4858 + self.inner 4859 + .ready() 4860 + .await 4861 + .map_err(|e| { 4862 + tonic::Status::unknown( 4863 + format!("Service was not ready: {}", e.into()), 4864 + ) 4865 + })?; 4213 4866 let codec = tonic::codec::ProstCodec::default(); 4214 4867 let path = http::uri::PathAndQuery::from_static( 4215 4868 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", 4216 4869 ); 4217 4870 let mut req = request.into_request(); 4218 - req.extensions_mut().insert(GrpcMethod::new( 4219 - "rockbox.v1alpha1.PlaylistService", 4220 - "GetTrackInfo", 4221 - )); 4871 + req.extensions_mut() 4872 + .insert( 4873 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), 4874 + ); 4222 4875 self.inner.unary(req, path, codec).await 4223 4876 } 4224 4877 pub async fn get_first_index( 4225 4878 &mut self, 4226 4879 request: impl tonic::IntoRequest<super::GetFirstIndexRequest>, 4227 - ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status> 4228 - { 4229 - self.inner.ready().await.map_err(|e| { 4230 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4231 - })?; 4880 + ) -> std::result::Result< 4881 + tonic::Response<super::GetFirstIndexResponse>, 4882 + tonic::Status, 4883 + > { 4884 + self.inner 4885 + .ready() 4886 + .await 4887 + .map_err(|e| { 4888 + tonic::Status::unknown( 4889 + format!("Service was not ready: {}", e.into()), 4890 + ) 4891 + })?; 4232 4892 let codec = tonic::codec::ProstCodec::default(); 4233 4893 let path = http::uri::PathAndQuery::from_static( 4234 4894 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", 4235 4895 ); 4236 4896 let mut req = request.into_request(); 4237 - req.extensions_mut().insert(GrpcMethod::new( 4238 - "rockbox.v1alpha1.PlaylistService", 4239 - "GetFirstIndex", 4240 - )); 4897 + req.extensions_mut() 4898 + .insert( 4899 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), 4900 + ); 4241 4901 self.inner.unary(req, path, codec).await 4242 4902 } 4243 4903 pub async fn get_display_index( 4244 4904 &mut self, 4245 4905 request: impl tonic::IntoRequest<super::GetDisplayIndexRequest>, 4246 - ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status> 4247 - { 4248 - self.inner.ready().await.map_err(|e| { 4249 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4250 - })?; 4906 + ) -> std::result::Result< 4907 + tonic::Response<super::GetDisplayIndexResponse>, 4908 + tonic::Status, 4909 + > { 4910 + self.inner 4911 + .ready() 4912 + .await 4913 + .map_err(|e| { 4914 + tonic::Status::unknown( 4915 + format!("Service was not ready: {}", e.into()), 4916 + ) 4917 + })?; 4251 4918 let codec = tonic::codec::ProstCodec::default(); 4252 4919 let path = http::uri::PathAndQuery::from_static( 4253 4920 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", 4254 4921 ); 4255 4922 let mut req = request.into_request(); 4256 - req.extensions_mut().insert(GrpcMethod::new( 4257 - "rockbox.v1alpha1.PlaylistService", 4258 - "GetDisplayIndex", 4259 - )); 4923 + req.extensions_mut() 4924 + .insert( 4925 + GrpcMethod::new( 4926 + "rockbox.v1alpha1.PlaylistService", 4927 + "GetDisplayIndex", 4928 + ), 4929 + ); 4260 4930 self.inner.unary(req, path, codec).await 4261 4931 } 4262 4932 pub async fn amount( 4263 4933 &mut self, 4264 4934 request: impl tonic::IntoRequest<super::AmountRequest>, 4265 4935 ) -> std::result::Result<tonic::Response<super::AmountResponse>, tonic::Status> { 4266 - self.inner.ready().await.map_err(|e| { 4267 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4268 - })?; 4936 + self.inner 4937 + .ready() 4938 + .await 4939 + .map_err(|e| { 4940 + tonic::Status::unknown( 4941 + format!("Service was not ready: {}", e.into()), 4942 + ) 4943 + })?; 4269 4944 let codec = tonic::codec::ProstCodec::default(); 4270 - let path = 4271 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); 4945 + let path = http::uri::PathAndQuery::from_static( 4946 + "/rockbox.v1alpha1.PlaylistService/Amount", 4947 + ); 4272 4948 let mut req = request.into_request(); 4273 - req.extensions_mut().insert(GrpcMethod::new( 4274 - "rockbox.v1alpha1.PlaylistService", 4275 - "Amount", 4276 - )); 4949 + req.extensions_mut() 4950 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); 4277 4951 self.inner.unary(req, path, codec).await 4278 4952 } 4279 4953 pub async fn playlist_resume( 4280 4954 &mut self, 4281 4955 request: impl tonic::IntoRequest<super::PlaylistResumeRequest>, 4282 - ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status> 4283 - { 4284 - self.inner.ready().await.map_err(|e| { 4285 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4286 - })?; 4956 + ) -> std::result::Result< 4957 + tonic::Response<super::PlaylistResumeResponse>, 4958 + tonic::Status, 4959 + > { 4960 + self.inner 4961 + .ready() 4962 + .await 4963 + .map_err(|e| { 4964 + tonic::Status::unknown( 4965 + format!("Service was not ready: {}", e.into()), 4966 + ) 4967 + })?; 4287 4968 let codec = tonic::codec::ProstCodec::default(); 4288 4969 let path = http::uri::PathAndQuery::from_static( 4289 4970 "/rockbox.v1alpha1.PlaylistService/PlaylistResume", 4290 4971 ); 4291 4972 let mut req = request.into_request(); 4292 - req.extensions_mut().insert(GrpcMethod::new( 4293 - "rockbox.v1alpha1.PlaylistService", 4294 - "PlaylistResume", 4295 - )); 4973 + req.extensions_mut() 4974 + .insert( 4975 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), 4976 + ); 4296 4977 self.inner.unary(req, path, codec).await 4297 4978 } 4298 4979 pub async fn resume_track( 4299 4980 &mut self, 4300 4981 request: impl tonic::IntoRequest<super::ResumeTrackRequest>, 4301 - ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status> 4302 - { 4303 - self.inner.ready().await.map_err(|e| { 4304 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4305 - })?; 4982 + ) -> std::result::Result< 4983 + tonic::Response<super::ResumeTrackResponse>, 4984 + tonic::Status, 4985 + > { 4986 + self.inner 4987 + .ready() 4988 + .await 4989 + .map_err(|e| { 4990 + tonic::Status::unknown( 4991 + format!("Service was not ready: {}", e.into()), 4992 + ) 4993 + })?; 4306 4994 let codec = tonic::codec::ProstCodec::default(); 4307 4995 let path = http::uri::PathAndQuery::from_static( 4308 4996 "/rockbox.v1alpha1.PlaylistService/ResumeTrack", 4309 4997 ); 4310 4998 let mut req = request.into_request(); 4311 - req.extensions_mut().insert(GrpcMethod::new( 4312 - "rockbox.v1alpha1.PlaylistService", 4313 - "ResumeTrack", 4314 - )); 4999 + req.extensions_mut() 5000 + .insert( 5001 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), 5002 + ); 4315 5003 self.inner.unary(req, path, codec).await 4316 5004 } 4317 5005 pub async fn set_modified( 4318 5006 &mut self, 4319 5007 request: impl tonic::IntoRequest<super::SetModifiedRequest>, 4320 - ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status> 4321 - { 4322 - self.inner.ready().await.map_err(|e| { 4323 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4324 - })?; 5008 + ) -> std::result::Result< 5009 + tonic::Response<super::SetModifiedResponse>, 5010 + tonic::Status, 5011 + > { 5012 + self.inner 5013 + .ready() 5014 + .await 5015 + .map_err(|e| { 5016 + tonic::Status::unknown( 5017 + format!("Service was not ready: {}", e.into()), 5018 + ) 5019 + })?; 4325 5020 let codec = tonic::codec::ProstCodec::default(); 4326 5021 let path = http::uri::PathAndQuery::from_static( 4327 5022 "/rockbox.v1alpha1.PlaylistService/SetModified", 4328 5023 ); 4329 5024 let mut req = request.into_request(); 4330 - req.extensions_mut().insert(GrpcMethod::new( 4331 - "rockbox.v1alpha1.PlaylistService", 4332 - "SetModified", 4333 - )); 5025 + req.extensions_mut() 5026 + .insert( 5027 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), 5028 + ); 4334 5029 self.inner.unary(req, path, codec).await 4335 5030 } 4336 5031 pub async fn start( 4337 5032 &mut self, 4338 5033 request: impl tonic::IntoRequest<super::StartRequest>, 4339 5034 ) -> std::result::Result<tonic::Response<super::StartResponse>, tonic::Status> { 4340 - self.inner.ready().await.map_err(|e| { 4341 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4342 - })?; 5035 + self.inner 5036 + .ready() 5037 + .await 5038 + .map_err(|e| { 5039 + tonic::Status::unknown( 5040 + format!("Service was not ready: {}", e.into()), 5041 + ) 5042 + })?; 4343 5043 let codec = tonic::codec::ProstCodec::default(); 4344 - let path = 4345 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); 5044 + let path = http::uri::PathAndQuery::from_static( 5045 + "/rockbox.v1alpha1.PlaylistService/Start", 5046 + ); 4346 5047 let mut req = request.into_request(); 4347 5048 req.extensions_mut() 4348 5049 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); ··· 4352 5053 &mut self, 4353 5054 request: impl tonic::IntoRequest<super::SyncRequest>, 4354 5055 ) -> std::result::Result<tonic::Response<super::SyncResponse>, tonic::Status> { 4355 - self.inner.ready().await.map_err(|e| { 4356 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4357 - })?; 5056 + self.inner 5057 + .ready() 5058 + .await 5059 + .map_err(|e| { 5060 + tonic::Status::unknown( 5061 + format!("Service was not ready: {}", e.into()), 5062 + ) 5063 + })?; 4358 5064 let codec = tonic::codec::ProstCodec::default(); 4359 - let path = 4360 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); 5065 + let path = http::uri::PathAndQuery::from_static( 5066 + "/rockbox.v1alpha1.PlaylistService/Sync", 5067 + ); 4361 5068 let mut req = request.into_request(); 4362 5069 req.extensions_mut() 4363 5070 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); ··· 4366 5073 pub async fn remove_all_tracks( 4367 5074 &mut self, 4368 5075 request: impl tonic::IntoRequest<super::RemoveAllTracksRequest>, 4369 - ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status> 4370 - { 4371 - self.inner.ready().await.map_err(|e| { 4372 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4373 - })?; 5076 + ) -> std::result::Result< 5077 + tonic::Response<super::RemoveAllTracksResponse>, 5078 + tonic::Status, 5079 + > { 5080 + self.inner 5081 + .ready() 5082 + .await 5083 + .map_err(|e| { 5084 + tonic::Status::unknown( 5085 + format!("Service was not ready: {}", e.into()), 5086 + ) 5087 + })?; 4374 5088 let codec = tonic::codec::ProstCodec::default(); 4375 5089 let path = http::uri::PathAndQuery::from_static( 4376 5090 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", 4377 5091 ); 4378 5092 let mut req = request.into_request(); 4379 - req.extensions_mut().insert(GrpcMethod::new( 4380 - "rockbox.v1alpha1.PlaylistService", 4381 - "RemoveAllTracks", 4382 - )); 5093 + req.extensions_mut() 5094 + .insert( 5095 + GrpcMethod::new( 5096 + "rockbox.v1alpha1.PlaylistService", 5097 + "RemoveAllTracks", 5098 + ), 5099 + ); 4383 5100 self.inner.unary(req, path, codec).await 4384 5101 } 4385 5102 pub async fn remove_tracks( 4386 5103 &mut self, 4387 5104 request: impl tonic::IntoRequest<super::RemoveTracksRequest>, 4388 - ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status> 4389 - { 4390 - self.inner.ready().await.map_err(|e| { 4391 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4392 - })?; 5105 + ) -> std::result::Result< 5106 + tonic::Response<super::RemoveTracksResponse>, 5107 + tonic::Status, 5108 + > { 5109 + self.inner 5110 + .ready() 5111 + .await 5112 + .map_err(|e| { 5113 + tonic::Status::unknown( 5114 + format!("Service was not ready: {}", e.into()), 5115 + ) 5116 + })?; 4393 5117 let codec = tonic::codec::ProstCodec::default(); 4394 5118 let path = http::uri::PathAndQuery::from_static( 4395 5119 "/rockbox.v1alpha1.PlaylistService/RemoveTracks", 4396 5120 ); 4397 5121 let mut req = request.into_request(); 4398 - req.extensions_mut().insert(GrpcMethod::new( 4399 - "rockbox.v1alpha1.PlaylistService", 4400 - "RemoveTracks", 4401 - )); 5122 + req.extensions_mut() 5123 + .insert( 5124 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), 5125 + ); 4402 5126 self.inner.unary(req, path, codec).await 4403 5127 } 4404 5128 pub async fn create_playlist( 4405 5129 &mut self, 4406 5130 request: impl tonic::IntoRequest<super::CreatePlaylistRequest>, 4407 - ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status> 4408 - { 4409 - self.inner.ready().await.map_err(|e| { 4410 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4411 - })?; 5131 + ) -> std::result::Result< 5132 + tonic::Response<super::CreatePlaylistResponse>, 5133 + tonic::Status, 5134 + > { 5135 + self.inner 5136 + .ready() 5137 + .await 5138 + .map_err(|e| { 5139 + tonic::Status::unknown( 5140 + format!("Service was not ready: {}", e.into()), 5141 + ) 5142 + })?; 4412 5143 let codec = tonic::codec::ProstCodec::default(); 4413 5144 let path = http::uri::PathAndQuery::from_static( 4414 5145 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", 4415 5146 ); 4416 5147 let mut req = request.into_request(); 4417 - req.extensions_mut().insert(GrpcMethod::new( 4418 - "rockbox.v1alpha1.PlaylistService", 4419 - "CreatePlaylist", 4420 - )); 5148 + req.extensions_mut() 5149 + .insert( 5150 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), 5151 + ); 4421 5152 self.inner.unary(req, path, codec).await 4422 5153 } 4423 5154 pub async fn insert_tracks( 4424 5155 &mut self, 4425 5156 request: impl tonic::IntoRequest<super::InsertTracksRequest>, 4426 - ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status> 4427 - { 4428 - self.inner.ready().await.map_err(|e| { 4429 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4430 - })?; 5157 + ) -> std::result::Result< 5158 + tonic::Response<super::InsertTracksResponse>, 5159 + tonic::Status, 5160 + > { 5161 + self.inner 5162 + .ready() 5163 + .await 5164 + .map_err(|e| { 5165 + tonic::Status::unknown( 5166 + format!("Service was not ready: {}", e.into()), 5167 + ) 5168 + })?; 4431 5169 let codec = tonic::codec::ProstCodec::default(); 4432 5170 let path = http::uri::PathAndQuery::from_static( 4433 5171 "/rockbox.v1alpha1.PlaylistService/InsertTracks", 4434 5172 ); 4435 5173 let mut req = request.into_request(); 4436 - req.extensions_mut().insert(GrpcMethod::new( 4437 - "rockbox.v1alpha1.PlaylistService", 4438 - "InsertTracks", 4439 - )); 5174 + req.extensions_mut() 5175 + .insert( 5176 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), 5177 + ); 4440 5178 self.inner.unary(req, path, codec).await 4441 5179 } 4442 5180 pub async fn insert_directory( 4443 5181 &mut self, 4444 5182 request: impl tonic::IntoRequest<super::InsertDirectoryRequest>, 4445 - ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status> 4446 - { 4447 - self.inner.ready().await.map_err(|e| { 4448 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4449 - })?; 5183 + ) -> std::result::Result< 5184 + tonic::Response<super::InsertDirectoryResponse>, 5185 + tonic::Status, 5186 + > { 5187 + self.inner 5188 + .ready() 5189 + .await 5190 + .map_err(|e| { 5191 + tonic::Status::unknown( 5192 + format!("Service was not ready: {}", e.into()), 5193 + ) 5194 + })?; 4450 5195 let codec = tonic::codec::ProstCodec::default(); 4451 5196 let path = http::uri::PathAndQuery::from_static( 4452 5197 "/rockbox.v1alpha1.PlaylistService/InsertDirectory", 4453 5198 ); 4454 5199 let mut req = request.into_request(); 4455 - req.extensions_mut().insert(GrpcMethod::new( 4456 - "rockbox.v1alpha1.PlaylistService", 4457 - "InsertDirectory", 4458 - )); 5200 + req.extensions_mut() 5201 + .insert( 5202 + GrpcMethod::new( 5203 + "rockbox.v1alpha1.PlaylistService", 5204 + "InsertDirectory", 5205 + ), 5206 + ); 4459 5207 self.inner.unary(req, path, codec).await 4460 5208 } 4461 5209 pub async fn insert_playlist( 4462 5210 &mut self, 4463 5211 request: impl tonic::IntoRequest<super::InsertPlaylistRequest>, 4464 - ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status> 4465 - { 4466 - self.inner.ready().await.map_err(|e| { 4467 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4468 - })?; 5212 + ) -> std::result::Result< 5213 + tonic::Response<super::InsertPlaylistResponse>, 5214 + tonic::Status, 5215 + > { 5216 + self.inner 5217 + .ready() 5218 + .await 5219 + .map_err(|e| { 5220 + tonic::Status::unknown( 5221 + format!("Service was not ready: {}", e.into()), 5222 + ) 5223 + })?; 4469 5224 let codec = tonic::codec::ProstCodec::default(); 4470 5225 let path = http::uri::PathAndQuery::from_static( 4471 5226 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", 4472 5227 ); 4473 5228 let mut req = request.into_request(); 4474 - req.extensions_mut().insert(GrpcMethod::new( 4475 - "rockbox.v1alpha1.PlaylistService", 4476 - "InsertPlaylist", 4477 - )); 5229 + req.extensions_mut() 5230 + .insert( 5231 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), 5232 + ); 4478 5233 self.inner.unary(req, path, codec).await 4479 5234 } 4480 5235 pub async fn insert_album( 4481 5236 &mut self, 4482 5237 request: impl tonic::IntoRequest<super::InsertAlbumRequest>, 4483 - ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status> 4484 - { 4485 - self.inner.ready().await.map_err(|e| { 4486 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4487 - })?; 5238 + ) -> std::result::Result< 5239 + tonic::Response<super::InsertAlbumResponse>, 5240 + tonic::Status, 5241 + > { 5242 + self.inner 5243 + .ready() 5244 + .await 5245 + .map_err(|e| { 5246 + tonic::Status::unknown( 5247 + format!("Service was not ready: {}", e.into()), 5248 + ) 5249 + })?; 4488 5250 let codec = tonic::codec::ProstCodec::default(); 4489 5251 let path = http::uri::PathAndQuery::from_static( 4490 5252 "/rockbox.v1alpha1.PlaylistService/InsertAlbum", 4491 5253 ); 4492 5254 let mut req = request.into_request(); 4493 - req.extensions_mut().insert(GrpcMethod::new( 4494 - "rockbox.v1alpha1.PlaylistService", 4495 - "InsertAlbum", 4496 - )); 5255 + req.extensions_mut() 5256 + .insert( 5257 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), 5258 + ); 4497 5259 self.inner.unary(req, path, codec).await 4498 5260 } 4499 5261 pub async fn insert_artist_tracks( 4500 5262 &mut self, 4501 5263 request: impl tonic::IntoRequest<super::InsertArtistTracksRequest>, 4502 - ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status> 4503 - { 4504 - self.inner.ready().await.map_err(|e| { 4505 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4506 - })?; 5264 + ) -> std::result::Result< 5265 + tonic::Response<super::InsertArtistTracksResponse>, 5266 + tonic::Status, 5267 + > { 5268 + self.inner 5269 + .ready() 5270 + .await 5271 + .map_err(|e| { 5272 + tonic::Status::unknown( 5273 + format!("Service was not ready: {}", e.into()), 5274 + ) 5275 + })?; 4507 5276 let codec = tonic::codec::ProstCodec::default(); 4508 5277 let path = http::uri::PathAndQuery::from_static( 4509 5278 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", 4510 5279 ); 4511 5280 let mut req = request.into_request(); 4512 - req.extensions_mut().insert(GrpcMethod::new( 4513 - "rockbox.v1alpha1.PlaylistService", 4514 - "InsertArtistTracks", 4515 - )); 5281 + req.extensions_mut() 5282 + .insert( 5283 + GrpcMethod::new( 5284 + "rockbox.v1alpha1.PlaylistService", 5285 + "InsertArtistTracks", 5286 + ), 5287 + ); 4516 5288 self.inner.unary(req, path, codec).await 4517 5289 } 4518 5290 pub async fn shuffle_playlist( 4519 5291 &mut self, 4520 5292 request: impl tonic::IntoRequest<super::ShufflePlaylistRequest>, 4521 - ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status> 4522 - { 4523 - self.inner.ready().await.map_err(|e| { 4524 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4525 - })?; 5293 + ) -> std::result::Result< 5294 + tonic::Response<super::ShufflePlaylistResponse>, 5295 + tonic::Status, 5296 + > { 5297 + self.inner 5298 + .ready() 5299 + .await 5300 + .map_err(|e| { 5301 + tonic::Status::unknown( 5302 + format!("Service was not ready: {}", e.into()), 5303 + ) 5304 + })?; 4526 5305 let codec = tonic::codec::ProstCodec::default(); 4527 5306 let path = http::uri::PathAndQuery::from_static( 4528 5307 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", 4529 5308 ); 4530 5309 let mut req = request.into_request(); 4531 - req.extensions_mut().insert(GrpcMethod::new( 4532 - "rockbox.v1alpha1.PlaylistService", 4533 - "ShufflePlaylist", 4534 - )); 5310 + req.extensions_mut() 5311 + .insert( 5312 + GrpcMethod::new( 5313 + "rockbox.v1alpha1.PlaylistService", 5314 + "ShufflePlaylist", 5315 + ), 5316 + ); 4535 5317 self.inner.unary(req, path, codec).await 4536 5318 } 4537 5319 } ··· 4543 5325 dead_code, 4544 5326 missing_docs, 4545 5327 clippy::wildcard_imports, 4546 - clippy::let_unit_value 5328 + clippy::let_unit_value, 4547 5329 )] 4548 5330 use tonic::codegen::*; 4549 5331 /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. ··· 4552 5334 async fn get_current( 4553 5335 &self, 4554 5336 request: tonic::Request<super::GetCurrentRequest>, 4555 - ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status>; 5337 + ) -> std::result::Result< 5338 + tonic::Response<super::GetCurrentResponse>, 5339 + tonic::Status, 5340 + >; 4556 5341 async fn get_resume_info( 4557 5342 &self, 4558 5343 request: tonic::Request<super::GetResumeInfoRequest>, 4559 - ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status>; 5344 + ) -> std::result::Result< 5345 + tonic::Response<super::GetResumeInfoResponse>, 5346 + tonic::Status, 5347 + >; 4560 5348 async fn get_track_info( 4561 5349 &self, 4562 5350 request: tonic::Request<super::GetTrackInfoRequest>, 4563 - ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status>; 5351 + ) -> std::result::Result< 5352 + tonic::Response<super::GetTrackInfoResponse>, 5353 + tonic::Status, 5354 + >; 4564 5355 async fn get_first_index( 4565 5356 &self, 4566 5357 request: tonic::Request<super::GetFirstIndexRequest>, 4567 - ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status>; 5358 + ) -> std::result::Result< 5359 + tonic::Response<super::GetFirstIndexResponse>, 5360 + tonic::Status, 5361 + >; 4568 5362 async fn get_display_index( 4569 5363 &self, 4570 5364 request: tonic::Request<super::GetDisplayIndexRequest>, 4571 - ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status>; 5365 + ) -> std::result::Result< 5366 + tonic::Response<super::GetDisplayIndexResponse>, 5367 + tonic::Status, 5368 + >; 4572 5369 async fn amount( 4573 5370 &self, 4574 5371 request: tonic::Request<super::AmountRequest>, ··· 4576 5373 async fn playlist_resume( 4577 5374 &self, 4578 5375 request: tonic::Request<super::PlaylistResumeRequest>, 4579 - ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status>; 5376 + ) -> std::result::Result< 5377 + tonic::Response<super::PlaylistResumeResponse>, 5378 + tonic::Status, 5379 + >; 4580 5380 async fn resume_track( 4581 5381 &self, 4582 5382 request: tonic::Request<super::ResumeTrackRequest>, 4583 - ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status>; 5383 + ) -> std::result::Result< 5384 + tonic::Response<super::ResumeTrackResponse>, 5385 + tonic::Status, 5386 + >; 4584 5387 async fn set_modified( 4585 5388 &self, 4586 5389 request: tonic::Request<super::SetModifiedRequest>, 4587 - ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status>; 5390 + ) -> std::result::Result< 5391 + tonic::Response<super::SetModifiedResponse>, 5392 + tonic::Status, 5393 + >; 4588 5394 async fn start( 4589 5395 &self, 4590 5396 request: tonic::Request<super::StartRequest>, ··· 4596 5402 async fn remove_all_tracks( 4597 5403 &self, 4598 5404 request: tonic::Request<super::RemoveAllTracksRequest>, 4599 - ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status>; 5405 + ) -> std::result::Result< 5406 + tonic::Response<super::RemoveAllTracksResponse>, 5407 + tonic::Status, 5408 + >; 4600 5409 async fn remove_tracks( 4601 5410 &self, 4602 5411 request: tonic::Request<super::RemoveTracksRequest>, 4603 - ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status>; 5412 + ) -> std::result::Result< 5413 + tonic::Response<super::RemoveTracksResponse>, 5414 + tonic::Status, 5415 + >; 4604 5416 async fn create_playlist( 4605 5417 &self, 4606 5418 request: tonic::Request<super::CreatePlaylistRequest>, 4607 - ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status>; 5419 + ) -> std::result::Result< 5420 + tonic::Response<super::CreatePlaylistResponse>, 5421 + tonic::Status, 5422 + >; 4608 5423 async fn insert_tracks( 4609 5424 &self, 4610 5425 request: tonic::Request<super::InsertTracksRequest>, 4611 - ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status>; 5426 + ) -> std::result::Result< 5427 + tonic::Response<super::InsertTracksResponse>, 5428 + tonic::Status, 5429 + >; 4612 5430 async fn insert_directory( 4613 5431 &self, 4614 5432 request: tonic::Request<super::InsertDirectoryRequest>, 4615 - ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status>; 5433 + ) -> std::result::Result< 5434 + tonic::Response<super::InsertDirectoryResponse>, 5435 + tonic::Status, 5436 + >; 4616 5437 async fn insert_playlist( 4617 5438 &self, 4618 5439 request: tonic::Request<super::InsertPlaylistRequest>, 4619 - ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status>; 5440 + ) -> std::result::Result< 5441 + tonic::Response<super::InsertPlaylistResponse>, 5442 + tonic::Status, 5443 + >; 4620 5444 async fn insert_album( 4621 5445 &self, 4622 5446 request: tonic::Request<super::InsertAlbumRequest>, 4623 - ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status>; 5447 + ) -> std::result::Result< 5448 + tonic::Response<super::InsertAlbumResponse>, 5449 + tonic::Status, 5450 + >; 4624 5451 async fn insert_artist_tracks( 4625 5452 &self, 4626 5453 request: tonic::Request<super::InsertArtistTracksRequest>, 4627 - ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status>; 5454 + ) -> std::result::Result< 5455 + tonic::Response<super::InsertArtistTracksResponse>, 5456 + tonic::Status, 5457 + >; 4628 5458 async fn shuffle_playlist( 4629 5459 &self, 4630 5460 request: tonic::Request<super::ShufflePlaylistRequest>, 4631 - ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status>; 5461 + ) -> std::result::Result< 5462 + tonic::Response<super::ShufflePlaylistResponse>, 5463 + tonic::Status, 5464 + >; 4632 5465 } 4633 5466 #[derive(Debug)] 4634 5467 pub struct PlaylistServiceServer<T> { ··· 4651 5484 max_encoding_message_size: None, 4652 5485 } 4653 5486 } 4654 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 5487 + pub fn with_interceptor<F>( 5488 + inner: T, 5489 + interceptor: F, 5490 + ) -> InterceptedService<Self, F> 4655 5491 where 4656 5492 F: tonic::service::Interceptor, 4657 5493 { ··· 4706 5542 "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { 4707 5543 #[allow(non_camel_case_types)] 4708 5544 struct GetCurrentSvc<T: PlaylistService>(pub Arc<T>); 4709 - impl<T: PlaylistService> tonic::server::UnaryService<super::GetCurrentRequest> 4710 - for GetCurrentSvc<T> 4711 - { 5545 + impl< 5546 + T: PlaylistService, 5547 + > tonic::server::UnaryService<super::GetCurrentRequest> 5548 + for GetCurrentSvc<T> { 4712 5549 type Response = super::GetCurrentResponse; 4713 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5550 + type Future = BoxFuture< 5551 + tonic::Response<Self::Response>, 5552 + tonic::Status, 5553 + >; 4714 5554 fn call( 4715 5555 &mut self, 4716 5556 request: tonic::Request<super::GetCurrentRequest>, ··· 4747 5587 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { 4748 5588 #[allow(non_camel_case_types)] 4749 5589 struct GetResumeInfoSvc<T: PlaylistService>(pub Arc<T>); 4750 - impl<T: PlaylistService> 4751 - tonic::server::UnaryService<super::GetResumeInfoRequest> 4752 - for GetResumeInfoSvc<T> 4753 - { 5590 + impl< 5591 + T: PlaylistService, 5592 + > tonic::server::UnaryService<super::GetResumeInfoRequest> 5593 + for GetResumeInfoSvc<T> { 4754 5594 type Response = super::GetResumeInfoResponse; 4755 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5595 + type Future = BoxFuture< 5596 + tonic::Response<Self::Response>, 5597 + tonic::Status, 5598 + >; 4756 5599 fn call( 4757 5600 &mut self, 4758 5601 request: tonic::Request<super::GetResumeInfoRequest>, 4759 5602 ) -> Self::Future { 4760 5603 let inner = Arc::clone(&self.0); 4761 5604 let fut = async move { 4762 - <T as PlaylistService>::get_resume_info(&inner, request).await 5605 + <T as PlaylistService>::get_resume_info(&inner, request) 5606 + .await 4763 5607 }; 4764 5608 Box::pin(fut) 4765 5609 } ··· 4789 5633 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { 4790 5634 #[allow(non_camel_case_types)] 4791 5635 struct GetTrackInfoSvc<T: PlaylistService>(pub Arc<T>); 4792 - impl<T: PlaylistService> tonic::server::UnaryService<super::GetTrackInfoRequest> 4793 - for GetTrackInfoSvc<T> 4794 - { 5636 + impl< 5637 + T: PlaylistService, 5638 + > tonic::server::UnaryService<super::GetTrackInfoRequest> 5639 + for GetTrackInfoSvc<T> { 4795 5640 type Response = super::GetTrackInfoResponse; 4796 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5641 + type Future = BoxFuture< 5642 + tonic::Response<Self::Response>, 5643 + tonic::Status, 5644 + >; 4797 5645 fn call( 4798 5646 &mut self, 4799 5647 request: tonic::Request<super::GetTrackInfoRequest>, 4800 5648 ) -> Self::Future { 4801 5649 let inner = Arc::clone(&self.0); 4802 5650 let fut = async move { 4803 - <T as PlaylistService>::get_track_info(&inner, request).await 5651 + <T as PlaylistService>::get_track_info(&inner, request) 5652 + .await 4804 5653 }; 4805 5654 Box::pin(fut) 4806 5655 } ··· 4830 5679 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { 4831 5680 #[allow(non_camel_case_types)] 4832 5681 struct GetFirstIndexSvc<T: PlaylistService>(pub Arc<T>); 4833 - impl<T: PlaylistService> 4834 - tonic::server::UnaryService<super::GetFirstIndexRequest> 4835 - for GetFirstIndexSvc<T> 4836 - { 5682 + impl< 5683 + T: PlaylistService, 5684 + > tonic::server::UnaryService<super::GetFirstIndexRequest> 5685 + for GetFirstIndexSvc<T> { 4837 5686 type Response = super::GetFirstIndexResponse; 4838 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5687 + type Future = BoxFuture< 5688 + tonic::Response<Self::Response>, 5689 + tonic::Status, 5690 + >; 4839 5691 fn call( 4840 5692 &mut self, 4841 5693 request: tonic::Request<super::GetFirstIndexRequest>, 4842 5694 ) -> Self::Future { 4843 5695 let inner = Arc::clone(&self.0); 4844 5696 let fut = async move { 4845 - <T as PlaylistService>::get_first_index(&inner, request).await 5697 + <T as PlaylistService>::get_first_index(&inner, request) 5698 + .await 4846 5699 }; 4847 5700 Box::pin(fut) 4848 5701 } ··· 4872 5725 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { 4873 5726 #[allow(non_camel_case_types)] 4874 5727 struct GetDisplayIndexSvc<T: PlaylistService>(pub Arc<T>); 4875 - impl<T: PlaylistService> 4876 - tonic::server::UnaryService<super::GetDisplayIndexRequest> 4877 - for GetDisplayIndexSvc<T> 4878 - { 5728 + impl< 5729 + T: PlaylistService, 5730 + > tonic::server::UnaryService<super::GetDisplayIndexRequest> 5731 + for GetDisplayIndexSvc<T> { 4879 5732 type Response = super::GetDisplayIndexResponse; 4880 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5733 + type Future = BoxFuture< 5734 + tonic::Response<Self::Response>, 5735 + tonic::Status, 5736 + >; 4881 5737 fn call( 4882 5738 &mut self, 4883 5739 request: tonic::Request<super::GetDisplayIndexRequest>, 4884 5740 ) -> Self::Future { 4885 5741 let inner = Arc::clone(&self.0); 4886 5742 let fut = async move { 4887 - <T as PlaylistService>::get_display_index(&inner, request).await 5743 + <T as PlaylistService>::get_display_index(&inner, request) 5744 + .await 4888 5745 }; 4889 5746 Box::pin(fut) 4890 5747 } ··· 4914 5771 "/rockbox.v1alpha1.PlaylistService/Amount" => { 4915 5772 #[allow(non_camel_case_types)] 4916 5773 struct AmountSvc<T: PlaylistService>(pub Arc<T>); 4917 - impl<T: PlaylistService> tonic::server::UnaryService<super::AmountRequest> for AmountSvc<T> { 5774 + impl< 5775 + T: PlaylistService, 5776 + > tonic::server::UnaryService<super::AmountRequest> 5777 + for AmountSvc<T> { 4918 5778 type Response = super::AmountResponse; 4919 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5779 + type Future = BoxFuture< 5780 + tonic::Response<Self::Response>, 5781 + tonic::Status, 5782 + >; 4920 5783 fn call( 4921 5784 &mut self, 4922 5785 request: tonic::Request<super::AmountRequest>, ··· 4953 5816 "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { 4954 5817 #[allow(non_camel_case_types)] 4955 5818 struct PlaylistResumeSvc<T: PlaylistService>(pub Arc<T>); 4956 - impl<T: PlaylistService> 4957 - tonic::server::UnaryService<super::PlaylistResumeRequest> 4958 - for PlaylistResumeSvc<T> 4959 - { 5819 + impl< 5820 + T: PlaylistService, 5821 + > tonic::server::UnaryService<super::PlaylistResumeRequest> 5822 + for PlaylistResumeSvc<T> { 4960 5823 type Response = super::PlaylistResumeResponse; 4961 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5824 + type Future = BoxFuture< 5825 + tonic::Response<Self::Response>, 5826 + tonic::Status, 5827 + >; 4962 5828 fn call( 4963 5829 &mut self, 4964 5830 request: tonic::Request<super::PlaylistResumeRequest>, 4965 5831 ) -> Self::Future { 4966 5832 let inner = Arc::clone(&self.0); 4967 5833 let fut = async move { 4968 - <T as PlaylistService>::playlist_resume(&inner, request).await 5834 + <T as PlaylistService>::playlist_resume(&inner, request) 5835 + .await 4969 5836 }; 4970 5837 Box::pin(fut) 4971 5838 } ··· 4995 5862 "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { 4996 5863 #[allow(non_camel_case_types)] 4997 5864 struct ResumeTrackSvc<T: PlaylistService>(pub Arc<T>); 4998 - impl<T: PlaylistService> tonic::server::UnaryService<super::ResumeTrackRequest> 4999 - for ResumeTrackSvc<T> 5000 - { 5865 + impl< 5866 + T: PlaylistService, 5867 + > tonic::server::UnaryService<super::ResumeTrackRequest> 5868 + for ResumeTrackSvc<T> { 5001 5869 type Response = super::ResumeTrackResponse; 5002 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5870 + type Future = BoxFuture< 5871 + tonic::Response<Self::Response>, 5872 + tonic::Status, 5873 + >; 5003 5874 fn call( 5004 5875 &mut self, 5005 5876 request: tonic::Request<super::ResumeTrackRequest>, ··· 5036 5907 "/rockbox.v1alpha1.PlaylistService/SetModified" => { 5037 5908 #[allow(non_camel_case_types)] 5038 5909 struct SetModifiedSvc<T: PlaylistService>(pub Arc<T>); 5039 - impl<T: PlaylistService> tonic::server::UnaryService<super::SetModifiedRequest> 5040 - for SetModifiedSvc<T> 5041 - { 5910 + impl< 5911 + T: PlaylistService, 5912 + > tonic::server::UnaryService<super::SetModifiedRequest> 5913 + for SetModifiedSvc<T> { 5042 5914 type Response = super::SetModifiedResponse; 5043 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5915 + type Future = BoxFuture< 5916 + tonic::Response<Self::Response>, 5917 + tonic::Status, 5918 + >; 5044 5919 fn call( 5045 5920 &mut self, 5046 5921 request: tonic::Request<super::SetModifiedRequest>, ··· 5077 5952 "/rockbox.v1alpha1.PlaylistService/Start" => { 5078 5953 #[allow(non_camel_case_types)] 5079 5954 struct StartSvc<T: PlaylistService>(pub Arc<T>); 5080 - impl<T: PlaylistService> tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 5955 + impl< 5956 + T: PlaylistService, 5957 + > tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 5081 5958 type Response = super::StartResponse; 5082 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5959 + type Future = BoxFuture< 5960 + tonic::Response<Self::Response>, 5961 + tonic::Status, 5962 + >; 5083 5963 fn call( 5084 5964 &mut self, 5085 5965 request: tonic::Request<super::StartRequest>, 5086 5966 ) -> Self::Future { 5087 5967 let inner = Arc::clone(&self.0); 5088 - let fut = 5089 - async move { <T as PlaylistService>::start(&inner, request).await }; 5968 + let fut = async move { 5969 + <T as PlaylistService>::start(&inner, request).await 5970 + }; 5090 5971 Box::pin(fut) 5091 5972 } 5092 5973 } ··· 5115 5996 "/rockbox.v1alpha1.PlaylistService/Sync" => { 5116 5997 #[allow(non_camel_case_types)] 5117 5998 struct SyncSvc<T: PlaylistService>(pub Arc<T>); 5118 - impl<T: PlaylistService> tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 5999 + impl< 6000 + T: PlaylistService, 6001 + > tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 5119 6002 type Response = super::SyncResponse; 5120 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6003 + type Future = BoxFuture< 6004 + tonic::Response<Self::Response>, 6005 + tonic::Status, 6006 + >; 5121 6007 fn call( 5122 6008 &mut self, 5123 6009 request: tonic::Request<super::SyncRequest>, 5124 6010 ) -> Self::Future { 5125 6011 let inner = Arc::clone(&self.0); 5126 - let fut = 5127 - async move { <T as PlaylistService>::sync(&inner, request).await }; 6012 + let fut = async move { 6013 + <T as PlaylistService>::sync(&inner, request).await 6014 + }; 5128 6015 Box::pin(fut) 5129 6016 } 5130 6017 } ··· 5153 6040 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { 5154 6041 #[allow(non_camel_case_types)] 5155 6042 struct RemoveAllTracksSvc<T: PlaylistService>(pub Arc<T>); 5156 - impl<T: PlaylistService> 5157 - tonic::server::UnaryService<super::RemoveAllTracksRequest> 5158 - for RemoveAllTracksSvc<T> 5159 - { 6043 + impl< 6044 + T: PlaylistService, 6045 + > tonic::server::UnaryService<super::RemoveAllTracksRequest> 6046 + for RemoveAllTracksSvc<T> { 5160 6047 type Response = super::RemoveAllTracksResponse; 5161 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6048 + type Future = BoxFuture< 6049 + tonic::Response<Self::Response>, 6050 + tonic::Status, 6051 + >; 5162 6052 fn call( 5163 6053 &mut self, 5164 6054 request: tonic::Request<super::RemoveAllTracksRequest>, 5165 6055 ) -> Self::Future { 5166 6056 let inner = Arc::clone(&self.0); 5167 6057 let fut = async move { 5168 - <T as PlaylistService>::remove_all_tracks(&inner, request).await 6058 + <T as PlaylistService>::remove_all_tracks(&inner, request) 6059 + .await 5169 6060 }; 5170 6061 Box::pin(fut) 5171 6062 } ··· 5195 6086 "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { 5196 6087 #[allow(non_camel_case_types)] 5197 6088 struct RemoveTracksSvc<T: PlaylistService>(pub Arc<T>); 5198 - impl<T: PlaylistService> tonic::server::UnaryService<super::RemoveTracksRequest> 5199 - for RemoveTracksSvc<T> 5200 - { 6089 + impl< 6090 + T: PlaylistService, 6091 + > tonic::server::UnaryService<super::RemoveTracksRequest> 6092 + for RemoveTracksSvc<T> { 5201 6093 type Response = super::RemoveTracksResponse; 5202 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6094 + type Future = BoxFuture< 6095 + tonic::Response<Self::Response>, 6096 + tonic::Status, 6097 + >; 5203 6098 fn call( 5204 6099 &mut self, 5205 6100 request: tonic::Request<super::RemoveTracksRequest>, ··· 5236 6131 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { 5237 6132 #[allow(non_camel_case_types)] 5238 6133 struct CreatePlaylistSvc<T: PlaylistService>(pub Arc<T>); 5239 - impl<T: PlaylistService> 5240 - tonic::server::UnaryService<super::CreatePlaylistRequest> 5241 - for CreatePlaylistSvc<T> 5242 - { 6134 + impl< 6135 + T: PlaylistService, 6136 + > tonic::server::UnaryService<super::CreatePlaylistRequest> 6137 + for CreatePlaylistSvc<T> { 5243 6138 type Response = super::CreatePlaylistResponse; 5244 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6139 + type Future = BoxFuture< 6140 + tonic::Response<Self::Response>, 6141 + tonic::Status, 6142 + >; 5245 6143 fn call( 5246 6144 &mut self, 5247 6145 request: tonic::Request<super::CreatePlaylistRequest>, 5248 6146 ) -> Self::Future { 5249 6147 let inner = Arc::clone(&self.0); 5250 6148 let fut = async move { 5251 - <T as PlaylistService>::create_playlist(&inner, request).await 6149 + <T as PlaylistService>::create_playlist(&inner, request) 6150 + .await 5252 6151 }; 5253 6152 Box::pin(fut) 5254 6153 } ··· 5278 6177 "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { 5279 6178 #[allow(non_camel_case_types)] 5280 6179 struct InsertTracksSvc<T: PlaylistService>(pub Arc<T>); 5281 - impl<T: PlaylistService> tonic::server::UnaryService<super::InsertTracksRequest> 5282 - for InsertTracksSvc<T> 5283 - { 6180 + impl< 6181 + T: PlaylistService, 6182 + > tonic::server::UnaryService<super::InsertTracksRequest> 6183 + for InsertTracksSvc<T> { 5284 6184 type Response = super::InsertTracksResponse; 5285 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6185 + type Future = BoxFuture< 6186 + tonic::Response<Self::Response>, 6187 + tonic::Status, 6188 + >; 5286 6189 fn call( 5287 6190 &mut self, 5288 6191 request: tonic::Request<super::InsertTracksRequest>, ··· 5319 6222 "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { 5320 6223 #[allow(non_camel_case_types)] 5321 6224 struct InsertDirectorySvc<T: PlaylistService>(pub Arc<T>); 5322 - impl<T: PlaylistService> 5323 - tonic::server::UnaryService<super::InsertDirectoryRequest> 5324 - for InsertDirectorySvc<T> 5325 - { 6225 + impl< 6226 + T: PlaylistService, 6227 + > tonic::server::UnaryService<super::InsertDirectoryRequest> 6228 + for InsertDirectorySvc<T> { 5326 6229 type Response = super::InsertDirectoryResponse; 5327 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6230 + type Future = BoxFuture< 6231 + tonic::Response<Self::Response>, 6232 + tonic::Status, 6233 + >; 5328 6234 fn call( 5329 6235 &mut self, 5330 6236 request: tonic::Request<super::InsertDirectoryRequest>, 5331 6237 ) -> Self::Future { 5332 6238 let inner = Arc::clone(&self.0); 5333 6239 let fut = async move { 5334 - <T as PlaylistService>::insert_directory(&inner, request).await 6240 + <T as PlaylistService>::insert_directory(&inner, request) 6241 + .await 5335 6242 }; 5336 6243 Box::pin(fut) 5337 6244 } ··· 5361 6268 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { 5362 6269 #[allow(non_camel_case_types)] 5363 6270 struct InsertPlaylistSvc<T: PlaylistService>(pub Arc<T>); 5364 - impl<T: PlaylistService> 5365 - tonic::server::UnaryService<super::InsertPlaylistRequest> 5366 - for InsertPlaylistSvc<T> 5367 - { 6271 + impl< 6272 + T: PlaylistService, 6273 + > tonic::server::UnaryService<super::InsertPlaylistRequest> 6274 + for InsertPlaylistSvc<T> { 5368 6275 type Response = super::InsertPlaylistResponse; 5369 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6276 + type Future = BoxFuture< 6277 + tonic::Response<Self::Response>, 6278 + tonic::Status, 6279 + >; 5370 6280 fn call( 5371 6281 &mut self, 5372 6282 request: tonic::Request<super::InsertPlaylistRequest>, 5373 6283 ) -> Self::Future { 5374 6284 let inner = Arc::clone(&self.0); 5375 6285 let fut = async move { 5376 - <T as PlaylistService>::insert_playlist(&inner, request).await 6286 + <T as PlaylistService>::insert_playlist(&inner, request) 6287 + .await 5377 6288 }; 5378 6289 Box::pin(fut) 5379 6290 } ··· 5403 6314 "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { 5404 6315 #[allow(non_camel_case_types)] 5405 6316 struct InsertAlbumSvc<T: PlaylistService>(pub Arc<T>); 5406 - impl<T: PlaylistService> tonic::server::UnaryService<super::InsertAlbumRequest> 5407 - for InsertAlbumSvc<T> 5408 - { 6317 + impl< 6318 + T: PlaylistService, 6319 + > tonic::server::UnaryService<super::InsertAlbumRequest> 6320 + for InsertAlbumSvc<T> { 5409 6321 type Response = super::InsertAlbumResponse; 5410 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6322 + type Future = BoxFuture< 6323 + tonic::Response<Self::Response>, 6324 + tonic::Status, 6325 + >; 5411 6326 fn call( 5412 6327 &mut self, 5413 6328 request: tonic::Request<super::InsertAlbumRequest>, ··· 5444 6359 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { 5445 6360 #[allow(non_camel_case_types)] 5446 6361 struct InsertArtistTracksSvc<T: PlaylistService>(pub Arc<T>); 5447 - impl<T: PlaylistService> 5448 - tonic::server::UnaryService<super::InsertArtistTracksRequest> 5449 - for InsertArtistTracksSvc<T> 5450 - { 6362 + impl< 6363 + T: PlaylistService, 6364 + > tonic::server::UnaryService<super::InsertArtistTracksRequest> 6365 + for InsertArtistTracksSvc<T> { 5451 6366 type Response = super::InsertArtistTracksResponse; 5452 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6367 + type Future = BoxFuture< 6368 + tonic::Response<Self::Response>, 6369 + tonic::Status, 6370 + >; 5453 6371 fn call( 5454 6372 &mut self, 5455 6373 request: tonic::Request<super::InsertArtistTracksRequest>, 5456 6374 ) -> Self::Future { 5457 6375 let inner = Arc::clone(&self.0); 5458 6376 let fut = async move { 5459 - <T as PlaylistService>::insert_artist_tracks(&inner, request).await 6377 + <T as PlaylistService>::insert_artist_tracks( 6378 + &inner, 6379 + request, 6380 + ) 6381 + .await 5460 6382 }; 5461 6383 Box::pin(fut) 5462 6384 } ··· 5486 6408 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { 5487 6409 #[allow(non_camel_case_types)] 5488 6410 struct ShufflePlaylistSvc<T: PlaylistService>(pub Arc<T>); 5489 - impl<T: PlaylistService> 5490 - tonic::server::UnaryService<super::ShufflePlaylistRequest> 5491 - for ShufflePlaylistSvc<T> 5492 - { 6411 + impl< 6412 + T: PlaylistService, 6413 + > tonic::server::UnaryService<super::ShufflePlaylistRequest> 6414 + for ShufflePlaylistSvc<T> { 5493 6415 type Response = super::ShufflePlaylistResponse; 5494 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6416 + type Future = BoxFuture< 6417 + tonic::Response<Self::Response>, 6418 + tonic::Status, 6419 + >; 5495 6420 fn call( 5496 6421 &mut self, 5497 6422 request: tonic::Request<super::ShufflePlaylistRequest>, 5498 6423 ) -> Self::Future { 5499 6424 let inner = Arc::clone(&self.0); 5500 6425 let fut = async move { 5501 - <T as PlaylistService>::shuffle_playlist(&inner, request).await 6426 + <T as PlaylistService>::shuffle_playlist(&inner, request) 6427 + .await 5502 6428 }; 5503 6429 Box::pin(fut) 5504 6430 } ··· 5525 6451 }; 5526 6452 Box::pin(fut) 5527 6453 } 5528 - _ => Box::pin(async move { 5529 - let mut response = http::Response::new(empty_body()); 5530 - let headers = response.headers_mut(); 5531 - headers.insert( 5532 - tonic::Status::GRPC_STATUS, 5533 - (tonic::Code::Unimplemented as i32).into(), 5534 - ); 5535 - headers.insert( 5536 - http::header::CONTENT_TYPE, 5537 - tonic::metadata::GRPC_CONTENT_TYPE, 5538 - ); 5539 - Ok(response) 5540 - }), 6454 + _ => { 6455 + Box::pin(async move { 6456 + let mut response = http::Response::new(empty_body()); 6457 + let headers = response.headers_mut(); 6458 + headers 6459 + .insert( 6460 + tonic::Status::GRPC_STATUS, 6461 + (tonic::Code::Unimplemented as i32).into(), 6462 + ); 6463 + headers 6464 + .insert( 6465 + http::header::CONTENT_TYPE, 6466 + tonic::metadata::GRPC_CONTENT_TYPE, 6467 + ); 6468 + Ok(response) 6469 + }) 6470 + } 5541 6471 } 5542 6472 } 5543 6473 } ··· 6047 6977 dead_code, 6048 6978 missing_docs, 6049 6979 clippy::wildcard_imports, 6050 - clippy::let_unit_value 6980 + clippy::let_unit_value, 6051 6981 )] 6052 - use tonic::codegen::http::Uri; 6053 6982 use tonic::codegen::*; 6983 + use tonic::codegen::http::Uri; 6054 6984 #[derive(Debug, Clone)] 6055 6985 pub struct SettingsServiceClient<T> { 6056 6986 inner: tonic::client::Grpc<T>, ··· 6094 7024 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 6095 7025 >, 6096 7026 >, 6097 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6098 - Into<StdError> + std::marker::Send + std::marker::Sync, 7027 + <T as tonic::codegen::Service< 7028 + http::Request<tonic::body::BoxBody>, 7029 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6099 7030 { 6100 7031 SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) 6101 7032 } ··· 6133 7064 pub async fn get_settings_list( 6134 7065 &mut self, 6135 7066 request: impl tonic::IntoRequest<super::GetSettingsListRequest>, 6136 - ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status> 6137 - { 6138 - self.inner.ready().await.map_err(|e| { 6139 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6140 - })?; 7067 + ) -> std::result::Result< 7068 + tonic::Response<super::GetSettingsListResponse>, 7069 + tonic::Status, 7070 + > { 7071 + self.inner 7072 + .ready() 7073 + .await 7074 + .map_err(|e| { 7075 + tonic::Status::unknown( 7076 + format!("Service was not ready: {}", e.into()), 7077 + ) 7078 + })?; 6141 7079 let codec = tonic::codec::ProstCodec::default(); 6142 7080 let path = http::uri::PathAndQuery::from_static( 6143 7081 "/rockbox.v1alpha1.SettingsService/GetSettingsList", 6144 7082 ); 6145 7083 let mut req = request.into_request(); 6146 - req.extensions_mut().insert(GrpcMethod::new( 6147 - "rockbox.v1alpha1.SettingsService", 6148 - "GetSettingsList", 6149 - )); 7084 + req.extensions_mut() 7085 + .insert( 7086 + GrpcMethod::new( 7087 + "rockbox.v1alpha1.SettingsService", 7088 + "GetSettingsList", 7089 + ), 7090 + ); 6150 7091 self.inner.unary(req, path, codec).await 6151 7092 } 6152 7093 pub async fn get_global_settings( 6153 7094 &mut self, 6154 7095 request: impl tonic::IntoRequest<super::GetGlobalSettingsRequest>, 6155 - ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status> 6156 - { 6157 - self.inner.ready().await.map_err(|e| { 6158 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6159 - })?; 7096 + ) -> std::result::Result< 7097 + tonic::Response<super::GetGlobalSettingsResponse>, 7098 + tonic::Status, 7099 + > { 7100 + self.inner 7101 + .ready() 7102 + .await 7103 + .map_err(|e| { 7104 + tonic::Status::unknown( 7105 + format!("Service was not ready: {}", e.into()), 7106 + ) 7107 + })?; 6160 7108 let codec = tonic::codec::ProstCodec::default(); 6161 7109 let path = http::uri::PathAndQuery::from_static( 6162 7110 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", 6163 7111 ); 6164 7112 let mut req = request.into_request(); 6165 - req.extensions_mut().insert(GrpcMethod::new( 6166 - "rockbox.v1alpha1.SettingsService", 6167 - "GetGlobalSettings", 6168 - )); 7113 + req.extensions_mut() 7114 + .insert( 7115 + GrpcMethod::new( 7116 + "rockbox.v1alpha1.SettingsService", 7117 + "GetGlobalSettings", 7118 + ), 7119 + ); 6169 7120 self.inner.unary(req, path, codec).await 6170 7121 } 6171 7122 pub async fn save_settings( 6172 7123 &mut self, 6173 7124 request: impl tonic::IntoRequest<super::SaveSettingsRequest>, 6174 - ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status> 6175 - { 6176 - self.inner.ready().await.map_err(|e| { 6177 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6178 - })?; 7125 + ) -> std::result::Result< 7126 + tonic::Response<super::SaveSettingsResponse>, 7127 + tonic::Status, 7128 + > { 7129 + self.inner 7130 + .ready() 7131 + .await 7132 + .map_err(|e| { 7133 + tonic::Status::unknown( 7134 + format!("Service was not ready: {}", e.into()), 7135 + ) 7136 + })?; 6179 7137 let codec = tonic::codec::ProstCodec::default(); 6180 7138 let path = http::uri::PathAndQuery::from_static( 6181 7139 "/rockbox.v1alpha1.SettingsService/SaveSettings", 6182 7140 ); 6183 7141 let mut req = request.into_request(); 6184 - req.extensions_mut().insert(GrpcMethod::new( 6185 - "rockbox.v1alpha1.SettingsService", 6186 - "SaveSettings", 6187 - )); 7142 + req.extensions_mut() 7143 + .insert( 7144 + GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), 7145 + ); 6188 7146 self.inner.unary(req, path, codec).await 6189 7147 } 6190 7148 } ··· 6196 7154 dead_code, 6197 7155 missing_docs, 6198 7156 clippy::wildcard_imports, 6199 - clippy::let_unit_value 7157 + clippy::let_unit_value, 6200 7158 )] 6201 7159 use tonic::codegen::*; 6202 7160 /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. ··· 6205 7163 async fn get_settings_list( 6206 7164 &self, 6207 7165 request: tonic::Request<super::GetSettingsListRequest>, 6208 - ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status>; 7166 + ) -> std::result::Result< 7167 + tonic::Response<super::GetSettingsListResponse>, 7168 + tonic::Status, 7169 + >; 6209 7170 async fn get_global_settings( 6210 7171 &self, 6211 7172 request: tonic::Request<super::GetGlobalSettingsRequest>, 6212 - ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status>; 7173 + ) -> std::result::Result< 7174 + tonic::Response<super::GetGlobalSettingsResponse>, 7175 + tonic::Status, 7176 + >; 6213 7177 async fn save_settings( 6214 7178 &self, 6215 7179 request: tonic::Request<super::SaveSettingsRequest>, 6216 - ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status>; 7180 + ) -> std::result::Result< 7181 + tonic::Response<super::SaveSettingsResponse>, 7182 + tonic::Status, 7183 + >; 6217 7184 } 6218 7185 #[derive(Debug)] 6219 7186 pub struct SettingsServiceServer<T> { ··· 6236 7203 max_encoding_message_size: None, 6237 7204 } 6238 7205 } 6239 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 7206 + pub fn with_interceptor<F>( 7207 + inner: T, 7208 + interceptor: F, 7209 + ) -> InterceptedService<Self, F> 6240 7210 where 6241 7211 F: tonic::service::Interceptor, 6242 7212 { ··· 6291 7261 "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { 6292 7262 #[allow(non_camel_case_types)] 6293 7263 struct GetSettingsListSvc<T: SettingsService>(pub Arc<T>); 6294 - impl<T: SettingsService> 6295 - tonic::server::UnaryService<super::GetSettingsListRequest> 6296 - for GetSettingsListSvc<T> 6297 - { 7264 + impl< 7265 + T: SettingsService, 7266 + > tonic::server::UnaryService<super::GetSettingsListRequest> 7267 + for GetSettingsListSvc<T> { 6298 7268 type Response = super::GetSettingsListResponse; 6299 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7269 + type Future = BoxFuture< 7270 + tonic::Response<Self::Response>, 7271 + tonic::Status, 7272 + >; 6300 7273 fn call( 6301 7274 &mut self, 6302 7275 request: tonic::Request<super::GetSettingsListRequest>, 6303 7276 ) -> Self::Future { 6304 7277 let inner = Arc::clone(&self.0); 6305 7278 let fut = async move { 6306 - <T as SettingsService>::get_settings_list(&inner, request).await 7279 + <T as SettingsService>::get_settings_list(&inner, request) 7280 + .await 6307 7281 }; 6308 7282 Box::pin(fut) 6309 7283 } ··· 6333 7307 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { 6334 7308 #[allow(non_camel_case_types)] 6335 7309 struct GetGlobalSettingsSvc<T: SettingsService>(pub Arc<T>); 6336 - impl<T: SettingsService> 6337 - tonic::server::UnaryService<super::GetGlobalSettingsRequest> 6338 - for GetGlobalSettingsSvc<T> 6339 - { 7310 + impl< 7311 + T: SettingsService, 7312 + > tonic::server::UnaryService<super::GetGlobalSettingsRequest> 7313 + for GetGlobalSettingsSvc<T> { 6340 7314 type Response = super::GetGlobalSettingsResponse; 6341 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7315 + type Future = BoxFuture< 7316 + tonic::Response<Self::Response>, 7317 + tonic::Status, 7318 + >; 6342 7319 fn call( 6343 7320 &mut self, 6344 7321 request: tonic::Request<super::GetGlobalSettingsRequest>, 6345 7322 ) -> Self::Future { 6346 7323 let inner = Arc::clone(&self.0); 6347 7324 let fut = async move { 6348 - <T as SettingsService>::get_global_settings(&inner, request).await 7325 + <T as SettingsService>::get_global_settings(&inner, request) 7326 + .await 6349 7327 }; 6350 7328 Box::pin(fut) 6351 7329 } ··· 6375 7353 "/rockbox.v1alpha1.SettingsService/SaveSettings" => { 6376 7354 #[allow(non_camel_case_types)] 6377 7355 struct SaveSettingsSvc<T: SettingsService>(pub Arc<T>); 6378 - impl<T: SettingsService> tonic::server::UnaryService<super::SaveSettingsRequest> 6379 - for SaveSettingsSvc<T> 6380 - { 7356 + impl< 7357 + T: SettingsService, 7358 + > tonic::server::UnaryService<super::SaveSettingsRequest> 7359 + for SaveSettingsSvc<T> { 6381 7360 type Response = super::SaveSettingsResponse; 6382 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7361 + type Future = BoxFuture< 7362 + tonic::Response<Self::Response>, 7363 + tonic::Status, 7364 + >; 6383 7365 fn call( 6384 7366 &mut self, 6385 7367 request: tonic::Request<super::SaveSettingsRequest>, ··· 6413 7395 }; 6414 7396 Box::pin(fut) 6415 7397 } 6416 - _ => Box::pin(async move { 6417 - let mut response = http::Response::new(empty_body()); 6418 - let headers = response.headers_mut(); 6419 - headers.insert( 6420 - tonic::Status::GRPC_STATUS, 6421 - (tonic::Code::Unimplemented as i32).into(), 6422 - ); 6423 - headers.insert( 6424 - http::header::CONTENT_TYPE, 6425 - tonic::metadata::GRPC_CONTENT_TYPE, 6426 - ); 6427 - Ok(response) 6428 - }), 7398 + _ => { 7399 + Box::pin(async move { 7400 + let mut response = http::Response::new(empty_body()); 7401 + let headers = response.headers_mut(); 7402 + headers 7403 + .insert( 7404 + tonic::Status::GRPC_STATUS, 7405 + (tonic::Code::Unimplemented as i32).into(), 7406 + ); 7407 + headers 7408 + .insert( 7409 + http::header::CONTENT_TYPE, 7410 + tonic::metadata::GRPC_CONTENT_TYPE, 7411 + ); 7412 + Ok(response) 7413 + }) 7414 + } 6429 7415 } 6430 7416 } 6431 7417 } ··· 6583 7569 dead_code, 6584 7570 missing_docs, 6585 7571 clippy::wildcard_imports, 6586 - clippy::let_unit_value 7572 + clippy::let_unit_value, 6587 7573 )] 6588 - use tonic::codegen::http::Uri; 6589 7574 use tonic::codegen::*; 7575 + use tonic::codegen::http::Uri; 6590 7576 #[derive(Debug, Clone)] 6591 7577 pub struct SoundServiceClient<T> { 6592 7578 inner: tonic::client::Grpc<T>, ··· 6630 7616 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 6631 7617 >, 6632 7618 >, 6633 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6634 - Into<StdError> + std::marker::Send + std::marker::Sync, 7619 + <T as tonic::codegen::Service< 7620 + http::Request<tonic::body::BoxBody>, 7621 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6635 7622 { 6636 7623 SoundServiceClient::new(InterceptedService::new(inner, interceptor)) 6637 7624 } ··· 6669 7656 pub async fn adjust_volume( 6670 7657 &mut self, 6671 7658 request: impl tonic::IntoRequest<super::AdjustVolumeRequest>, 6672 - ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status> 6673 - { 6674 - self.inner.ready().await.map_err(|e| { 6675 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6676 - })?; 7659 + ) -> std::result::Result< 7660 + tonic::Response<super::AdjustVolumeResponse>, 7661 + tonic::Status, 7662 + > { 7663 + self.inner 7664 + .ready() 7665 + .await 7666 + .map_err(|e| { 7667 + tonic::Status::unknown( 7668 + format!("Service was not ready: {}", e.into()), 7669 + ) 7670 + })?; 6677 7671 let codec = tonic::codec::ProstCodec::default(); 6678 - let path = 6679 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); 7672 + let path = http::uri::PathAndQuery::from_static( 7673 + "/rockbox.v1alpha1.SoundService/AdjustVolume", 7674 + ); 6680 7675 let mut req = request.into_request(); 6681 - req.extensions_mut().insert(GrpcMethod::new( 6682 - "rockbox.v1alpha1.SoundService", 6683 - "AdjustVolume", 6684 - )); 7676 + req.extensions_mut() 7677 + .insert( 7678 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), 7679 + ); 6685 7680 self.inner.unary(req, path, codec).await 6686 7681 } 6687 7682 pub async fn sound_set( 6688 7683 &mut self, 6689 7684 request: impl tonic::IntoRequest<super::SoundSetRequest>, 6690 - ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status> { 6691 - self.inner.ready().await.map_err(|e| { 6692 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6693 - })?; 7685 + ) -> std::result::Result< 7686 + tonic::Response<super::SoundSetResponse>, 7687 + tonic::Status, 7688 + > { 7689 + self.inner 7690 + .ready() 7691 + .await 7692 + .map_err(|e| { 7693 + tonic::Status::unknown( 7694 + format!("Service was not ready: {}", e.into()), 7695 + ) 7696 + })?; 6694 7697 let codec = tonic::codec::ProstCodec::default(); 6695 - let path = 6696 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); 7698 + let path = http::uri::PathAndQuery::from_static( 7699 + "/rockbox.v1alpha1.SoundService/SoundSet", 7700 + ); 6697 7701 let mut req = request.into_request(); 6698 7702 req.extensions_mut() 6699 7703 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); ··· 6702 7706 pub async fn sound_current( 6703 7707 &mut self, 6704 7708 request: impl tonic::IntoRequest<super::SoundCurrentRequest>, 6705 - ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status> 6706 - { 6707 - self.inner.ready().await.map_err(|e| { 6708 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6709 - })?; 7709 + ) -> std::result::Result< 7710 + tonic::Response<super::SoundCurrentResponse>, 7711 + tonic::Status, 7712 + > { 7713 + self.inner 7714 + .ready() 7715 + .await 7716 + .map_err(|e| { 7717 + tonic::Status::unknown( 7718 + format!("Service was not ready: {}", e.into()), 7719 + ) 7720 + })?; 6710 7721 let codec = tonic::codec::ProstCodec::default(); 6711 - let path = 6712 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); 7722 + let path = http::uri::PathAndQuery::from_static( 7723 + "/rockbox.v1alpha1.SoundService/SoundCurrent", 7724 + ); 6713 7725 let mut req = request.into_request(); 6714 - req.extensions_mut().insert(GrpcMethod::new( 6715 - "rockbox.v1alpha1.SoundService", 6716 - "SoundCurrent", 6717 - )); 7726 + req.extensions_mut() 7727 + .insert( 7728 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), 7729 + ); 6718 7730 self.inner.unary(req, path, codec).await 6719 7731 } 6720 7732 pub async fn sound_default( 6721 7733 &mut self, 6722 7734 request: impl tonic::IntoRequest<super::SoundDefaultRequest>, 6723 - ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status> 6724 - { 6725 - self.inner.ready().await.map_err(|e| { 6726 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6727 - })?; 7735 + ) -> std::result::Result< 7736 + tonic::Response<super::SoundDefaultResponse>, 7737 + tonic::Status, 7738 + > { 7739 + self.inner 7740 + .ready() 7741 + .await 7742 + .map_err(|e| { 7743 + tonic::Status::unknown( 7744 + format!("Service was not ready: {}", e.into()), 7745 + ) 7746 + })?; 6728 7747 let codec = tonic::codec::ProstCodec::default(); 6729 - let path = 6730 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); 7748 + let path = http::uri::PathAndQuery::from_static( 7749 + "/rockbox.v1alpha1.SoundService/SoundDefault", 7750 + ); 6731 7751 let mut req = request.into_request(); 6732 - req.extensions_mut().insert(GrpcMethod::new( 6733 - "rockbox.v1alpha1.SoundService", 6734 - "SoundDefault", 6735 - )); 7752 + req.extensions_mut() 7753 + .insert( 7754 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), 7755 + ); 6736 7756 self.inner.unary(req, path, codec).await 6737 7757 } 6738 7758 pub async fn sound_min( 6739 7759 &mut self, 6740 7760 request: impl tonic::IntoRequest<super::SoundMinRequest>, 6741 - ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status> { 6742 - self.inner.ready().await.map_err(|e| { 6743 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6744 - })?; 7761 + ) -> std::result::Result< 7762 + tonic::Response<super::SoundMinResponse>, 7763 + tonic::Status, 7764 + > { 7765 + self.inner 7766 + .ready() 7767 + .await 7768 + .map_err(|e| { 7769 + tonic::Status::unknown( 7770 + format!("Service was not ready: {}", e.into()), 7771 + ) 7772 + })?; 6745 7773 let codec = tonic::codec::ProstCodec::default(); 6746 - let path = 6747 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); 7774 + let path = http::uri::PathAndQuery::from_static( 7775 + "/rockbox.v1alpha1.SoundService/SoundMin", 7776 + ); 6748 7777 let mut req = request.into_request(); 6749 7778 req.extensions_mut() 6750 7779 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); ··· 6753 7782 pub async fn sound_max( 6754 7783 &mut self, 6755 7784 request: impl tonic::IntoRequest<super::SoundMaxRequest>, 6756 - ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status> { 6757 - self.inner.ready().await.map_err(|e| { 6758 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6759 - })?; 7785 + ) -> std::result::Result< 7786 + tonic::Response<super::SoundMaxResponse>, 7787 + tonic::Status, 7788 + > { 7789 + self.inner 7790 + .ready() 7791 + .await 7792 + .map_err(|e| { 7793 + tonic::Status::unknown( 7794 + format!("Service was not ready: {}", e.into()), 7795 + ) 7796 + })?; 6760 7797 let codec = tonic::codec::ProstCodec::default(); 6761 - let path = 6762 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); 7798 + let path = http::uri::PathAndQuery::from_static( 7799 + "/rockbox.v1alpha1.SoundService/SoundMax", 7800 + ); 6763 7801 let mut req = request.into_request(); 6764 7802 req.extensions_mut() 6765 7803 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); ··· 6768 7806 pub async fn sound_unit( 6769 7807 &mut self, 6770 7808 request: impl tonic::IntoRequest<super::SoundUnitRequest>, 6771 - ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status> { 6772 - self.inner.ready().await.map_err(|e| { 6773 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6774 - })?; 7809 + ) -> std::result::Result< 7810 + tonic::Response<super::SoundUnitResponse>, 7811 + tonic::Status, 7812 + > { 7813 + self.inner 7814 + .ready() 7815 + .await 7816 + .map_err(|e| { 7817 + tonic::Status::unknown( 7818 + format!("Service was not ready: {}", e.into()), 7819 + ) 7820 + })?; 6775 7821 let codec = tonic::codec::ProstCodec::default(); 6776 - let path = 6777 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); 7822 + let path = http::uri::PathAndQuery::from_static( 7823 + "/rockbox.v1alpha1.SoundService/SoundUnit", 7824 + ); 6778 7825 let mut req = request.into_request(); 6779 - req.extensions_mut().insert(GrpcMethod::new( 6780 - "rockbox.v1alpha1.SoundService", 6781 - "SoundUnit", 6782 - )); 7826 + req.extensions_mut() 7827 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); 6783 7828 self.inner.unary(req, path, codec).await 6784 7829 } 6785 7830 pub async fn sound_val2_phys( 6786 7831 &mut self, 6787 7832 request: impl tonic::IntoRequest<super::SoundVal2PhysRequest>, 6788 - ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status> 6789 - { 6790 - self.inner.ready().await.map_err(|e| { 6791 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6792 - })?; 7833 + ) -> std::result::Result< 7834 + tonic::Response<super::SoundVal2PhysResponse>, 7835 + tonic::Status, 7836 + > { 7837 + self.inner 7838 + .ready() 7839 + .await 7840 + .map_err(|e| { 7841 + tonic::Status::unknown( 7842 + format!("Service was not ready: {}", e.into()), 7843 + ) 7844 + })?; 6793 7845 let codec = tonic::codec::ProstCodec::default(); 6794 7846 let path = http::uri::PathAndQuery::from_static( 6795 7847 "/rockbox.v1alpha1.SoundService/SoundVal2Phys", 6796 7848 ); 6797 7849 let mut req = request.into_request(); 6798 - req.extensions_mut().insert(GrpcMethod::new( 6799 - "rockbox.v1alpha1.SoundService", 6800 - "SoundVal2Phys", 6801 - )); 7850 + req.extensions_mut() 7851 + .insert( 7852 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), 7853 + ); 6802 7854 self.inner.unary(req, path, codec).await 6803 7855 } 6804 7856 pub async fn get_pitch( 6805 7857 &mut self, 6806 7858 request: impl tonic::IntoRequest<super::GetPitchRequest>, 6807 - ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status> { 6808 - self.inner.ready().await.map_err(|e| { 6809 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6810 - })?; 7859 + ) -> std::result::Result< 7860 + tonic::Response<super::GetPitchResponse>, 7861 + tonic::Status, 7862 + > { 7863 + self.inner 7864 + .ready() 7865 + .await 7866 + .map_err(|e| { 7867 + tonic::Status::unknown( 7868 + format!("Service was not ready: {}", e.into()), 7869 + ) 7870 + })?; 6811 7871 let codec = tonic::codec::ProstCodec::default(); 6812 - let path = 6813 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); 7872 + let path = http::uri::PathAndQuery::from_static( 7873 + "/rockbox.v1alpha1.SoundService/GetPitch", 7874 + ); 6814 7875 let mut req = request.into_request(); 6815 7876 req.extensions_mut() 6816 7877 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); ··· 6819 7880 pub async fn set_pitch( 6820 7881 &mut self, 6821 7882 request: impl tonic::IntoRequest<super::SetPitchRequest>, 6822 - ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status> { 6823 - self.inner.ready().await.map_err(|e| { 6824 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6825 - })?; 7883 + ) -> std::result::Result< 7884 + tonic::Response<super::SetPitchResponse>, 7885 + tonic::Status, 7886 + > { 7887 + self.inner 7888 + .ready() 7889 + .await 7890 + .map_err(|e| { 7891 + tonic::Status::unknown( 7892 + format!("Service was not ready: {}", e.into()), 7893 + ) 7894 + })?; 6826 7895 let codec = tonic::codec::ProstCodec::default(); 6827 - let path = 6828 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); 7896 + let path = http::uri::PathAndQuery::from_static( 7897 + "/rockbox.v1alpha1.SoundService/SetPitch", 7898 + ); 6829 7899 let mut req = request.into_request(); 6830 7900 req.extensions_mut() 6831 7901 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); ··· 6834 7904 pub async fn beep_play( 6835 7905 &mut self, 6836 7906 request: impl tonic::IntoRequest<super::BeepPlayRequest>, 6837 - ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status> { 6838 - self.inner.ready().await.map_err(|e| { 6839 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6840 - })?; 7907 + ) -> std::result::Result< 7908 + tonic::Response<super::BeepPlayResponse>, 7909 + tonic::Status, 7910 + > { 7911 + self.inner 7912 + .ready() 7913 + .await 7914 + .map_err(|e| { 7915 + tonic::Status::unknown( 7916 + format!("Service was not ready: {}", e.into()), 7917 + ) 7918 + })?; 6841 7919 let codec = tonic::codec::ProstCodec::default(); 6842 - let path = 6843 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); 7920 + let path = http::uri::PathAndQuery::from_static( 7921 + "/rockbox.v1alpha1.SoundService/BeepPlay", 7922 + ); 6844 7923 let mut req = request.into_request(); 6845 7924 req.extensions_mut() 6846 7925 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); ··· 6849 7928 pub async fn pcmbuf_fade( 6850 7929 &mut self, 6851 7930 request: impl tonic::IntoRequest<super::PcmbufFadeRequest>, 6852 - ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status> 6853 - { 6854 - self.inner.ready().await.map_err(|e| { 6855 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6856 - })?; 7931 + ) -> std::result::Result< 7932 + tonic::Response<super::PcmbufFadeResponse>, 7933 + tonic::Status, 7934 + > { 7935 + self.inner 7936 + .ready() 7937 + .await 7938 + .map_err(|e| { 7939 + tonic::Status::unknown( 7940 + format!("Service was not ready: {}", e.into()), 7941 + ) 7942 + })?; 6857 7943 let codec = tonic::codec::ProstCodec::default(); 6858 - let path = 6859 - http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); 7944 + let path = http::uri::PathAndQuery::from_static( 7945 + "/rockbox.v1alpha1.SoundService/PcmbufFade", 7946 + ); 6860 7947 let mut req = request.into_request(); 6861 - req.extensions_mut().insert(GrpcMethod::new( 6862 - "rockbox.v1alpha1.SoundService", 6863 - "PcmbufFade", 6864 - )); 7948 + req.extensions_mut() 7949 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); 6865 7950 self.inner.unary(req, path, codec).await 6866 7951 } 6867 7952 pub async fn pcmbuf_set_low_latency( 6868 7953 &mut self, 6869 7954 request: impl tonic::IntoRequest<super::PcmbufSetLowLatencyRequest>, 6870 - ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status> 6871 - { 6872 - self.inner.ready().await.map_err(|e| { 6873 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6874 - })?; 7955 + ) -> std::result::Result< 7956 + tonic::Response<super::PcmbufSetLowLatencyResponse>, 7957 + tonic::Status, 7958 + > { 7959 + self.inner 7960 + .ready() 7961 + .await 7962 + .map_err(|e| { 7963 + tonic::Status::unknown( 7964 + format!("Service was not ready: {}", e.into()), 7965 + ) 7966 + })?; 6875 7967 let codec = tonic::codec::ProstCodec::default(); 6876 7968 let path = http::uri::PathAndQuery::from_static( 6877 7969 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", 6878 7970 ); 6879 7971 let mut req = request.into_request(); 6880 - req.extensions_mut().insert(GrpcMethod::new( 6881 - "rockbox.v1alpha1.SoundService", 6882 - "PcmbufSetLowLatency", 6883 - )); 7972 + req.extensions_mut() 7973 + .insert( 7974 + GrpcMethod::new( 7975 + "rockbox.v1alpha1.SoundService", 7976 + "PcmbufSetLowLatency", 7977 + ), 7978 + ); 6884 7979 self.inner.unary(req, path, codec).await 6885 7980 } 6886 7981 pub async fn system_sound_play( 6887 7982 &mut self, 6888 7983 request: impl tonic::IntoRequest<super::SystemSoundPlayRequest>, 6889 - ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status> 6890 - { 6891 - self.inner.ready().await.map_err(|e| { 6892 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6893 - })?; 7984 + ) -> std::result::Result< 7985 + tonic::Response<super::SystemSoundPlayResponse>, 7986 + tonic::Status, 7987 + > { 7988 + self.inner 7989 + .ready() 7990 + .await 7991 + .map_err(|e| { 7992 + tonic::Status::unknown( 7993 + format!("Service was not ready: {}", e.into()), 7994 + ) 7995 + })?; 6894 7996 let codec = tonic::codec::ProstCodec::default(); 6895 7997 let path = http::uri::PathAndQuery::from_static( 6896 7998 "/rockbox.v1alpha1.SoundService/SystemSoundPlay", 6897 7999 ); 6898 8000 let mut req = request.into_request(); 6899 - req.extensions_mut().insert(GrpcMethod::new( 6900 - "rockbox.v1alpha1.SoundService", 6901 - "SystemSoundPlay", 6902 - )); 8001 + req.extensions_mut() 8002 + .insert( 8003 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), 8004 + ); 6903 8005 self.inner.unary(req, path, codec).await 6904 8006 } 6905 8007 pub async fn keyclick_click( 6906 8008 &mut self, 6907 8009 request: impl tonic::IntoRequest<super::KeyclickClickRequest>, 6908 - ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status> 6909 - { 6910 - self.inner.ready().await.map_err(|e| { 6911 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6912 - })?; 8010 + ) -> std::result::Result< 8011 + tonic::Response<super::KeyclickClickResponse>, 8012 + tonic::Status, 8013 + > { 8014 + self.inner 8015 + .ready() 8016 + .await 8017 + .map_err(|e| { 8018 + tonic::Status::unknown( 8019 + format!("Service was not ready: {}", e.into()), 8020 + ) 8021 + })?; 6913 8022 let codec = tonic::codec::ProstCodec::default(); 6914 8023 let path = http::uri::PathAndQuery::from_static( 6915 8024 "/rockbox.v1alpha1.SoundService/KeyclickClick", 6916 8025 ); 6917 8026 let mut req = request.into_request(); 6918 - req.extensions_mut().insert(GrpcMethod::new( 6919 - "rockbox.v1alpha1.SoundService", 6920 - "KeyclickClick", 6921 - )); 8027 + req.extensions_mut() 8028 + .insert( 8029 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), 8030 + ); 6922 8031 self.inner.unary(req, path, codec).await 6923 8032 } 6924 8033 } ··· 6930 8039 dead_code, 6931 8040 missing_docs, 6932 8041 clippy::wildcard_imports, 6933 - clippy::let_unit_value 8042 + clippy::let_unit_value, 6934 8043 )] 6935 8044 use tonic::codegen::*; 6936 8045 /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. ··· 6939 8048 async fn adjust_volume( 6940 8049 &self, 6941 8050 request: tonic::Request<super::AdjustVolumeRequest>, 6942 - ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status>; 8051 + ) -> std::result::Result< 8052 + tonic::Response<super::AdjustVolumeResponse>, 8053 + tonic::Status, 8054 + >; 6943 8055 async fn sound_set( 6944 8056 &self, 6945 8057 request: tonic::Request<super::SoundSetRequest>, 6946 - ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status>; 8058 + ) -> std::result::Result< 8059 + tonic::Response<super::SoundSetResponse>, 8060 + tonic::Status, 8061 + >; 6947 8062 async fn sound_current( 6948 8063 &self, 6949 8064 request: tonic::Request<super::SoundCurrentRequest>, 6950 - ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status>; 8065 + ) -> std::result::Result< 8066 + tonic::Response<super::SoundCurrentResponse>, 8067 + tonic::Status, 8068 + >; 6951 8069 async fn sound_default( 6952 8070 &self, 6953 8071 request: tonic::Request<super::SoundDefaultRequest>, 6954 - ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status>; 8072 + ) -> std::result::Result< 8073 + tonic::Response<super::SoundDefaultResponse>, 8074 + tonic::Status, 8075 + >; 6955 8076 async fn sound_min( 6956 8077 &self, 6957 8078 request: tonic::Request<super::SoundMinRequest>, 6958 - ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status>; 8079 + ) -> std::result::Result< 8080 + tonic::Response<super::SoundMinResponse>, 8081 + tonic::Status, 8082 + >; 6959 8083 async fn sound_max( 6960 8084 &self, 6961 8085 request: tonic::Request<super::SoundMaxRequest>, 6962 - ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status>; 8086 + ) -> std::result::Result< 8087 + tonic::Response<super::SoundMaxResponse>, 8088 + tonic::Status, 8089 + >; 6963 8090 async fn sound_unit( 6964 8091 &self, 6965 8092 request: tonic::Request<super::SoundUnitRequest>, 6966 - ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status>; 8093 + ) -> std::result::Result< 8094 + tonic::Response<super::SoundUnitResponse>, 8095 + tonic::Status, 8096 + >; 6967 8097 async fn sound_val2_phys( 6968 8098 &self, 6969 8099 request: tonic::Request<super::SoundVal2PhysRequest>, 6970 - ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status>; 8100 + ) -> std::result::Result< 8101 + tonic::Response<super::SoundVal2PhysResponse>, 8102 + tonic::Status, 8103 + >; 6971 8104 async fn get_pitch( 6972 8105 &self, 6973 8106 request: tonic::Request<super::GetPitchRequest>, 6974 - ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status>; 8107 + ) -> std::result::Result< 8108 + tonic::Response<super::GetPitchResponse>, 8109 + tonic::Status, 8110 + >; 6975 8111 async fn set_pitch( 6976 8112 &self, 6977 8113 request: tonic::Request<super::SetPitchRequest>, 6978 - ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status>; 8114 + ) -> std::result::Result< 8115 + tonic::Response<super::SetPitchResponse>, 8116 + tonic::Status, 8117 + >; 6979 8118 async fn beep_play( 6980 8119 &self, 6981 8120 request: tonic::Request<super::BeepPlayRequest>, 6982 - ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status>; 8121 + ) -> std::result::Result< 8122 + tonic::Response<super::BeepPlayResponse>, 8123 + tonic::Status, 8124 + >; 6983 8125 async fn pcmbuf_fade( 6984 8126 &self, 6985 8127 request: tonic::Request<super::PcmbufFadeRequest>, 6986 - ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status>; 8128 + ) -> std::result::Result< 8129 + tonic::Response<super::PcmbufFadeResponse>, 8130 + tonic::Status, 8131 + >; 6987 8132 async fn pcmbuf_set_low_latency( 6988 8133 &self, 6989 8134 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 6990 - ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status>; 8135 + ) -> std::result::Result< 8136 + tonic::Response<super::PcmbufSetLowLatencyResponse>, 8137 + tonic::Status, 8138 + >; 6991 8139 async fn system_sound_play( 6992 8140 &self, 6993 8141 request: tonic::Request<super::SystemSoundPlayRequest>, 6994 - ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status>; 8142 + ) -> std::result::Result< 8143 + tonic::Response<super::SystemSoundPlayResponse>, 8144 + tonic::Status, 8145 + >; 6995 8146 async fn keyclick_click( 6996 8147 &self, 6997 8148 request: tonic::Request<super::KeyclickClickRequest>, 6998 - ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status>; 8149 + ) -> std::result::Result< 8150 + tonic::Response<super::KeyclickClickResponse>, 8151 + tonic::Status, 8152 + >; 6999 8153 } 7000 8154 #[derive(Debug)] 7001 8155 pub struct SoundServiceServer<T> { ··· 7018 8172 max_encoding_message_size: None, 7019 8173 } 7020 8174 } 7021 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 8175 + pub fn with_interceptor<F>( 8176 + inner: T, 8177 + interceptor: F, 8178 + ) -> InterceptedService<Self, F> 7022 8179 where 7023 8180 F: tonic::service::Interceptor, 7024 8181 { ··· 7073 8230 "/rockbox.v1alpha1.SoundService/AdjustVolume" => { 7074 8231 #[allow(non_camel_case_types)] 7075 8232 struct AdjustVolumeSvc<T: SoundService>(pub Arc<T>); 7076 - impl<T: SoundService> tonic::server::UnaryService<super::AdjustVolumeRequest> 7077 - for AdjustVolumeSvc<T> 7078 - { 8233 + impl< 8234 + T: SoundService, 8235 + > tonic::server::UnaryService<super::AdjustVolumeRequest> 8236 + for AdjustVolumeSvc<T> { 7079 8237 type Response = super::AdjustVolumeResponse; 7080 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8238 + type Future = BoxFuture< 8239 + tonic::Response<Self::Response>, 8240 + tonic::Status, 8241 + >; 7081 8242 fn call( 7082 8243 &mut self, 7083 8244 request: tonic::Request<super::AdjustVolumeRequest>, ··· 7114 8275 "/rockbox.v1alpha1.SoundService/SoundSet" => { 7115 8276 #[allow(non_camel_case_types)] 7116 8277 struct SoundSetSvc<T: SoundService>(pub Arc<T>); 7117 - impl<T: SoundService> tonic::server::UnaryService<super::SoundSetRequest> for SoundSetSvc<T> { 8278 + impl< 8279 + T: SoundService, 8280 + > tonic::server::UnaryService<super::SoundSetRequest> 8281 + for SoundSetSvc<T> { 7118 8282 type Response = super::SoundSetResponse; 7119 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8283 + type Future = BoxFuture< 8284 + tonic::Response<Self::Response>, 8285 + tonic::Status, 8286 + >; 7120 8287 fn call( 7121 8288 &mut self, 7122 8289 request: tonic::Request<super::SoundSetRequest>, ··· 7153 8320 "/rockbox.v1alpha1.SoundService/SoundCurrent" => { 7154 8321 #[allow(non_camel_case_types)] 7155 8322 struct SoundCurrentSvc<T: SoundService>(pub Arc<T>); 7156 - impl<T: SoundService> tonic::server::UnaryService<super::SoundCurrentRequest> 7157 - for SoundCurrentSvc<T> 7158 - { 8323 + impl< 8324 + T: SoundService, 8325 + > tonic::server::UnaryService<super::SoundCurrentRequest> 8326 + for SoundCurrentSvc<T> { 7159 8327 type Response = super::SoundCurrentResponse; 7160 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8328 + type Future = BoxFuture< 8329 + tonic::Response<Self::Response>, 8330 + tonic::Status, 8331 + >; 7161 8332 fn call( 7162 8333 &mut self, 7163 8334 request: tonic::Request<super::SoundCurrentRequest>, ··· 7194 8365 "/rockbox.v1alpha1.SoundService/SoundDefault" => { 7195 8366 #[allow(non_camel_case_types)] 7196 8367 struct SoundDefaultSvc<T: SoundService>(pub Arc<T>); 7197 - impl<T: SoundService> tonic::server::UnaryService<super::SoundDefaultRequest> 7198 - for SoundDefaultSvc<T> 7199 - { 8368 + impl< 8369 + T: SoundService, 8370 + > tonic::server::UnaryService<super::SoundDefaultRequest> 8371 + for SoundDefaultSvc<T> { 7200 8372 type Response = super::SoundDefaultResponse; 7201 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8373 + type Future = BoxFuture< 8374 + tonic::Response<Self::Response>, 8375 + tonic::Status, 8376 + >; 7202 8377 fn call( 7203 8378 &mut self, 7204 8379 request: tonic::Request<super::SoundDefaultRequest>, ··· 7235 8410 "/rockbox.v1alpha1.SoundService/SoundMin" => { 7236 8411 #[allow(non_camel_case_types)] 7237 8412 struct SoundMinSvc<T: SoundService>(pub Arc<T>); 7238 - impl<T: SoundService> tonic::server::UnaryService<super::SoundMinRequest> for SoundMinSvc<T> { 8413 + impl< 8414 + T: SoundService, 8415 + > tonic::server::UnaryService<super::SoundMinRequest> 8416 + for SoundMinSvc<T> { 7239 8417 type Response = super::SoundMinResponse; 7240 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8418 + type Future = BoxFuture< 8419 + tonic::Response<Self::Response>, 8420 + tonic::Status, 8421 + >; 7241 8422 fn call( 7242 8423 &mut self, 7243 8424 request: tonic::Request<super::SoundMinRequest>, ··· 7274 8455 "/rockbox.v1alpha1.SoundService/SoundMax" => { 7275 8456 #[allow(non_camel_case_types)] 7276 8457 struct SoundMaxSvc<T: SoundService>(pub Arc<T>); 7277 - impl<T: SoundService> tonic::server::UnaryService<super::SoundMaxRequest> for SoundMaxSvc<T> { 8458 + impl< 8459 + T: SoundService, 8460 + > tonic::server::UnaryService<super::SoundMaxRequest> 8461 + for SoundMaxSvc<T> { 7278 8462 type Response = super::SoundMaxResponse; 7279 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8463 + type Future = BoxFuture< 8464 + tonic::Response<Self::Response>, 8465 + tonic::Status, 8466 + >; 7280 8467 fn call( 7281 8468 &mut self, 7282 8469 request: tonic::Request<super::SoundMaxRequest>, ··· 7313 8500 "/rockbox.v1alpha1.SoundService/SoundUnit" => { 7314 8501 #[allow(non_camel_case_types)] 7315 8502 struct SoundUnitSvc<T: SoundService>(pub Arc<T>); 7316 - impl<T: SoundService> tonic::server::UnaryService<super::SoundUnitRequest> for SoundUnitSvc<T> { 8503 + impl< 8504 + T: SoundService, 8505 + > tonic::server::UnaryService<super::SoundUnitRequest> 8506 + for SoundUnitSvc<T> { 7317 8507 type Response = super::SoundUnitResponse; 7318 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8508 + type Future = BoxFuture< 8509 + tonic::Response<Self::Response>, 8510 + tonic::Status, 8511 + >; 7319 8512 fn call( 7320 8513 &mut self, 7321 8514 request: tonic::Request<super::SoundUnitRequest>, ··· 7352 8545 "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { 7353 8546 #[allow(non_camel_case_types)] 7354 8547 struct SoundVal2PhysSvc<T: SoundService>(pub Arc<T>); 7355 - impl<T: SoundService> tonic::server::UnaryService<super::SoundVal2PhysRequest> 7356 - for SoundVal2PhysSvc<T> 7357 - { 8548 + impl< 8549 + T: SoundService, 8550 + > tonic::server::UnaryService<super::SoundVal2PhysRequest> 8551 + for SoundVal2PhysSvc<T> { 7358 8552 type Response = super::SoundVal2PhysResponse; 7359 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8553 + type Future = BoxFuture< 8554 + tonic::Response<Self::Response>, 8555 + tonic::Status, 8556 + >; 7360 8557 fn call( 7361 8558 &mut self, 7362 8559 request: tonic::Request<super::SoundVal2PhysRequest>, ··· 7393 8590 "/rockbox.v1alpha1.SoundService/GetPitch" => { 7394 8591 #[allow(non_camel_case_types)] 7395 8592 struct GetPitchSvc<T: SoundService>(pub Arc<T>); 7396 - impl<T: SoundService> tonic::server::UnaryService<super::GetPitchRequest> for GetPitchSvc<T> { 8593 + impl< 8594 + T: SoundService, 8595 + > tonic::server::UnaryService<super::GetPitchRequest> 8596 + for GetPitchSvc<T> { 7397 8597 type Response = super::GetPitchResponse; 7398 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8598 + type Future = BoxFuture< 8599 + tonic::Response<Self::Response>, 8600 + tonic::Status, 8601 + >; 7399 8602 fn call( 7400 8603 &mut self, 7401 8604 request: tonic::Request<super::GetPitchRequest>, ··· 7432 8635 "/rockbox.v1alpha1.SoundService/SetPitch" => { 7433 8636 #[allow(non_camel_case_types)] 7434 8637 struct SetPitchSvc<T: SoundService>(pub Arc<T>); 7435 - impl<T: SoundService> tonic::server::UnaryService<super::SetPitchRequest> for SetPitchSvc<T> { 8638 + impl< 8639 + T: SoundService, 8640 + > tonic::server::UnaryService<super::SetPitchRequest> 8641 + for SetPitchSvc<T> { 7436 8642 type Response = super::SetPitchResponse; 7437 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8643 + type Future = BoxFuture< 8644 + tonic::Response<Self::Response>, 8645 + tonic::Status, 8646 + >; 7438 8647 fn call( 7439 8648 &mut self, 7440 8649 request: tonic::Request<super::SetPitchRequest>, ··· 7471 8680 "/rockbox.v1alpha1.SoundService/BeepPlay" => { 7472 8681 #[allow(non_camel_case_types)] 7473 8682 struct BeepPlaySvc<T: SoundService>(pub Arc<T>); 7474 - impl<T: SoundService> tonic::server::UnaryService<super::BeepPlayRequest> for BeepPlaySvc<T> { 8683 + impl< 8684 + T: SoundService, 8685 + > tonic::server::UnaryService<super::BeepPlayRequest> 8686 + for BeepPlaySvc<T> { 7475 8687 type Response = super::BeepPlayResponse; 7476 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8688 + type Future = BoxFuture< 8689 + tonic::Response<Self::Response>, 8690 + tonic::Status, 8691 + >; 7477 8692 fn call( 7478 8693 &mut self, 7479 8694 request: tonic::Request<super::BeepPlayRequest>, ··· 7510 8725 "/rockbox.v1alpha1.SoundService/PcmbufFade" => { 7511 8726 #[allow(non_camel_case_types)] 7512 8727 struct PcmbufFadeSvc<T: SoundService>(pub Arc<T>); 7513 - impl<T: SoundService> tonic::server::UnaryService<super::PcmbufFadeRequest> for PcmbufFadeSvc<T> { 8728 + impl< 8729 + T: SoundService, 8730 + > tonic::server::UnaryService<super::PcmbufFadeRequest> 8731 + for PcmbufFadeSvc<T> { 7514 8732 type Response = super::PcmbufFadeResponse; 7515 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8733 + type Future = BoxFuture< 8734 + tonic::Response<Self::Response>, 8735 + tonic::Status, 8736 + >; 7516 8737 fn call( 7517 8738 &mut self, 7518 8739 request: tonic::Request<super::PcmbufFadeRequest>, ··· 7549 8770 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { 7550 8771 #[allow(non_camel_case_types)] 7551 8772 struct PcmbufSetLowLatencySvc<T: SoundService>(pub Arc<T>); 7552 - impl<T: SoundService> 7553 - tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 7554 - for PcmbufSetLowLatencySvc<T> 7555 - { 8773 + impl< 8774 + T: SoundService, 8775 + > tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 8776 + for PcmbufSetLowLatencySvc<T> { 7556 8777 type Response = super::PcmbufSetLowLatencyResponse; 7557 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8778 + type Future = BoxFuture< 8779 + tonic::Response<Self::Response>, 8780 + tonic::Status, 8781 + >; 7558 8782 fn call( 7559 8783 &mut self, 7560 8784 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 7561 8785 ) -> Self::Future { 7562 8786 let inner = Arc::clone(&self.0); 7563 8787 let fut = async move { 7564 - <T as SoundService>::pcmbuf_set_low_latency(&inner, request).await 8788 + <T as SoundService>::pcmbuf_set_low_latency(&inner, request) 8789 + .await 7565 8790 }; 7566 8791 Box::pin(fut) 7567 8792 } ··· 7591 8816 "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { 7592 8817 #[allow(non_camel_case_types)] 7593 8818 struct SystemSoundPlaySvc<T: SoundService>(pub Arc<T>); 7594 - impl<T: SoundService> tonic::server::UnaryService<super::SystemSoundPlayRequest> 7595 - for SystemSoundPlaySvc<T> 7596 - { 8819 + impl< 8820 + T: SoundService, 8821 + > tonic::server::UnaryService<super::SystemSoundPlayRequest> 8822 + for SystemSoundPlaySvc<T> { 7597 8823 type Response = super::SystemSoundPlayResponse; 7598 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8824 + type Future = BoxFuture< 8825 + tonic::Response<Self::Response>, 8826 + tonic::Status, 8827 + >; 7599 8828 fn call( 7600 8829 &mut self, 7601 8830 request: tonic::Request<super::SystemSoundPlayRequest>, 7602 8831 ) -> Self::Future { 7603 8832 let inner = Arc::clone(&self.0); 7604 8833 let fut = async move { 7605 - <T as SoundService>::system_sound_play(&inner, request).await 8834 + <T as SoundService>::system_sound_play(&inner, request) 8835 + .await 7606 8836 }; 7607 8837 Box::pin(fut) 7608 8838 } ··· 7632 8862 "/rockbox.v1alpha1.SoundService/KeyclickClick" => { 7633 8863 #[allow(non_camel_case_types)] 7634 8864 struct KeyclickClickSvc<T: SoundService>(pub Arc<T>); 7635 - impl<T: SoundService> tonic::server::UnaryService<super::KeyclickClickRequest> 7636 - for KeyclickClickSvc<T> 7637 - { 8865 + impl< 8866 + T: SoundService, 8867 + > tonic::server::UnaryService<super::KeyclickClickRequest> 8868 + for KeyclickClickSvc<T> { 7638 8869 type Response = super::KeyclickClickResponse; 7639 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8870 + type Future = BoxFuture< 8871 + tonic::Response<Self::Response>, 8872 + tonic::Status, 8873 + >; 7640 8874 fn call( 7641 8875 &mut self, 7642 8876 request: tonic::Request<super::KeyclickClickRequest>, ··· 7670 8904 }; 7671 8905 Box::pin(fut) 7672 8906 } 7673 - _ => Box::pin(async move { 7674 - let mut response = http::Response::new(empty_body()); 7675 - let headers = response.headers_mut(); 7676 - headers.insert( 7677 - tonic::Status::GRPC_STATUS, 7678 - (tonic::Code::Unimplemented as i32).into(), 7679 - ); 7680 - headers.insert( 7681 - http::header::CONTENT_TYPE, 7682 - tonic::metadata::GRPC_CONTENT_TYPE, 7683 - ); 7684 - Ok(response) 7685 - }), 8907 + _ => { 8908 + Box::pin(async move { 8909 + let mut response = http::Response::new(empty_body()); 8910 + let headers = response.headers_mut(); 8911 + headers 8912 + .insert( 8913 + tonic::Status::GRPC_STATUS, 8914 + (tonic::Code::Unimplemented as i32).into(), 8915 + ); 8916 + headers 8917 + .insert( 8918 + http::header::CONTENT_TYPE, 8919 + tonic::metadata::GRPC_CONTENT_TYPE, 8920 + ); 8921 + Ok(response) 8922 + }) 8923 + } 7686 8924 } 7687 8925 } 7688 8926 } ··· 7743 8981 dead_code, 7744 8982 missing_docs, 7745 8983 clippy::wildcard_imports, 7746 - clippy::let_unit_value 8984 + clippy::let_unit_value, 7747 8985 )] 7748 - use tonic::codegen::http::Uri; 7749 8986 use tonic::codegen::*; 8987 + use tonic::codegen::http::Uri; 7750 8988 #[derive(Debug, Clone)] 7751 8989 pub struct SystemServiceClient<T> { 7752 8990 inner: tonic::client::Grpc<T>, ··· 7790 9028 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 7791 9029 >, 7792 9030 >, 7793 - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 7794 - Into<StdError> + std::marker::Send + std::marker::Sync, 9031 + <T as tonic::codegen::Service< 9032 + http::Request<tonic::body::BoxBody>, 9033 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 7795 9034 { 7796 9035 SystemServiceClient::new(InterceptedService::new(inner, interceptor)) 7797 9036 } ··· 7829 9068 pub async fn get_rockbox_version( 7830 9069 &mut self, 7831 9070 request: impl tonic::IntoRequest<super::GetRockboxVersionRequest>, 7832 - ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status> 7833 - { 7834 - self.inner.ready().await.map_err(|e| { 7835 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7836 - })?; 9071 + ) -> std::result::Result< 9072 + tonic::Response<super::GetRockboxVersionResponse>, 9073 + tonic::Status, 9074 + > { 9075 + self.inner 9076 + .ready() 9077 + .await 9078 + .map_err(|e| { 9079 + tonic::Status::unknown( 9080 + format!("Service was not ready: {}", e.into()), 9081 + ) 9082 + })?; 7837 9083 let codec = tonic::codec::ProstCodec::default(); 7838 9084 let path = http::uri::PathAndQuery::from_static( 7839 9085 "/rockbox.v1alpha1.SystemService/GetRockboxVersion", 7840 9086 ); 7841 9087 let mut req = request.into_request(); 7842 - req.extensions_mut().insert(GrpcMethod::new( 7843 - "rockbox.v1alpha1.SystemService", 7844 - "GetRockboxVersion", 7845 - )); 9088 + req.extensions_mut() 9089 + .insert( 9090 + GrpcMethod::new( 9091 + "rockbox.v1alpha1.SystemService", 9092 + "GetRockboxVersion", 9093 + ), 9094 + ); 7846 9095 self.inner.unary(req, path, codec).await 7847 9096 } 7848 9097 pub async fn get_global_status( 7849 9098 &mut self, 7850 9099 request: impl tonic::IntoRequest<super::GetGlobalStatusRequest>, 7851 - ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status> 7852 - { 7853 - self.inner.ready().await.map_err(|e| { 7854 - tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7855 - })?; 9100 + ) -> std::result::Result< 9101 + tonic::Response<super::GetGlobalStatusResponse>, 9102 + tonic::Status, 9103 + > { 9104 + self.inner 9105 + .ready() 9106 + .await 9107 + .map_err(|e| { 9108 + tonic::Status::unknown( 9109 + format!("Service was not ready: {}", e.into()), 9110 + ) 9111 + })?; 7856 9112 let codec = tonic::codec::ProstCodec::default(); 7857 9113 let path = http::uri::PathAndQuery::from_static( 7858 9114 "/rockbox.v1alpha1.SystemService/GetGlobalStatus", 7859 9115 ); 7860 9116 let mut req = request.into_request(); 7861 - req.extensions_mut().insert(GrpcMethod::new( 7862 - "rockbox.v1alpha1.SystemService", 7863 - "GetGlobalStatus", 7864 - )); 9117 + req.extensions_mut() 9118 + .insert( 9119 + GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), 9120 + ); 7865 9121 self.inner.unary(req, path, codec).await 7866 9122 } 7867 9123 } ··· 7873 9129 dead_code, 7874 9130 missing_docs, 7875 9131 clippy::wildcard_imports, 7876 - clippy::let_unit_value 9132 + clippy::let_unit_value, 7877 9133 )] 7878 9134 use tonic::codegen::*; 7879 9135 /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. ··· 7882 9138 async fn get_rockbox_version( 7883 9139 &self, 7884 9140 request: tonic::Request<super::GetRockboxVersionRequest>, 7885 - ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status>; 9141 + ) -> std::result::Result< 9142 + tonic::Response<super::GetRockboxVersionResponse>, 9143 + tonic::Status, 9144 + >; 7886 9145 async fn get_global_status( 7887 9146 &self, 7888 9147 request: tonic::Request<super::GetGlobalStatusRequest>, 7889 - ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status>; 9148 + ) -> std::result::Result< 9149 + tonic::Response<super::GetGlobalStatusResponse>, 9150 + tonic::Status, 9151 + >; 7890 9152 } 7891 9153 #[derive(Debug)] 7892 9154 pub struct SystemServiceServer<T> { ··· 7909 9171 max_encoding_message_size: None, 7910 9172 } 7911 9173 } 7912 - pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 9174 + pub fn with_interceptor<F>( 9175 + inner: T, 9176 + interceptor: F, 9177 + ) -> InterceptedService<Self, F> 7913 9178 where 7914 9179 F: tonic::service::Interceptor, 7915 9180 { ··· 7964 9229 "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { 7965 9230 #[allow(non_camel_case_types)] 7966 9231 struct GetRockboxVersionSvc<T: SystemService>(pub Arc<T>); 7967 - impl<T: SystemService> 7968 - tonic::server::UnaryService<super::GetRockboxVersionRequest> 7969 - for GetRockboxVersionSvc<T> 7970 - { 9232 + impl< 9233 + T: SystemService, 9234 + > tonic::server::UnaryService<super::GetRockboxVersionRequest> 9235 + for GetRockboxVersionSvc<T> { 7971 9236 type Response = super::GetRockboxVersionResponse; 7972 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9237 + type Future = BoxFuture< 9238 + tonic::Response<Self::Response>, 9239 + tonic::Status, 9240 + >; 7973 9241 fn call( 7974 9242 &mut self, 7975 9243 request: tonic::Request<super::GetRockboxVersionRequest>, 7976 9244 ) -> Self::Future { 7977 9245 let inner = Arc::clone(&self.0); 7978 9246 let fut = async move { 7979 - <T as SystemService>::get_rockbox_version(&inner, request).await 9247 + <T as SystemService>::get_rockbox_version(&inner, request) 9248 + .await 7980 9249 }; 7981 9250 Box::pin(fut) 7982 9251 } ··· 8006 9275 "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { 8007 9276 #[allow(non_camel_case_types)] 8008 9277 struct GetGlobalStatusSvc<T: SystemService>(pub Arc<T>); 8009 - impl<T: SystemService> 8010 - tonic::server::UnaryService<super::GetGlobalStatusRequest> 8011 - for GetGlobalStatusSvc<T> 8012 - { 9278 + impl< 9279 + T: SystemService, 9280 + > tonic::server::UnaryService<super::GetGlobalStatusRequest> 9281 + for GetGlobalStatusSvc<T> { 8013 9282 type Response = super::GetGlobalStatusResponse; 8014 - type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9283 + type Future = BoxFuture< 9284 + tonic::Response<Self::Response>, 9285 + tonic::Status, 9286 + >; 8015 9287 fn call( 8016 9288 &mut self, 8017 9289 request: tonic::Request<super::GetGlobalStatusRequest>, 8018 9290 ) -> Self::Future { 8019 9291 let inner = Arc::clone(&self.0); 8020 9292 let fut = async move { 8021 - <T as SystemService>::get_global_status(&inner, request).await 9293 + <T as SystemService>::get_global_status(&inner, request) 9294 + .await 8022 9295 }; 8023 9296 Box::pin(fut) 8024 9297 } ··· 8045 9318 }; 8046 9319 Box::pin(fut) 8047 9320 } 8048 - _ => Box::pin(async move { 8049 - let mut response = http::Response::new(empty_body()); 8050 - let headers = response.headers_mut(); 8051 - headers.insert( 8052 - tonic::Status::GRPC_STATUS, 8053 - (tonic::Code::Unimplemented as i32).into(), 8054 - ); 8055 - headers.insert( 8056 - http::header::CONTENT_TYPE, 8057 - tonic::metadata::GRPC_CONTENT_TYPE, 8058 - ); 8059 - Ok(response) 8060 - }), 9321 + _ => { 9322 + Box::pin(async move { 9323 + let mut response = http::Response::new(empty_body()); 9324 + let headers = response.headers_mut(); 9325 + headers 9326 + .insert( 9327 + tonic::Status::GRPC_STATUS, 9328 + (tonic::Code::Unimplemented as i32).into(), 9329 + ); 9330 + headers 9331 + .insert( 9332 + http::header::CONTENT_TYPE, 9333 + tonic::metadata::GRPC_CONTENT_TYPE, 9334 + ); 9335 + Ok(response) 9336 + }) 9337 + } 8061 9338 } 8062 9339 } 8063 9340 }