Home
last modified time | relevance | path

Searched refs:Some (Results 1 – 25 of 82) sorted by relevance

1234

/tonic/tonic-types/src/richer_error/error_details/
H A Dmod.rs76 retry_info: Some(RetryInfo::new(retry_delay)), in with_retry_info()
314 resource_info: Some(ResourceInfo::new( in with_resource_info()
339 help: Some(Help::new(links)), in with_help()
514 Some(quota_failure) => { in add_quota_failure_violation()
628 Some(precondition_failure) => { in add_precondition_failure_violation()
708 Some(bad_request) => { in add_bad_request_violation()
735 if let Some(bad_request) = &self.bad_request { in has_bad_request_violations()
781 self.resource_info = Some(ResourceInfo::new( in set_resource_info()
806 self.help = Some(Help::new(links)); in set_help()
829 Some(help) => { in add_help_link()
[all …]
/tonic/tests/integration_tests/tests/
H A Dmax_message_size.rs40 client_recv_max: Some(1024), in max_message_recv_size()
45 client_recv_max: Some(1024), in max_message_recv_size()
53 server_recv_max: Some(1024), in max_message_recv_size()
58 server_recv_max: Some(1024), in max_message_recv_size()
78 client_send_max: Some(1024), in max_message_send_size()
86 client_send_max: Some(1024), in max_message_send_size()
104 server_send_max: Some(1024), in max_message_send_size()
111 server_send_max: Some(1024), in max_message_send_size()
159 let mut client = Some(client); in response_stream_limit()
246 (Some(code), Err(status)) => { in assert_test_case()
[all …]
H A Dhttp2_keep_alive.rs25 let incoming = TcpIncoming::from(listener).with_nodelay(Some(true)); in http2_keepalive_does_not_cause_panics()
29 .http2_keepalive_interval(Some(Duration::from_secs(10))) in http2_keepalive_does_not_cause_panics()
55 let incoming = TcpIncoming::from(listener).with_nodelay(Some(true)); in http2_keepalive_does_not_cause_panics_on_client_side()
59 .http2_keepalive_interval(Some(Duration::from_secs(5))) in http2_keepalive_does_not_cause_panics_on_client_side()
H A Dhttp2_max_header_list_size.rs37 let (nodelay, keepalive) = (Some(true), Some(Duration::from_secs(1))); in test_http_max_header_list_size_and_long_errors()
42 .http2_max_pending_accept_reset_streams(Some(0)) in test_http_max_header_list_size_and_long_errors()
/tonic/tonic/src/transport/service/
H A Dgrpc_timeout.rs50 (Some(dur), None) => Some(dur), in call()
51 (None, Some(dur)) => Some(dur), in call()
52 (Some(header), Some(server)) => { in call()
54 Some(shorter_duration) in call()
87 if let Some(sleep) = this.sleep.as_pin_mut() { in poll()
106 let Some(val) = headers.get(GRPC_TIMEOUT_HEADER) else { in try_parse_grpc_timeout() localVariable
145 Ok(Some(duration)) in try_parse_grpc_timeout()
157 if let Some(v) = val { in setup_map_try_parse()
211 setup_map_try_parse(Some("82f")).unwrap().unwrap(); in test_invalid_unit()
225 setup_map_try_parse(Some("oneH")).unwrap().unwrap(); in test_invalid_digits()
[all …]
/tonic/tonic-web/src/
H A Dcall.rs29 Some(GRPC_WEB) | Some(GRPC_WEB_PROTO) | Some(GRPC_WEB_TEXT) | Some(GRPC_WEB_TEXT_PROTO) in is_grpc_web()
156 .map(|decoded| Some(Bytes::from(decoded))) in decode_chunk()
191 Some(Ok(_)) => { in poll_decode()
194 Some(Err(e)) => return Poll::Ready(Some(Err(internal_error(e)))), in poll_decode()
223 Some(Ok(frame)) if frame.is_data() => { in poll_encode()
243 Some(Ok(_)) => Poll::Ready(Some(Err(internal_error("unexpected frame type")))), in poll_encode()
244 Some(Err(e)) => Poll::Ready(Some(Err(internal_error(e)))), in poll_encode()
287 Some(Err(e)) => return Poll::Ready(Some(Err(e))), in poll_frame()
299 Ok(Some(trailers)) => { in poll_frame()
369 Some(GRPC_WEB_TEXT_PROTO) | Some(GRPC_WEB_TEXT) => Encoding::Base64, in from_header()
[all …]
/tonic/tonic/src/codec/
H A Dcompression.rs29 Some(e) if *e == encoding => return, in enable()
31 *e = Some(encoding); in enable()
65 self.inner.contains(&Some(encoding)) in is_enabled()
142 Ok(Some(CompressionEncoding::Gzip)) in from_encoding_header()
150 Ok(Some(CompressionEncoding::Zstd)) in from_encoding_header()
367 Some(CompressionEncoding::Gzip), in convert_compression_encodings_into_header_value()
368 Some(CompressionEncoding::Deflate), in convert_compression_encodings_into_header_value()
369 Some(CompressionEncoding::Zstd), in convert_compression_encodings_into_header_value()
380 Some(CompressionEncoding::Zstd), in convert_compression_encodings_into_header_value()
381 Some(CompressionEncoding::Deflate), in convert_compression_encodings_into_header_value()
[all …]
H A Ddecode.rs241 return Ok(Some(decode_buf)); in decode_chunk()
250 Some(Ok(frame)) => frame, in poll_frame()
251 Some(Err(status)) => { in poll_frame()
273 Ok(Some(())) in poll_frame()
331 Some(Ok(m)) => Ok(Some(m)), in message()
332 Some(Err(e)) => Err(e), in message()
375 Some(msg) => { in decode_chunk()
377 Ok(Some(msg)) in decode_chunk()
398 if let Some(item) = self.decode_chunk()? { in poll_next()
399 return Poll::Ready(Some(Ok(item))); in poll_next()
[all …]
H A Dencode.rs89 if let Some(status) = error.take() { in poll_next()
90 return Poll::Ready(Some(Err(status))); in poll_next()
104 Poll::Ready(Some(Ok(item))) => { in poll_next()
114 return Poll::Ready(Some(Err(status))); in poll_next()
121 Poll::Ready(Some(Err(status))) => { in poll_next()
123 return Poll::Ready(Some(Err(status))); in poll_next()
125 *error = Some(status); in poll_next()
152 if let Some(encoding) = compression_encoding { in encode_item()
297 Some(status.to_header_map()) in trailers()
321 Some(Ok(d)) => Some(Ok(Frame::data(d))).into(), in poll_frame()
[all …]
/tonic/tonic-types/src/richer_error/
H A Dmod.rs526 if let Some(help) = details.help { in with_error_details_and_metadata()
856 return Some(detail); in get_details_retry_info()
868 return Some(detail); in get_details_debug_info()
880 return Some(detail); in get_details_quota_failure()
892 return Some(detail); in get_details_error_info()
904 return Some(detail); in get_details_precondition_failure()
916 return Some(detail); in get_details_bad_request()
928 return Some(detail); in get_details_request_info()
940 return Some(detail); in get_details_resource_info()
952 return Some(detail); in get_details_help()
[all …]
/tonic/tonic/src/transport/channel/
H A Dendpoint.rs105 user_agent: Some(ua), in user_agent()
125 origin: Some(origin), in origin()
148 timeout: Some(dur), in timeout()
165 connect_timeout: Some(dur), in connect_timeout()
194 concurrency_limit: Some(limit), in concurrency_limit()
209 rate_limit: Some((limit, duration)), in rate_limit()
251 tls: Some( in tls_config()
271 http2_keep_alive_interval: Some(interval), in http2_keep_alive_interval()
279 http2_keep_alive_timeout: Some(duration), in keep_alive_timeout()
295 http2_adaptive_window: Some(enabled), in http2_adaptive_window()
[all …]
/tonic/tonic-types/src/richer_error/std_messages/
H A Dretry_info.rs36 Some(mut delay) => { in new()
40 Some(delay) in new()
85 Some(duration) => { in from()
88 Some(duration) in from()
100 Some(duration) => { in from()
109 Some(duration) in from()
127 let retry_info = RetryInfo::new(Some(Duration::from_secs(u64::MAX))); in gen_retry_info()
/tonic/examples/src/streaming/
H A Dserver.rs19 if let Some(io_err) = err.downcast_ref::<std::io::Error>() { in match_for_io_error()
20 return Some(io_err); in match_for_io_error()
25 if let Some(h2_err) = err.downcast_ref::<h2::Error>() { in match_for_io_error()
26 if let Some(io_err) = h2_err.get_io() { in match_for_io_error()
27 return Some(io_err); in match_for_io_error()
63 while let Some(item) = stream.next().await { in server_streaming_echo()
106 while let Some(result) = in_stream.next().await { in bidirectional_streaming_echo()
113 if let Some(io_err) = match_for_io_error(&err) { in bidirectional_streaming_echo()
H A Dclient.rs28 while let Some(item) = stream.next().await { in streaming_echo()
44 while let Some(received) = resp_stream.next().await { in bidirectional_streaming_echo()
60 while let Some(received) = resp_stream.next().await { in bidirectional_streaming_echo_throttle()
/tonic/tonic/src/
H A Dstatus.rs373 Some(h2::Reason::NO_ERROR) in code_from_h2()
426 return Some(status); in from_hyper_error()
476 Some(Status { in from_header_map()
573 self.source = Some(source); in set_source()
596 let mut source = Some(err); in find_status_in_source_chain()
598 while let Some(err) = source { in find_status_in_source_chain()
600 return Some(Status { in find_status_in_source_chain()
625 if let Some(hyper) = err in find_status_in_source_chain()
629 return Some(hyper); in find_status_in_source_chain()
895 Some(&*self.0) in source()
[all …]
/tonic/examples/src/richer-error/
H A Dclient.rs30 if let Some(bad_request) = err_details.bad_request() { in main()
34 if let Some(help) = err_details.help() { in main()
38 if let Some(localized_message) = err_details.localized_message() { in main()
/tonic/tonic/src/transport/server/
H A Dio_stream.rs56 Some(Ok(io)) => Poll::Ready(Some(Ok(ServerIo::new_io(io)))), in poll_next_without_tls()
57 Some(Err(e)) => match handle_tcp_accept_error(e) { in poll_next_without_tls()
62 ControlFlow::Break(e) => Poll::Ready(Some(Err(e))), in poll_next_without_tls()
86 let Some(State(tls, tasks)) = projected.state else { in poll_next() localVariable
103 SelectOutput::Io(io) => Poll::Ready(Some(Ok(io))), in poll_next()
110 ControlFlow::Break(e) => Poll::Ready(Some(Err(e))), in poll_next()
127 if let Some(e) = e.downcast_ref::<io::Error>() { in handle_tcp_accept_error()
154 Ok(Some(stream)) => SelectOutput::Incoming(stream), in select()
/tonic/interop/src/
H A Dserver.rs34 if let Some(echo_status) = req.response_status { in unary_call()
47 payload: Some(Payload { in unary_call()
77 yield StreamingOutputCallResponse { payload: Some(payload) }; in streaming_output_call()
93 while let Some(msg) = stream.try_next().await? { in streaming_input_call()
112 if let Some(first_msg) = stream.message().await? { in full_duplex_call()
113 if let Some(echo_status) = first_msg.response_status { in full_duplex_call()
122 while let Some(msg) = stream.try_next().await? { in full_duplex_call()
123 if let Some(echo_status) = msg.response_status { in full_duplex_call()
132 yield StreamingOutputCallResponse { payload: Some(payload) }; in full_duplex_call()
211 if let Some(echo_header) = echo_header { in call()
H A Dclient.rs46 payload: Some(payload), in large_unary()
86 payload: Some(crate::client_payload(*len as usize)), in client_streaming()
174 Some(result) => { in ping_pong()
255 response_status: Some(EchoStatus { in status_code_and_message()
263 response_status: Some(EchoStatus { in status_code_and_message()
288 response_status: Some(EchoStatus { in special_status_message()
352 payload: Some(crate::client_payload(LARGE_REQ_SIZE)), in custom_metadata()
371 response.metadata().get(key1) == Some(&value1), in custom_metadata()
376 response.metadata().get_bin(key2) == Some(&value2), in custom_metadata()
387 response.metadata().get(key1) == Some(&value1), in custom_metadata()
[all …]
/tonic/examples/src/routeguide/
H A Dclient.rs19 lo: Some(Point { in print_features()
23 hi: Some(Point { in print_features()
34 while let Some(feature) = stream.message().await? { in print_features()
71 location: Some(Point { in run_route_chat()
85 while let Some(note) = inbound.message().await? { in run_route_chat()
/tonic/tonic-build/src/
H A Dmanual.rs75 self.name = Some(name.as_ref().to_owned()); in name()
84 self.package = Some(package.as_ref().to_owned()); in package()
284 self.name = Some(name.as_ref().to_owned()); in name()
295 self.route_name = Some(route_name.as_ref().to_owned()); in route_name()
307 self.input_type = Some(input_type.as_ref().to_owned()); in input_type()
313 self.output_type = Some(output_type.as_ref().to_owned()); in output_type()
321 self.codec_path = Some(codec_path.as_ref().to_owned()); in codec_path()
470 self.out_dir = Some(out_dir.as_ref().to_path_buf()); in out_dir()
479 let out_dir = if let Some(out_dir) = self.out_dir.as_ref() { in compile()
/tonic/tests/extern_path/my_application/src/
H A Dmain.rs8 message_id: Some(::uuid::Uuid { in main()
20 message_id: Some(::uuid::Uuid { in service_types_have_extern_types()
/tonic/tonic/src/client/
H A Dgrpc.rs99 self.config.send_compression_encodings = Some(encoding); in send_compressed()
160 self.config.max_decoding_message_size = Some(limit); in max_decoding_message_size()
190 self.config.max_encoding_message_size = Some(limit); in max_encoding_message_size()
255 if let Some(trailers) = body.trailers().await? { in client_streaming()
343 let expect_additional_trailers = if let Some(status) = trailers_only_status { in create_response()
376 Some(pnq) if pnq != "/" => { in prepare_request()
377 parts.path_and_query = Some( in prepare_request()
384 parts.path_and_query = Some(path); in prepare_request()
408 if let Some(encoding) = self.send_compression_encodings { in prepare_request()
415 if let Some(header_value) = self in prepare_request()
/tonic/tonic/src/transport/channel/service/
H A Ddiscover.rs37 Poll::Ready(Some(change)) => match change { in poll_next()
40 Poll::Ready(Some(Ok(TowerChange::Insert(k, connection)))) in poll_next()
42 Change::Remove(k) => Poll::Ready(Some(Ok(TowerChange::Remove(k)))), in poll_next()
/tonic/tests/compression/src/
H A Dutil.rs59 Some(Ok(chunk)) => { in poll_frame()
62 Poll::Ready(Some(Ok(chunk))) in poll_frame()
78 if let Some(data) = frame.data_ref() { in frame_data_length()
123 while let Some(chunk) = body.frame().await { in measure_request_body_size_layer()
137 let mut client = Some(client); in mock_io_channel()

1234