| /tonic/tonic-web/src/ |
| H A D | service.rs | 140 res: Option<http::response::Parts>, 146 let (res, ()) = Response::builder() in immediate() 151 Self::ImmediateResponse { res: Some(res) } in immediate() 166 let res = ready!(future.poll(cx))?; in poll() localVariable 171 CaseProj::ImmediateResponse { res } => { in poll() 172 let res = Response::from_parts(res.take().unwrap(), Body::empty()); in poll() localVariable 173 Poll::Ready(Ok(res)) in poll() 232 let mut res = res in coerce_response() localVariable 236 res.headers_mut().insert( in coerce_response() 241 res in coerce_response() [all …]
|
| H A D | client.rs | 96 let res = ready!(self.project().inner.poll(cx)); in poll() localVariable 98 Poll::Ready(res.map(|r| r.map(GrpcWebCall::client_response))) in poll()
|
| H A D | call.rs | 225 let mut res = data.copy_to_bytes(data.remaining()); in poll_encode() localVariable 228 res = crate::util::base64::STANDARD.encode(res).into(); in poll_encode() 231 Poll::Ready(Some(Ok(Frame::data(res)))) in poll_encode() 235 let mut res = make_trailers_frame(trailers); in poll_encode() localVariable 238 res = crate::util::base64::STANDARD.encode(res).into(); in poll_encode() 241 Poll::Ready(Some(Ok(Frame::data(res)))) in poll_encode()
|
| /tonic/examples/src/dynamic_load_balance/ |
| H A D | client.rs | 29 let res = rx.send(change).await; in main() localVariable 30 println!("{:?}", res); in main() 34 let res = rx.send(change).await; in main() localVariable 35 println!("{:?}", res); in main() 39 let res = rx.send(change).await; in main() localVariable 40 println!("{:?}", res); in main() 45 let res = rx.send(change).await; in main() localVariable 46 println!("{:?}", res); in main() 52 let res = rx.send(change).await; in main() localVariable 53 println!("{:?}", res); in main() [all …]
|
| /tonic/tonic/src/ |
| H A D | response.rs | 73 pub(crate) fn from_http(res: http::Response<T>) -> Self { in from_http() 74 let (head, message) = res.into_parts(); in from_http() 83 let mut res = http::Response::new(self.message); in into_http() localVariable 85 *res.version_mut() = http::Version::HTTP_2; in into_http() 86 *res.headers_mut() = self.metadata.into_sanitized_headers(); in into_http() 87 *res.extensions_mut() = self.extensions; in into_http() 89 res in into_http()
|
| /tonic/tests/compression/src/ |
| H A D | server_stream.rs | 44 let res = client.compress_output_server_stream(()).await.unwrap(); in client_enabled_server_enabled() localVariable 52 assert_eq!(res.metadata().get("grpc-encoding").unwrap(), expected); in client_enabled_server_enabled() 54 let mut stream: Streaming<SomeData> = res.into_inner(); in client_enabled_server_enabled() 108 let res = client.compress_output_server_stream(()).await.unwrap(); in client_disabled_server_enabled() localVariable 110 assert!(res.metadata().get("grpc-encoding").is_none()); in client_disabled_server_enabled() 112 let mut stream: Streaming<SomeData> = res.into_inner(); in client_disabled_server_enabled() 161 let res = client.compress_output_server_stream(()).await.unwrap(); in client_enabled_server_disabled() localVariable 163 assert!(res.metadata().get("grpc-encoding").is_none()); in client_enabled_server_disabled() 165 let mut stream: Streaming<SomeData> = res.into_inner(); in client_enabled_server_disabled()
|
| H A D | compressing_response.rs | 95 let res = client.compress_output_unary(()).await.unwrap(); in client_enabled_server_enabled() localVariable 142 let res = client.compress_output_unary(()).await.unwrap(); in client_enabled_server_disabled() localVariable 144 assert!(res.metadata().get("grpc-encoding").is_none()); in client_enabled_server_disabled() 185 let res = client.compress_output_unary(()).await.unwrap(); in client_enabled_server_disabled_multi_encoding() localVariable 187 assert!(res.metadata().get("grpc-encoding").is_none()); in client_enabled_server_disabled_multi_encoding() 256 let res = client.compress_output_unary(()).await.unwrap(); in client_disabled() localVariable 258 assert!(res.metadata().get("grpc-encoding").is_none()); in client_disabled() 350 let res = client.compress_output_unary(()).await.unwrap(); in disabling_compression_on_single_response() localVariable 358 assert_eq!(res.metadata().get("grpc-encoding").unwrap(), expected); in disabling_compression_on_single_response() 408 let res = client.compress_output_server_stream(()).await.unwrap(); in disabling_compression_on_response_but_keeping_compression_on_stream() localVariable [all …]
|
| H A D | bidirectional_stream.rs | 83 let res = client in client_enabled_server_enabled() localVariable 94 assert_eq!(res.metadata().get("grpc-encoding").unwrap(), expected); in client_enabled_server_enabled() 96 let mut stream: Streaming<SomeData> = res.into_inner(); in client_enabled_server_enabled()
|
| H A D | lib.rs | 38 fn prepare_response<B>(&self, mut res: Response<B>) -> Response<B> { in prepare_response() 40 res.disable_compression(); in prepare_response() 43 res in prepare_response()
|
| H A D | client_stream.rs | 216 let res = client.compress_output_client_stream(req).await.unwrap(); in compressing_response_from_client_stream() localVariable 223 assert_eq!(res.metadata().get("grpc-encoding").unwrap(), expected); in compressing_response_from_client_stream()
|
| /tonic/tests/integration_tests/tests/ |
| H A D | timeout.rs | 19 let res = client.unary_call(req).await; in cancelation_on_timeout() localVariable 21 let err = res.unwrap_err(); in cancelation_on_timeout() 39 let res = client.unary_call(req).await; in picks_server_timeout_if_thats_sorter() localVariable 40 let err = res.unwrap_err(); in picks_server_timeout_if_thats_sorter() 58 let res = client.unary_call(req).await; in picks_client_timeout_if_thats_sorter() localVariable 59 let err = res.unwrap_err(); in picks_client_timeout_if_thats_sorter()
|
| H A D | http2_keep_alive.rs | 40 let res = client.unary_call(Request::new(Input {})).await; in http2_keepalive_does_not_cause_panics() localVariable 42 assert!(res.is_ok()); in http2_keepalive_does_not_cause_panics() 76 let res = client.unary_call(Request::new(Input {})).await; in http2_keepalive_does_not_cause_panics_on_client_side() localVariable 78 assert!(res.is_ok()); in http2_keepalive_does_not_cause_panics_on_client_side()
|
| H A D | connection.rs | 24 let res = TestClient::connect("http://thisdoesntexist.test").await; in connect_returns_err() localVariable 26 assert!(res.is_err()); in connect_returns_err() 64 let res = client.unary_call(Request::new(Input {})).await; in connect_returns_err_via_call_after_connected() localVariable 66 let err = res.unwrap_err(); in connect_returns_err_via_call_after_connected()
|
| H A D | max_message_size.rs | 242 let res = max_message_run(&case); in assert_test_case() localVariable 244 match (case.expected_code, res) { in assert_test_case()
|
| /tonic/tests/web/tests/ |
| H A D | grpc_web.rs | 28 let res = client.request(req).await.unwrap(); in binary_request() localVariable 29 let content_type = res.headers().get(header::CONTENT_TYPE).unwrap().clone(); in binary_request() 32 assert_eq!(res.status(), StatusCode::OK); in binary_request() 35 let (message, trailers) = decode_body(res.into_body(), content_type).await; in binary_request() 51 let res = client.request(req).await.unwrap(); in text_request() localVariable 52 let content_type = res.headers().get(header::CONTENT_TYPE).unwrap().clone(); in text_request() 55 assert_eq!(res.status(), StatusCode::OK); in text_request() 58 let (message, trailers) = decode_body(res.into_body(), content_type).await; in text_request()
|
| /tonic/examples/src/h2c/ |
| H A D | client.rs | 71 let res = client.request(h2c_req).await.unwrap(); in call() localVariable 73 if res.status() != http::StatusCode::SWITCHING_PROTOCOLS { in call() 74 panic!("Our server didn't upgrade: {}", res.status()); in call() 77 let upgraded_io = hyper::upgrade::on(res).await.unwrap(); in call()
|
| H A D | server.rs | 116 let mut res = hyper::Response::new(Body::default()); in call() localVariable 117 *res.status_mut() = http::StatusCode::SWITCHING_PROTOCOLS; in call() 118 res.headers_mut().insert( in call() 123 Ok(res) in call()
|
| /tonic/interop/src/ |
| H A D | server.rs | 46 let res = SimpleResponse { in unary_call() localVariable 54 Ok(Response::new(res)) in unary_call() 97 let res = StreamingInputCallResponse { in streaming_input_call() localVariable 101 Ok(Response::new(res)) in streaming_input_call() 209 let mut res = call.await?; in call() localVariable 212 res.headers_mut() in call() 214 Ok(res in call() 218 Ok(res) in call()
|
| /tonic/examples/src/cancellation/ |
| H A D | server.rs | 64 res = request_future => res, in with_cancellation_handler()
|
| /tonic/tonic-build/src/ |
| H A D | server.rs | 485 let res = grpc.unary(method, req).await; in generate_unary() localVariable 486 Ok(res) in generate_unary() 552 let res = grpc.server_streaming(method, req).await; in generate_server_streaming() localVariable 553 Ok(res) in generate_server_streaming() 610 let res = grpc.client_streaming(method, req).await; in generate_client_streaming() localVariable 611 Ok(res) in generate_client_streaming() 678 let res = grpc.streaming(method, req).await; in generate_streaming() localVariable 679 Ok(res) in generate_streaming()
|
| /tonic/tonic/src/service/ |
| H A D | recover_error.rs | 101 let res = Response::from_parts(parts, ResponseBody::empty()); in poll() localVariable 102 Poll::Ready(Ok(res)) in poll()
|
| H A D | router.rs | 175 Ok(res) => Ok(res.map(Body::new)).into(), in poll()
|
| /tonic/tonic-health/src/generated/ |
| H A D | grpc_health_v1.rs | 369 let res = grpc.unary(method, req).await; in call() localVariable 370 Ok(res) in call() 415 let res = grpc.server_streaming(method, req).await; in call() localVariable 416 Ok(res) in call()
|
| /tonic/tonic/benches-disabled/benchmarks/compiled_protos/ |
| H A D | helloworld.rs | 152 let res = grpc.unary(method, req).await; in call() localVariable 153 Ok(res) in call()
|
| /tonic/tonic/src/transport/channel/service/ |
| H A D | connection.rs | 154 Box::pin(async move { fut.await.map_err(Into::into).map(|res| res.map(Body::new)) }) in call()
|