| /tonic/tonic/src/ |
| H A D | status.rs | 40 code: Code, field 164 code, in new() 477 code, in from_header_map() 487 self.code in code() 557 code: Code, in with_details_and_metadata() 563 code, in with_details_and_metadata() 601 code: status.code, in find_status_in_source_chain() 717 self.code(), in fmt() 875 code as i32 in from() 959 i, code as i32, in code_from_i32() [all …]
|
| /tonic/tests/default_stubs/src/ |
| H A D | test_defaults.rs | 24 client.unary(()).await.unwrap_err().code(), in test_default_stubs() 28 client.server_stream(()).await.unwrap_err().code(), in test_default_stubs() 36 .code(), in test_default_stubs() 44 .code(), in test_default_stubs() 53 client_default_stubs.unary(()).await.unwrap_err().code(), in test_default_stubs() 61 .code(), in test_default_stubs() 69 .code(), in test_default_stubs() 77 .code(), in test_default_stubs()
|
| /tonic/tonic-types/src/richer_error/ |
| H A D | mod.rs | 37 fn gen_details_bytes(code: Code, message: &str, details: Vec<Any>) -> Bytes { in gen_details_bytes() 39 code: code as i32, in gen_details_bytes() 73 code: Code, in with_error_details_and_metadata() 95 code: Code, in with_error_details() 119 code: Code, in with_error_details_vec_and_metadata() 143 code: Code, in with_error_details_vec() 485 code: Code, in with_error_details_and_metadata() 534 let details = gen_details_bytes(code, &message, conv_details); in with_error_details_and_metadata() 544 code: Code, in with_error_details_vec_and_metadata() 594 code: Code, in with_error_details_vec() [all …]
|
| /tonic/tonic-build/ |
| H A D | README.md | 71 Then we can generate Rust code via this setup in our `build.rs` 76 //.out_dir("src/google") // you can change the generated code's location 84 Then you can reference the generated Rust like this this in your code: 92 Or if you want to save the generated code in your own code base,
|
| /tonic/tests/integration_tests/tests/ |
| H A D | timeout.rs | 23 assert_eq!(err.code(), Code::Cancelled); in cancelation_on_timeout() 42 assert_eq!(err.code(), Code::Cancelled); in picks_server_timeout_if_thats_sorter() 61 assert_eq!(err.code(), Code::Cancelled); in picks_client_timeout_if_thats_sorter()
|
| H A D | connection.rs | 67 assert_eq!(err.code(), Code::Unavailable); in connect_returns_err_via_call_after_connected() 112 assert_eq!(err.code(), Code::Unavailable); in connect_lazy_reconnects_after_first_failure()
|
| H A D | max_message_size.rs | 246 (Some(code), Err(status)) => { in assert_test_case() 247 if status.code() != code { in assert_test_case()
|
| H A D | status.rs | 118 assert_eq!(err.code(), Code::Internal); in status_with_metadata()
|
| /tonic/.github/ISSUE_TEMPLATE/ |
| H A D | bug_report.md | 51 I tried this code: 53 <code sample that causes the bug>
|
| /tonic/interop/src/ |
| H A D | client.rs | 238 Err(status) => status.code() == Code::Unknown, in status_code_and_message() 256 code: 2, in status_code_and_message() 264 code: 2, in status_code_and_message() 289 code: 2, in special_status_message() 300 Err(status) => status.code() == Code::Unknown, in special_status_message() 321 Err(status) => status.code() == Code::Unimplemented, in unimplemented_method() 336 Err(status) => status.code() == Code::Unimplemented, in unimplemented_service()
|
| H A D | server.rs | 35 let status = Status::new(Code::from_i32(echo_status.code), echo_status.message); in unary_call() 114 let status = Status::new(Code::from_i32(echo_status.code), echo_status.message); in full_duplex_call() 124 … let status = Status::new(Code::from_i32(echo_status.code), echo_status.message); in full_duplex_call()
|
| /tonic/tonic-types/proto/ |
| H A D | status.proto | 31 // three pieces of data: error code, error message, and error details. 36 // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. 37 int32 code = 1; field
|
| /tonic/tonic-build/src/ |
| H A D | manual.rs | 392 let code = prettyplease::unparse(&ast); in finalize() localVariable 393 buf.push_str(&code); in finalize() 406 let code = prettyplease::unparse(&ast); in finalize() localVariable 407 buf.push_str(&code); in finalize()
|
| H A D | prost.rs | 264 let code = prettyplease::unparse(&ast); in finalize() localVariable 265 buf.push_str(&code); in finalize() 278 let code = prettyplease::unparse(&ast); in finalize() localVariable 279 buf.push_str(&code); in finalize()
|
| /tonic/examples/ |
| H A D | routeguide-tutorial.md | 7 - Generate server and client code. 32 To run the sample code and walk through the tutorial, the only prerequisite is Rust itself. 87 different [code generation configuration](#tonic-build) later in the tutorial. 164 ## Generating client and server code 166 Tonic can be configured to generate code as part cargo's normal build process. This is very 170 Behind the scenes, Tonic uses [PROST!] to handle protocol buffer serialization and code 204 That's it. The generated code contains: 243 code in a path similar to `target/debug/build/routeguide/out/routeguide.rs`. 247 We can use Tonic's `include_proto` macro to bring the generated code into scope: 569 complete example client code in [examples/src/routeguide/client.rs][routeguide-client]. [all …]
|
| H A D | helloworld-tutorial.md | 10 To run the sample code and walk through the tutorial, the only prerequisite is Rust itself. 123 … a useful way to incorporate the generation of our client and server gRPC code into the build proc… 125 ## Generating Server and Client code 127 At the root of your project (not /src), create a `build.rs` file and add the following code: 142 … Start by making a file called `server.rs` in your `/src` directory and writing the following code:
|
| /tonic/examples/src/gcp/ |
| H A D | README.md | 9 the OAuth flow. Then you must hit the `Exchange authorization code for tokens`
|
| /tonic/ |
| H A D | CONTRIBUTING.md | 78 In order to rule out the possibility of bugs introduced by userland code, test 115 Pull Requests are the way concrete changes are made to the code, documentation, 126 If the change being proposed alters code (as opposed to only documentation for 135 Integration tests go in the same crate as the code they are testing. Each sub 209 #### Generated code 211 When making changes to `tonic-build` that affects the generated code you will 213 crates like, for example `tonic-health`, generate their gRPC code via `codegen` 242 the words that refer to code, like function/variable names 298 Keep an eye out for comments from code owners to provide guidance on conflicting 372 ### Be aware of the person behind the code [all …]
|
| /tonic/tests/compression/src/ |
| H A D | compressing_request.rs | 175 assert_eq!(status.code(), tonic::Code::Unimplemented); in client_enabled_server_disabled() 234 assert_eq!(status.code(), tonic::Code::Internal); in client_mark_compressed_without_header_server_enabled()
|
| H A D | client_stream.rs | 159 assert_eq!(status.code(), tonic::Code::Unimplemented); in client_enabled_server_disabled()
|
| /tonic/tonic/benches-disabled/ |
| H A D | README.md | 19 …rly useful for establishing a first-run baseline and then comparing after code-changes - e.g. `Per…
|
| /tonic/tonic/src/codec/ |
| H A D | prost.rs | 218 assert_eq!(actual.code(), expected.code()); in decode_max_message_size_exceeded()
|
| /tonic/tonic-types/src/generated/ |
| H A D | google_rpc.rs | 13 pub code: i32, field
|
| /tonic/tests/web/tests/ |
| H A D | grpc.rs | 164 (format!("{:?}", s.metadata()), s.code()) in status()
|
| /tonic/tonic-health/src/ |
| H A D | server.rs | 201 let wire = wire.expect("status is not None").code(); in assert_grpc_status()
|