subliminal_protos_rust/codegen/
db.rs

1#[derive(
2    redis_derive::ToRedisArgs,
3    redis_derive::FromRedisValue,
4    serde::Serialize,
5    serde::Deserialize,
6    utoipa::ToSchema,
7    utoipa::IntoParams
8)]
9#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct TaskRequestRecord {
12    #[prost(string, tag = "1")]
13    pub id: ::prost::alloc::string::String,
14    #[prost(string, tag = "2")]
15    pub name: ::prost::alloc::string::String,
16    #[prost(string, tag = "3")]
17    pub channel: ::prost::alloc::string::String,
18    #[prost(string, tag = "4")]
19    pub task_data: ::prost::alloc::string::String,
20    #[prost(string, tag = "5")]
21    pub execution_list_id: ::prost::alloc::string::String,
22    #[prost(bool, tag = "6")]
23    pub cleanup_on_empty: bool,
24    #[prost(string, tag = "7")]
25    pub created_at: ::prost::alloc::string::String,
26    #[prost(string, tag = "8")]
27    pub updated_at: ::prost::alloc::string::String,
28}
29#[derive(
30    redis_derive::ToRedisArgs,
31    redis_derive::FromRedisValue,
32    serde::Serialize,
33    serde::Deserialize,
34    utoipa::ToSchema,
35    utoipa::IntoParams
36)]
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct TaskExecutionRecord {
40    #[prost(string, tag = "1")]
41    pub id: ::prost::alloc::string::String,
42    #[prost(string, tag = "2")]
43    pub name: ::prost::alloc::string::String,
44    #[prost(string, tag = "3")]
45    pub parent_request_id: ::prost::alloc::string::String,
46    #[prost(enumeration = "TaskExecutionRecordStatus", tag = "4")]
47    pub status: i32,
48    #[prost(string, tag = "5")]
49    pub result: ::prost::alloc::string::String,
50    #[prost(bool, tag = "6")]
51    pub is_complete: bool,
52    #[prost(uint64, tag = "7")]
53    pub duration_seconds: u64,
54    #[prost(string, tag = "8")]
55    pub created_at: ::prost::alloc::string::String,
56    #[prost(string, tag = "9")]
57    pub updated_at: ::prost::alloc::string::String,
58}
59#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct TaskResultData {
62    #[prost(string, tag = "1")]
63    pub execution_id: ::prost::alloc::string::String,
64    #[prost(enumeration = "TaskExecutionRecordStatus", tag = "2")]
65    pub status: i32,
66    #[prost(string, tag = "3")]
67    pub result: ::prost::alloc::string::String,
68    #[prost(bool, tag = "4")]
69    pub is_complete: bool,
70    #[prost(uint64, tag = "5")]
71    pub duration_seconds: u64,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct FetchTaskRequestRecordRequest {
76    #[prost(string, tag = "1")]
77    pub task_request_id: ::prost::alloc::string::String,
78}
79#[allow(clippy::derive_partial_eq_without_eq)]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct FetchTaskExecutionRecordRequest {
82    #[prost(string, tag = "1")]
83    pub parent_request_id: ::prost::alloc::string::String,
84    #[prost(string, tag = "2")]
85    pub task_execution_id: ::prost::alloc::string::String,
86}
87#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct InitializeTaskRequestRequest {
90    #[prost(string, tag = "2")]
91    pub name: ::prost::alloc::string::String,
92    #[prost(string, tag = "3")]
93    pub channel: ::prost::alloc::string::String,
94    #[prost(string, tag = "4")]
95    pub task_data: ::prost::alloc::string::String,
96    #[prost(bool, tag = "6")]
97    pub cleanup_on_empty: bool,
98}
99#[allow(clippy::derive_partial_eq_without_eq)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct InitializeTaskRequestResponse {
102    #[prost(string, tag = "1")]
103    pub request_id: ::prost::alloc::string::String,
104}
105#[allow(clippy::derive_partial_eq_without_eq)]
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct InitializeTaskExecutionRequest {
108    #[prost(string, tag = "2")]
109    pub task_request_id: ::prost::alloc::string::String,
110    #[prost(string, tag = "3")]
111    pub execution_name: ::prost::alloc::string::String,
112}
113#[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct InitializeTaskExecutionResponse {
116    #[prost(string, tag = "1")]
117    pub execution_id: ::prost::alloc::string::String,
118}
119#[allow(clippy::derive_partial_eq_without_eq)]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct UpdateTaskExecutionRequest {
122    #[prost(string, tag = "1")]
123    pub parent_request_id: ::prost::alloc::string::String,
124    #[prost(string, tag = "2")]
125    pub execution_record_id: ::prost::alloc::string::String,
126    #[prost(enumeration = "TaskExecutionRecordStatus", tag = "3")]
127    pub status: i32,
128    #[prost(string, tag = "4")]
129    pub result: ::prost::alloc::string::String,
130    #[prost(bool, tag = "5")]
131    pub is_complete: bool,
132    #[prost(uint64, tag = "6")]
133    pub duration_seconds: u64,
134}
135#[derive(serde::Serialize, serde::Deserialize)]
136#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
137#[repr(i32)]
138pub enum TaskExecutionRecordStatus {
139    Unknown = 0,
140    Initialized = 1,
141    Queued = 2,
142    Running = 3,
143    Success = 4,
144    Failure = 5,
145    Cancelled = 6,
146}
147impl TaskExecutionRecordStatus {
148    /// String value of the enum field names used in the ProtoBuf definition.
149    ///
150    /// The values are not transformed in any way and thus are considered stable
151    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
152    pub fn as_str_name(&self) -> &'static str {
153        match self {
154            TaskExecutionRecordStatus::Unknown => "UNKNOWN",
155            TaskExecutionRecordStatus::Initialized => "INITIALIZED",
156            TaskExecutionRecordStatus::Queued => "QUEUED",
157            TaskExecutionRecordStatus::Running => "RUNNING",
158            TaskExecutionRecordStatus::Success => "SUCCESS",
159            TaskExecutionRecordStatus::Failure => "FAILURE",
160            TaskExecutionRecordStatus::Cancelled => "CANCELLED",
161        }
162    }
163    /// Creates an enum from field names used in the ProtoBuf definition.
164    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
165        match value {
166            "UNKNOWN" => Some(Self::Unknown),
167            "INITIALIZED" => Some(Self::Initialized),
168            "QUEUED" => Some(Self::Queued),
169            "RUNNING" => Some(Self::Running),
170            "SUCCESS" => Some(Self::Success),
171            "FAILURE" => Some(Self::Failure),
172            "CANCELLED" => Some(Self::Cancelled),
173            _ => None,
174        }
175    }
176}
177/// Generated client implementations.
178pub mod db_handler_client {
179    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
180    use tonic::codegen::*;
181    use tonic::codegen::http::Uri;
182    #[derive(Debug, Clone)]
183    pub struct DbHandlerClient<T> {
184        inner: tonic::client::Grpc<T>,
185    }
186    impl DbHandlerClient<tonic::transport::Channel> {
187        /// Attempt to create a new client by connecting to a given endpoint.
188        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
189        where
190            D: std::convert::TryInto<tonic::transport::Endpoint>,
191            D::Error: Into<StdError>,
192        {
193            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
194            Ok(Self::new(conn))
195        }
196    }
197    impl<T> DbHandlerClient<T>
198    where
199        T: tonic::client::GrpcService<tonic::body::BoxBody>,
200        T::Error: Into<StdError>,
201        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
202        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
203    {
204        pub fn new(inner: T) -> Self {
205            let inner = tonic::client::Grpc::new(inner);
206            Self { inner }
207        }
208        pub fn with_origin(inner: T, origin: Uri) -> Self {
209            let inner = tonic::client::Grpc::with_origin(inner, origin);
210            Self { inner }
211        }
212        pub fn with_interceptor<F>(
213            inner: T,
214            interceptor: F,
215        ) -> DbHandlerClient<InterceptedService<T, F>>
216        where
217            F: tonic::service::Interceptor,
218            T::ResponseBody: Default,
219            T: tonic::codegen::Service<
220                http::Request<tonic::body::BoxBody>,
221                Response = http::Response<
222                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
223                >,
224            >,
225            <T as tonic::codegen::Service<
226                http::Request<tonic::body::BoxBody>,
227            >>::Error: Into<StdError> + Send + Sync,
228        {
229            DbHandlerClient::new(InterceptedService::new(inner, interceptor))
230        }
231        /// Compress requests with the given encoding.
232        ///
233        /// This requires the server to support it otherwise it might respond with an
234        /// error.
235        #[must_use]
236        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
237            self.inner = self.inner.send_compressed(encoding);
238            self
239        }
240        /// Enable decompressing responses.
241        #[must_use]
242        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
243            self.inner = self.inner.accept_compressed(encoding);
244            self
245        }
246        pub async fn fetch_task_request_record(
247            &mut self,
248            request: impl tonic::IntoRequest<super::FetchTaskRequestRecordRequest>,
249        ) -> Result<tonic::Response<super::TaskRequestRecord>, tonic::Status> {
250            self.inner
251                .ready()
252                .await
253                .map_err(|e| {
254                    tonic::Status::new(
255                        tonic::Code::Unknown,
256                        format!("Service was not ready: {}", e.into()),
257                    )
258                })?;
259            let codec = tonic::codec::ProstCodec::default();
260            let path = http::uri::PathAndQuery::from_static(
261                "/db.DbHandler/FetchTaskRequestRecord",
262            );
263            self.inner.unary(request.into_request(), path, codec).await
264        }
265        pub async fn fetch_task_execution_record(
266            &mut self,
267            request: impl tonic::IntoRequest<super::FetchTaskExecutionRecordRequest>,
268        ) -> Result<tonic::Response<super::TaskExecutionRecord>, tonic::Status> {
269            self.inner
270                .ready()
271                .await
272                .map_err(|e| {
273                    tonic::Status::new(
274                        tonic::Code::Unknown,
275                        format!("Service was not ready: {}", e.into()),
276                    )
277                })?;
278            let codec = tonic::codec::ProstCodec::default();
279            let path = http::uri::PathAndQuery::from_static(
280                "/db.DbHandler/FetchTaskExecutionRecord",
281            );
282            self.inner.unary(request.into_request(), path, codec).await
283        }
284        pub async fn initialize_task_request(
285            &mut self,
286            request: impl tonic::IntoRequest<super::InitializeTaskRequestRequest>,
287        ) -> Result<tonic::Response<super::TaskRequestRecord>, tonic::Status> {
288            self.inner
289                .ready()
290                .await
291                .map_err(|e| {
292                    tonic::Status::new(
293                        tonic::Code::Unknown,
294                        format!("Service was not ready: {}", e.into()),
295                    )
296                })?;
297            let codec = tonic::codec::ProstCodec::default();
298            let path = http::uri::PathAndQuery::from_static(
299                "/db.DbHandler/InitializeTaskRequest",
300            );
301            self.inner.unary(request.into_request(), path, codec).await
302        }
303        pub async fn initialize_task_execution(
304            &mut self,
305            request: impl tonic::IntoRequest<super::InitializeTaskExecutionRequest>,
306        ) -> Result<tonic::Response<super::TaskExecutionRecord>, tonic::Status> {
307            self.inner
308                .ready()
309                .await
310                .map_err(|e| {
311                    tonic::Status::new(
312                        tonic::Code::Unknown,
313                        format!("Service was not ready: {}", e.into()),
314                    )
315                })?;
316            let codec = tonic::codec::ProstCodec::default();
317            let path = http::uri::PathAndQuery::from_static(
318                "/db.DbHandler/InitializeTaskExecution",
319            );
320            self.inner.unary(request.into_request(), path, codec).await
321        }
322        pub async fn update_task_execution(
323            &mut self,
324            request: impl tonic::IntoRequest<super::UpdateTaskExecutionRequest>,
325        ) -> Result<tonic::Response<super::TaskExecutionRecord>, tonic::Status> {
326            self.inner
327                .ready()
328                .await
329                .map_err(|e| {
330                    tonic::Status::new(
331                        tonic::Code::Unknown,
332                        format!("Service was not ready: {}", e.into()),
333                    )
334                })?;
335            let codec = tonic::codec::ProstCodec::default();
336            let path = http::uri::PathAndQuery::from_static(
337                "/db.DbHandler/UpdateTaskExecution",
338            );
339            self.inner.unary(request.into_request(), path, codec).await
340        }
341    }
342}
343/// Generated server implementations.
344pub mod db_handler_server {
345    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
346    use tonic::codegen::*;
347    /// Generated trait containing gRPC methods that should be implemented for use with DbHandlerServer.
348    #[async_trait]
349    pub trait DbHandler: Send + Sync + 'static {
350        async fn fetch_task_request_record(
351            &self,
352            request: tonic::Request<super::FetchTaskRequestRecordRequest>,
353        ) -> Result<tonic::Response<super::TaskRequestRecord>, tonic::Status>;
354        async fn fetch_task_execution_record(
355            &self,
356            request: tonic::Request<super::FetchTaskExecutionRecordRequest>,
357        ) -> Result<tonic::Response<super::TaskExecutionRecord>, tonic::Status>;
358        async fn initialize_task_request(
359            &self,
360            request: tonic::Request<super::InitializeTaskRequestRequest>,
361        ) -> Result<tonic::Response<super::TaskRequestRecord>, tonic::Status>;
362        async fn initialize_task_execution(
363            &self,
364            request: tonic::Request<super::InitializeTaskExecutionRequest>,
365        ) -> Result<tonic::Response<super::TaskExecutionRecord>, tonic::Status>;
366        async fn update_task_execution(
367            &self,
368            request: tonic::Request<super::UpdateTaskExecutionRequest>,
369        ) -> Result<tonic::Response<super::TaskExecutionRecord>, tonic::Status>;
370    }
371    #[derive(Debug)]
372    pub struct DbHandlerServer<T: DbHandler> {
373        inner: _Inner<T>,
374        accept_compression_encodings: EnabledCompressionEncodings,
375        send_compression_encodings: EnabledCompressionEncodings,
376    }
377    struct _Inner<T>(Arc<T>);
378    impl<T: DbHandler> DbHandlerServer<T> {
379        pub fn new(inner: T) -> Self {
380            Self::from_arc(Arc::new(inner))
381        }
382        pub fn from_arc(inner: Arc<T>) -> Self {
383            let inner = _Inner(inner);
384            Self {
385                inner,
386                accept_compression_encodings: Default::default(),
387                send_compression_encodings: Default::default(),
388            }
389        }
390        pub fn with_interceptor<F>(
391            inner: T,
392            interceptor: F,
393        ) -> InterceptedService<Self, F>
394        where
395            F: tonic::service::Interceptor,
396        {
397            InterceptedService::new(Self::new(inner), interceptor)
398        }
399        /// Enable decompressing requests with the given encoding.
400        #[must_use]
401        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
402            self.accept_compression_encodings.enable(encoding);
403            self
404        }
405        /// Compress responses with the given encoding, if the client supports it.
406        #[must_use]
407        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
408            self.send_compression_encodings.enable(encoding);
409            self
410        }
411    }
412    impl<T, B> tonic::codegen::Service<http::Request<B>> for DbHandlerServer<T>
413    where
414        T: DbHandler,
415        B: Body + Send + 'static,
416        B::Error: Into<StdError> + Send + 'static,
417    {
418        type Response = http::Response<tonic::body::BoxBody>;
419        type Error = std::convert::Infallible;
420        type Future = BoxFuture<Self::Response, Self::Error>;
421        fn poll_ready(
422            &mut self,
423            _cx: &mut Context<'_>,
424        ) -> Poll<Result<(), Self::Error>> {
425            Poll::Ready(Ok(()))
426        }
427        fn call(&mut self, req: http::Request<B>) -> Self::Future {
428            let inner = self.inner.clone();
429            match req.uri().path() {
430                "/db.DbHandler/FetchTaskRequestRecord" => {
431                    #[allow(non_camel_case_types)]
432                    struct FetchTaskRequestRecordSvc<T: DbHandler>(pub Arc<T>);
433                    impl<
434                        T: DbHandler,
435                    > tonic::server::UnaryService<super::FetchTaskRequestRecordRequest>
436                    for FetchTaskRequestRecordSvc<T> {
437                        type Response = super::TaskRequestRecord;
438                        type Future = BoxFuture<
439                            tonic::Response<Self::Response>,
440                            tonic::Status,
441                        >;
442                        fn call(
443                            &mut self,
444                            request: tonic::Request<super::FetchTaskRequestRecordRequest>,
445                        ) -> Self::Future {
446                            let inner = self.0.clone();
447                            let fut = async move {
448                                (*inner).fetch_task_request_record(request).await
449                            };
450                            Box::pin(fut)
451                        }
452                    }
453                    let accept_compression_encodings = self.accept_compression_encodings;
454                    let send_compression_encodings = self.send_compression_encodings;
455                    let inner = self.inner.clone();
456                    let fut = async move {
457                        let inner = inner.0;
458                        let method = FetchTaskRequestRecordSvc(inner);
459                        let codec = tonic::codec::ProstCodec::default();
460                        let mut grpc = tonic::server::Grpc::new(codec)
461                            .apply_compression_config(
462                                accept_compression_encodings,
463                                send_compression_encodings,
464                            );
465                        let res = grpc.unary(method, req).await;
466                        Ok(res)
467                    };
468                    Box::pin(fut)
469                }
470                "/db.DbHandler/FetchTaskExecutionRecord" => {
471                    #[allow(non_camel_case_types)]
472                    struct FetchTaskExecutionRecordSvc<T: DbHandler>(pub Arc<T>);
473                    impl<
474                        T: DbHandler,
475                    > tonic::server::UnaryService<super::FetchTaskExecutionRecordRequest>
476                    for FetchTaskExecutionRecordSvc<T> {
477                        type Response = super::TaskExecutionRecord;
478                        type Future = BoxFuture<
479                            tonic::Response<Self::Response>,
480                            tonic::Status,
481                        >;
482                        fn call(
483                            &mut self,
484                            request: tonic::Request<
485                                super::FetchTaskExecutionRecordRequest,
486                            >,
487                        ) -> Self::Future {
488                            let inner = self.0.clone();
489                            let fut = async move {
490                                (*inner).fetch_task_execution_record(request).await
491                            };
492                            Box::pin(fut)
493                        }
494                    }
495                    let accept_compression_encodings = self.accept_compression_encodings;
496                    let send_compression_encodings = self.send_compression_encodings;
497                    let inner = self.inner.clone();
498                    let fut = async move {
499                        let inner = inner.0;
500                        let method = FetchTaskExecutionRecordSvc(inner);
501                        let codec = tonic::codec::ProstCodec::default();
502                        let mut grpc = tonic::server::Grpc::new(codec)
503                            .apply_compression_config(
504                                accept_compression_encodings,
505                                send_compression_encodings,
506                            );
507                        let res = grpc.unary(method, req).await;
508                        Ok(res)
509                    };
510                    Box::pin(fut)
511                }
512                "/db.DbHandler/InitializeTaskRequest" => {
513                    #[allow(non_camel_case_types)]
514                    struct InitializeTaskRequestSvc<T: DbHandler>(pub Arc<T>);
515                    impl<
516                        T: DbHandler,
517                    > tonic::server::UnaryService<super::InitializeTaskRequestRequest>
518                    for InitializeTaskRequestSvc<T> {
519                        type Response = super::TaskRequestRecord;
520                        type Future = BoxFuture<
521                            tonic::Response<Self::Response>,
522                            tonic::Status,
523                        >;
524                        fn call(
525                            &mut self,
526                            request: tonic::Request<super::InitializeTaskRequestRequest>,
527                        ) -> Self::Future {
528                            let inner = self.0.clone();
529                            let fut = async move {
530                                (*inner).initialize_task_request(request).await
531                            };
532                            Box::pin(fut)
533                        }
534                    }
535                    let accept_compression_encodings = self.accept_compression_encodings;
536                    let send_compression_encodings = self.send_compression_encodings;
537                    let inner = self.inner.clone();
538                    let fut = async move {
539                        let inner = inner.0;
540                        let method = InitializeTaskRequestSvc(inner);
541                        let codec = tonic::codec::ProstCodec::default();
542                        let mut grpc = tonic::server::Grpc::new(codec)
543                            .apply_compression_config(
544                                accept_compression_encodings,
545                                send_compression_encodings,
546                            );
547                        let res = grpc.unary(method, req).await;
548                        Ok(res)
549                    };
550                    Box::pin(fut)
551                }
552                "/db.DbHandler/InitializeTaskExecution" => {
553                    #[allow(non_camel_case_types)]
554                    struct InitializeTaskExecutionSvc<T: DbHandler>(pub Arc<T>);
555                    impl<
556                        T: DbHandler,
557                    > tonic::server::UnaryService<super::InitializeTaskExecutionRequest>
558                    for InitializeTaskExecutionSvc<T> {
559                        type Response = super::TaskExecutionRecord;
560                        type Future = BoxFuture<
561                            tonic::Response<Self::Response>,
562                            tonic::Status,
563                        >;
564                        fn call(
565                            &mut self,
566                            request: tonic::Request<
567                                super::InitializeTaskExecutionRequest,
568                            >,
569                        ) -> Self::Future {
570                            let inner = self.0.clone();
571                            let fut = async move {
572                                (*inner).initialize_task_execution(request).await
573                            };
574                            Box::pin(fut)
575                        }
576                    }
577                    let accept_compression_encodings = self.accept_compression_encodings;
578                    let send_compression_encodings = self.send_compression_encodings;
579                    let inner = self.inner.clone();
580                    let fut = async move {
581                        let inner = inner.0;
582                        let method = InitializeTaskExecutionSvc(inner);
583                        let codec = tonic::codec::ProstCodec::default();
584                        let mut grpc = tonic::server::Grpc::new(codec)
585                            .apply_compression_config(
586                                accept_compression_encodings,
587                                send_compression_encodings,
588                            );
589                        let res = grpc.unary(method, req).await;
590                        Ok(res)
591                    };
592                    Box::pin(fut)
593                }
594                "/db.DbHandler/UpdateTaskExecution" => {
595                    #[allow(non_camel_case_types)]
596                    struct UpdateTaskExecutionSvc<T: DbHandler>(pub Arc<T>);
597                    impl<
598                        T: DbHandler,
599                    > tonic::server::UnaryService<super::UpdateTaskExecutionRequest>
600                    for UpdateTaskExecutionSvc<T> {
601                        type Response = super::TaskExecutionRecord;
602                        type Future = BoxFuture<
603                            tonic::Response<Self::Response>,
604                            tonic::Status,
605                        >;
606                        fn call(
607                            &mut self,
608                            request: tonic::Request<super::UpdateTaskExecutionRequest>,
609                        ) -> Self::Future {
610                            let inner = self.0.clone();
611                            let fut = async move {
612                                (*inner).update_task_execution(request).await
613                            };
614                            Box::pin(fut)
615                        }
616                    }
617                    let accept_compression_encodings = self.accept_compression_encodings;
618                    let send_compression_encodings = self.send_compression_encodings;
619                    let inner = self.inner.clone();
620                    let fut = async move {
621                        let inner = inner.0;
622                        let method = UpdateTaskExecutionSvc(inner);
623                        let codec = tonic::codec::ProstCodec::default();
624                        let mut grpc = tonic::server::Grpc::new(codec)
625                            .apply_compression_config(
626                                accept_compression_encodings,
627                                send_compression_encodings,
628                            );
629                        let res = grpc.unary(method, req).await;
630                        Ok(res)
631                    };
632                    Box::pin(fut)
633                }
634                _ => {
635                    Box::pin(async move {
636                        Ok(
637                            http::Response::builder()
638                                .status(200)
639                                .header("grpc-status", "12")
640                                .header("content-type", "application/grpc")
641                                .body(empty_body())
642                                .unwrap(),
643                        )
644                    })
645                }
646            }
647        }
648    }
649    impl<T: DbHandler> Clone for DbHandlerServer<T> {
650        fn clone(&self) -> Self {
651            let inner = self.inner.clone();
652            Self {
653                inner,
654                accept_compression_encodings: self.accept_compression_encodings,
655                send_compression_encodings: self.send_compression_encodings,
656            }
657        }
658    }
659    impl<T: DbHandler> Clone for _Inner<T> {
660        fn clone(&self) -> Self {
661            Self(self.0.clone())
662        }
663    }
664    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
665        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
666            write!(f, "{:?}", self.0)
667        }
668    }
669    impl<T: DbHandler> tonic::server::NamedService for DbHandlerServer<T> {
670        const NAME: &'static str = "db.DbHandler";
671    }
672}