|
1 | | -#[doc = r" Generated client implementations."] |
2 | | -pub mod debugging_client { |
3 | | - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] |
4 | | - use tonic::codegen::*; |
5 | | - #[derive(Debug, Clone)] |
6 | | - pub struct DebuggingClient<T> { |
7 | | - inner: tonic::client::Grpc<T>, |
8 | | - } |
9 | | - impl DebuggingClient<tonic::transport::Channel> { |
10 | | - #[doc = r" Attempt to create a new client by connecting to a given endpoint."] |
11 | | - pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> |
12 | | - where |
13 | | - D: std::convert::TryInto<tonic::transport::Endpoint>, |
14 | | - D::Error: Into<StdError>, |
15 | | - { |
16 | | - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; |
17 | | - Ok(Self::new(conn)) |
18 | | - } |
19 | | - } |
20 | | - impl<T> DebuggingClient<T> |
21 | | - where |
22 | | - T: tonic::client::GrpcService<tonic::body::BoxBody>, |
23 | | - T::ResponseBody: Body + Send + 'static, |
24 | | - T::Error: Into<StdError>, |
25 | | - <T::ResponseBody as Body>::Error: Into<StdError> + Send, |
26 | | - { |
27 | | - pub fn new(inner: T) -> Self { |
28 | | - let inner = tonic::client::Grpc::new(inner); |
29 | | - Self { inner } |
30 | | - } |
31 | | - pub fn with_interceptor<F>( |
32 | | - inner: T, |
33 | | - interceptor: F, |
34 | | - ) -> DebuggingClient<InterceptedService<T, F>> |
35 | | - where |
36 | | - F: tonic::service::Interceptor, |
37 | | - T: tonic::codegen::Service< |
38 | | - http::Request<tonic::body::BoxBody>, |
39 | | - Response = http::Response< |
40 | | - <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, |
41 | | - >, |
42 | | - >, |
43 | | - <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: |
44 | | - Into<StdError> + Send + Sync, |
45 | | - { |
46 | | - DebuggingClient::new(InterceptedService::new(inner, interceptor)) |
47 | | - } |
48 | | - #[doc = r" Compress requests with `gzip`."] |
49 | | - #[doc = r""] |
50 | | - #[doc = r" This requires the server to support it otherwise it might respond with an"] |
51 | | - #[doc = r" error."] |
52 | | - pub fn send_gzip(mut self) -> Self { |
53 | | - self.inner = self.inner.send_gzip(); |
54 | | - self |
55 | | - } |
56 | | - #[doc = r" Enable decompressing responses with `gzip`."] |
57 | | - pub fn accept_gzip(mut self) -> Self { |
58 | | - self.inner = self.inner.accept_gzip(); |
59 | | - self |
60 | | - } |
61 | | - pub async fn call_empty( |
62 | | - &mut self, |
63 | | - request: impl tonic::IntoRequest<super::super::super::super::google::protobuf::Empty>, |
64 | | - ) -> Result< |
65 | | - tonic::Response<super::super::super::super::google::protobuf::Empty>, |
66 | | - tonic::Status, |
67 | | - > { |
68 | | - self.inner.ready().await.map_err(|e| { |
69 | | - tonic::Status::new( |
70 | | - tonic::Code::Unknown, |
71 | | - format!("Service was not ready: {}", e.into()), |
72 | | - ) |
73 | | - })?; |
74 | | - let codec = tonic::codec::ProstCodec::default(); |
75 | | - let path = |
76 | | - http::uri::PathAndQuery::from_static("/services.debug.v1.Debugging/CallEmpty"); |
77 | | - self.inner.unary(request.into_request(), path, codec).await |
78 | | - } |
79 | | - pub async fn call_empty_auth( |
80 | | - &mut self, |
81 | | - request: impl tonic::IntoRequest<super::super::super::super::google::protobuf::Empty>, |
82 | | - ) -> Result< |
83 | | - tonic::Response<super::super::super::super::google::protobuf::Empty>, |
84 | | - tonic::Status, |
85 | | - > { |
86 | | - self.inner.ready().await.map_err(|e| { |
87 | | - tonic::Status::new( |
88 | | - tonic::Code::Unknown, |
89 | | - format!("Service was not ready: {}", e.into()), |
90 | | - ) |
91 | | - })?; |
92 | | - let codec = tonic::codec::ProstCodec::default(); |
93 | | - let path = |
94 | | - http::uri::PathAndQuery::from_static("/services.debug.v1.Debugging/CallEmptyAuth"); |
95 | | - self.inner.unary(request.into_request(), path, codec).await |
96 | | - } |
97 | | - } |
98 | | -} |
| 1 | +#[doc = r" Generated client implementations."] |
| 2 | +pub mod debugging_client { |
| 3 | + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] |
| 4 | + use tonic::codegen::*; |
| 5 | + #[derive(Debug, Clone)] |
| 6 | + pub struct DebuggingClient<T> { |
| 7 | + inner: tonic::client::Grpc<T>, |
| 8 | + } |
| 9 | + impl DebuggingClient<tonic::transport::Channel> { |
| 10 | + #[doc = r" Attempt to create a new client by connecting to a given endpoint."] |
| 11 | + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> |
| 12 | + where |
| 13 | + D: std::convert::TryInto<tonic::transport::Endpoint>, |
| 14 | + D::Error: Into<StdError>, |
| 15 | + { |
| 16 | + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; |
| 17 | + Ok(Self::new(conn)) |
| 18 | + } |
| 19 | + } |
| 20 | + impl<T> DebuggingClient<T> |
| 21 | + where |
| 22 | + T: tonic::client::GrpcService<tonic::body::BoxBody>, |
| 23 | + T::ResponseBody: Body + Send + 'static, |
| 24 | + T::Error: Into<StdError>, |
| 25 | + <T::ResponseBody as Body>::Error: Into<StdError> + Send, |
| 26 | + { |
| 27 | + pub fn new(inner: T) -> Self { |
| 28 | + let inner = tonic::client::Grpc::new(inner); |
| 29 | + Self { inner } |
| 30 | + } |
| 31 | + pub fn with_interceptor<F>( |
| 32 | + inner: T, |
| 33 | + interceptor: F, |
| 34 | + ) -> DebuggingClient<InterceptedService<T, F>> |
| 35 | + where |
| 36 | + F: tonic::service::Interceptor, |
| 37 | + T: tonic::codegen::Service< |
| 38 | + http::Request<tonic::body::BoxBody>, |
| 39 | + Response = http::Response< |
| 40 | + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, |
| 41 | + >, |
| 42 | + >, |
| 43 | + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: |
| 44 | + Into<StdError> + Send + Sync, |
| 45 | + { |
| 46 | + DebuggingClient::new(InterceptedService::new(inner, interceptor)) |
| 47 | + } |
| 48 | + #[doc = r" Compress requests with `gzip`."] |
| 49 | + #[doc = r""] |
| 50 | + #[doc = r" This requires the server to support it otherwise it might respond with an"] |
| 51 | + #[doc = r" error."] |
| 52 | + pub fn send_gzip(mut self) -> Self { |
| 53 | + self.inner = self.inner.send_gzip(); |
| 54 | + self |
| 55 | + } |
| 56 | + #[doc = r" Enable decompressing responses with `gzip`."] |
| 57 | + pub fn accept_gzip(mut self) -> Self { |
| 58 | + self.inner = self.inner.accept_gzip(); |
| 59 | + self |
| 60 | + } |
| 61 | + pub async fn call_empty( |
| 62 | + &mut self, |
| 63 | + request: impl tonic::IntoRequest<super::super::super::super::google::protobuf::Empty>, |
| 64 | + ) -> Result< |
| 65 | + tonic::Response<super::super::super::super::google::protobuf::Empty>, |
| 66 | + tonic::Status, |
| 67 | + > { |
| 68 | + self.inner.ready().await.map_err(|e| { |
| 69 | + tonic::Status::new( |
| 70 | + tonic::Code::Unknown, |
| 71 | + format!("Service was not ready: {}", e.into()), |
| 72 | + ) |
| 73 | + })?; |
| 74 | + let codec = tonic::codec::ProstCodec::default(); |
| 75 | + let path = |
| 76 | + http::uri::PathAndQuery::from_static("/services.debug.v1.Debugging/CallEmpty"); |
| 77 | + self.inner.unary(request.into_request(), path, codec).await |
| 78 | + } |
| 79 | + pub async fn call_empty_auth( |
| 80 | + &mut self, |
| 81 | + request: impl tonic::IntoRequest<super::super::super::super::google::protobuf::Empty>, |
| 82 | + ) -> Result< |
| 83 | + tonic::Response<super::super::super::super::google::protobuf::Empty>, |
| 84 | + tonic::Status, |
| 85 | + > { |
| 86 | + self.inner.ready().await.map_err(|e| { |
| 87 | + tonic::Status::new( |
| 88 | + tonic::Code::Unknown, |
| 89 | + format!("Service was not ready: {}", e.into()), |
| 90 | + ) |
| 91 | + })?; |
| 92 | + let codec = tonic::codec::ProstCodec::default(); |
| 93 | + let path = |
| 94 | + http::uri::PathAndQuery::from_static("/services.debug.v1.Debugging/CallEmptyAuth"); |
| 95 | + self.inner.unary(request.into_request(), path, codec).await |
| 96 | + } |
| 97 | + } |
| 98 | +} |
0 commit comments